Skip to content

Instantly share code, notes, and snippets.

@albertoperdomo
Last active September 26, 2015 17:38
Show Gist options
  • Save albertoperdomo/1134586 to your computer and use it in GitHub Desktop.
Save albertoperdomo/1134586 to your computer and use it in GitHub Desktop.
Setting up a new machine

Setting up a new Mac for web development with Rails

This is my own howto to setup new machines, but you might find it helpful as well.

## General settings

  • In Finder -> Preferences set it to show your home folder, hard drives, external drives, filename extensions, etc.
  • Make Finder show Library: run chflags nohidden ~/Library/ within a terminal
  • Disable holding key pressed to display accents and enable repeat keys: defaults write -g ApplePressAndHoldEnabled -bool false
  • In Preferences->Dock Select "Scale Effect" in the "Minimize Using" field and deselect the "Animate Opening Applications" option.
  • Remove unused dashbaord widgets: Go to dashboard and press and hold the Option key. Remove widgets.
  • Disable Lion's window animations: defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO
  • Show all files in Finder: defaults write com.apple.finder AppleShowAllFiles 1

## The basic stuff

  • Install iterm2: http://www.iterm2.com
  • Download and install gcc (w/o xcode): https://github.com/kennethreitz/osx-gcc-installer or go ahead and install xcode from the app store
  • Create the directory /usr/local/ as your user, otherwise it will ask for sudo during homebrew installation and the directory will be owned by root, causing errors
  • Install homebrew: https://github.com/mxcl/homebrew/wiki/Installation (gcc is fine, no need to install XCode)
  • $ brew install git
  • $ brew update
  • $ brew install ack
  • $ brew install wget
  • Install rvm: http://beginrescueend.com/
  • To complete the installation follow the instructions of the install script, in my case I created the file ~/.profile and pasted the following: [[ -s "/Users/alberto/.rvm/scripts/rvm" ]] && source "/Users/alberto/.rvm/scripts/rvm" # This loads RVM into a shell session.
  • Reload: $ source ~/.profile
  • Install rubies: $ rvm install 1.9.2 $ rvm install 1.8.7 $ rvm --default use 1.9.2
  • Install bash-completion: $ brew install bash-completion (and follow the instructions)
  • Install sqlite: $ brew install sqlite

Now the stuff we use for our projects

  • brew install mongodb, follow the instructions for automatic startup/shutdown
  • brew install postgresql, follow the instructions to create the DB, automatic startup/shutdown or install from PKG
  • brew install imagemagick

Browsers

  • Google Chrome
  • Opera
  • Firefox
  • VirtualBox + images for IE8 & IE9

Printers

Follow the instructions described in the internal wiki

Other software

Copy the files from your backup

  • Source code directories
  • ~/.ssh directory (keys, config)
  • Dotfiles: ~/.vimrc, ~/.profile (or maybe you already use a repo for your dotfiles...)
  • Install projectplus for Textmate: http://ciaranwal.sh/projectplus
  • Textmate bundles from ~/Library/Application Support/Textmate
  • Fonts in ~/Library/Fonts
  • Copy the config files for tunnelblick: ~/Library/Application Support/Tunnelblick/Configurations
  • Music/iTunes Library
$ hdiutil mount -owners on -mountrandom /tmp -stdinpass /Volumes/TM_ALBERTO/Backups.backupdb/alberto-macbook/Latest/Macintosh\ HD/Users/alberto/alberto.sparsebundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment