Skip to content

Instantly share code, notes, and snippets.

@caycefischer
Last active July 26, 2020 04:23
Show Gist options
  • Save caycefischer/3180953 to your computer and use it in GitHub Desktop.
Save caycefischer/3180953 to your computer and use it in GitHub Desktop.
setting up my web development environment on Mountain Lion

Setting up Mac OSX Lion for Web Development

These are the steps I take to set up a new install of OSX Mountain Lion for web development.


1. Tweak some OS X "hacker defaults"

Run my fork of Mathias Bynens' legendary script:

curl -sL https://raw.github.com/gist/2279031/hack.sh | sh

2. Install Command Line Tools

You can grab the sub-200MB Command Line Tools installer from Apple Developers.

Note: at time of writing, the "Late July 2012" download doesn't run on Mountain Lion. Luckily, this gist comment has the answer)

3. Install SublimeText 2

4. Install iTerm 2

5. Install Homebrew package manager

(read this guide if things go wrong)

Install Homebrew with the following terminal command:

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

Then you have to fix some permissions. As Prem Sichanugrist mentions in a recent blog post, "After the upgrade, Apple will set the ownership of your /usr/local folder to root. You can easily fix this by running this command in Terminal:"

sudo chown -R 'whoami' /usr/local

where whoami is your username.

Now run brew doctor to check if everything is shipshape. If you did what I did and only install the Command Line Tools (not the whole Xcode), then you'll get two warnings:

Warning: Experimental support for using the "Command Line Tools" without Xcode. 

Warning: X11 is not installed.

I'm not sure what the full repercussions of these warnings are, only that some homebrew formulae/packages require them. That being said, I've had no issues on thus far and my webdev environment is pretty standard. If you need these things, chances are you know it, and don't need my advice.

6. Install git

It's as easy as:

brew install git && brew install hub

I also install hub, which facilities working with github from the command line.

7. Set up my terminal

a) install oh-my-zsh and change shell to ZSH

wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

b) grab my dotfiles:

hub clone /zakkain/dotfiles ~/.dotfiles

and then install them:

cd ~/.dotfiles && rake install	

c) install my zsh theme

cp ~/.dotfiles/zsh/themes/moonbase.zsh-theme ~/.oh-my-zsh/themes

d) set up my SSH keys for use with github:

cp -r ~/dropbox/ssh ~/.ssh

chmod 600 ~/.ssh/*.* && ssh-add ~/.ssh/moonbase

e) Activate SublimeText command line goodness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment