Making Homebrew work with El Capitan (OSX 10.11)

So the new privacysettings in Mac OSX 10.11 (alias El Capitan) broke your homebrew? Fix it using:

sudo chown -R $(whoami):admin /usr/local
xcode-select --install
sudo xcodebuild -license

You might also need:

cd $(brew --repository)
git reset --hard FETCH_HEAD

And (for extra credit) if you’re using ‘Oh my’ zsh and get the following error:

zsh compinit: insecure files, run compaudit for list.

Just reinstall oh-my-zsh using:

curl -L | sh