OSX Tools

Prepare the environment

xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Some Brew files

brew update
brew upgrade

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php56 --with-fpm --with-homebrew-openssl --without-snmp
brew install php56-xdebug php56-imagick php56-mcrypt
ln -sfv /usr/local/opt/php56/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php56.plist

brew install mysql
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

brew install nginx
sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
mkdir -p /usr/local/etc/nginx/sites-enabled

brew install dnsmasq
sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
cat << 'EOF' > $(brew --prefix)/etc/dnsmasq.conf
address=/double-click.net/127.0.0.1
address=/dev/127.0.0.1
EOF
sudo mkdir /etc/resolver
sudo tee /etc/resolver/dev >/dev/null <<EOF
nameserver 127.0.0.1
EOF
sudo tee /etc/resolver/lan >/dev/null <<EOF
nameserver 127.0.0.1
EOF

brew install lame git youtube-dl node wget yuicompressor ffmpeg rename

Install Apps from commandline:
http://caskroom.io/

brew install caskroom/cask/brew-cask
brew cask install --appdir=/Applications iterm2
brew cask install --appdir=/Applications dropbox
brew cask install --appdir=/Applications onepassword
brew cask install --appdir=/Applications google-chrome firefox skype simple-comic phpstorm mplayer-osx-extended mplayerx imageoptim blueharvest totalfinder utorrent vlc vmware-fusion xld qlstephen rcdefaultapp

Install zprezto
https://github.com/sorin-ionescu/prezto

zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
    ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

chsh -s /bin/zsh

Config backup:
https://github.com/lra/mackup

Reference:
http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
http://gilmendes.wordpress.com/2014/07/09/install-nginx-php-fpm-mysql-and-phpmyadmin-on-os-x-yosemite/