Enable root in OS X Yosemite and El Capitan

I needed to do some file moving between users and noticed my admin account didn’t have access, so I tried “su” and “sudo” without success. Apparently, like it Yosemite, root access is disabled by default. Here’s how to enable it:


1. Open Directory Utility (I usually do it via CMD + spacebar, then type "dire")
2. Go to the Edit menu and select "Enable Root User".
3. Enter your desired root password twice.
4. That's it!

Test it out in the terminal by doing:


$ su -

Happy rooting, yo!

IntelliJ IDEA: Pass M2_HOME to the IDE on OS X Yosemite

I had issues in Yosemite with IntelliJ always complaining that it couldn’t see my M2_HOME variable, even though I had it in my .bash_profile.  Turns out that only works in the terminal.

In any case, this worked — I verified it on my Mac, which runs v10.10.5.

1. Save this plist in ~/Library/LaunchAgents/ as custom.startup.plist



Label
my.startup
ProgramArguments

sh
-c
launchctl setenv VARIABLE_NAME1 VARIABLE_VALUE1 | launchctl setenv VARIABLE_NAME2 VARIABLE_VALUE2 | launchctl setenv VARIABLE_NAME3 VARIABLE_VALUE3

RunAtLoad
2. Log out then back in

3. That's it!