##Some apps to install before moving forward:
- F.lux
- https://justgetflux.com
- direct: https://justgetflux.com/dlmac.html
- temp fix on 10.10: disable automatic graphics switching (System Preferences -> Energy Saver)
- Spectacle
- iTerm 2
- XCode
- Adblock
##Some preferences to update before moving forward
- Screen Zoom
- System Preferences -> Accessibility -> Zoom -> ☑️ Use scroll gesture with modifier key to zoom
- Remote Login | Screen Sharing
- System Preferences -> Sharing -> ☑️ Remote Login
- System Preferences -> Sharing -> ☑️ Screen Sharing
- while you're here go ahead and change your computer's public name to something AWESOME
##Remove key-repeat lag
$ defaults write NSGlobalDomain KeyRepeat -int 0
and reboot
##Install Command Line Tools
$ xcode-select --install
for yosemite download xcode through developer center and run the following
$ xcode-select --switch /Applications/Xcode.app/Contents/Developer
$ xcode-select --install
or download directly from the developer center [see: https://developer.apple.com/downloads/index.action]
##Install homebrew
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
$ echo "export PATH=/usr/local/bin:$PATH" >> ~/.zshrc
$ brew doctor
$ brew update
Homebrew will not support yosemite until XCode 6 is publically released, however in the meantime you can symlink your rubys: Create Directory:
$ sudo mkdir -p /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
Symlink 2.0:
$ sudo ln -s /usr/bin/ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
You may have to update the script from such:
...
BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]")
if [ "$BREW_SYSTEM" = "darwin" ]
then
exec "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"
else
exec ruby -W0 "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"
fi
to:
...
#BREW_SYSTEM=$(uname -s | tr "[:upper:]" "[:lower:]")
#if [ "$BREW_SYSTEM" = "darwin" ]
#then
# exec "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"
#else
exec ruby -W0 "$BREW_LIBRARY_DIRECTORY/brew.rb" "$@"
#fi
##Install git
$ brew install git
fix for yosemite is documented below
##Generate a new ssh key
$ cd ~/.ssh
$ ssh-keygen -t rsa -C "<your email>"
$ ssh-add ~/.ssh/id_rsa
$ pbcopy < ~/.ssh/id_rsa.pub
##Add your ssh key to github visit https://github.com/settings/ssh and add your new ssh key [see https://help.github.com/articles/generating-ssh-keys]
$ ssh -T [email protected]
##Add your ssh key to heroku
$ brew install heroku
$ heroku keys:add
[see https://devcenter.heroku.com/articles/keys]
##Add your ssh key to remote servers If you have remote servers, then you probably know how to do this, but just a friendly reminder to do this :)
##Install rbenv
$ brew update
$ brew install rbenv ruby-build
$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc
Some issues can be resolved with a manual installation
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
##Install oh-my-zsh
$ curl -L http://install.ohmyz.sh | sh
$ chsh -s $(which zsh)
$ killall iTerm
##Install postgres
$ brew intstall postgresql
$ ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
$ rm -rf /usr/local/var/postgres
$ initdb /usr/local/var/postgres -E UTF8
$ killall postgres
[reboot ...]
$ createdb
Or use the postgres app [see http://postgresapp.com]
##Install newer vim with lua
$ brew install vim --with-lua
##Install tmux
$ brew install tmux reattach-to-user-namespace
for yosemite, you'll have to install r-t-u-n from HEAD
$ brew install --HEAD reattach-to-user-namespace
##Install ruby
$ rbenv install <version>
$ rbenv global <version>
$ killall iTerm
##Install gems
$ gem install rails
$ gem install bundler
$ gem install libv8 -- --with-system-v8
$ rbenv rehash
##Fix git on 10.10 Append the following to zshrc
$ echo "[[ $(env|grep -c PATH) < 2 ]] || /bin/bash -c /bin/zsh" >> ~/.zshrc
##Configure git
$ git config --global core.excludesfile '~/.gitignore'
$ git config --global core.editor `which vim`
$ git config --global user.name "[name]"
$ git config --global user.email "[email]"
##Set up some global ignores
$ cat >> ~/.gitignore <<DELIM
*.swp
*.swo
.DS_*
.env
.tmux
node_modules
DELIM
Or whatever you need to ignore
##Install Node
$ brew install node
##Other formulae
$ brew install redis mongo gcc python clojure leiningen the_silver_searcher ag phantomjs mysql hg