Skip to content

Instantly share code, notes, and snippets.

@psykidellic
Forked from jpantuso/osx_lion_rail_setup.md
Last active December 11, 2015 17:58
Show Gist options
  • Save psykidellic/4638216 to your computer and use it in GitHub Desktop.
Save psykidellic/4638216 to your computer and use it in GitHub Desktop.

Setup new Mac with OSX Lion from scratch

These commands are good as of 2013-07-27.

Install xcode 4

App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.

Homebrew

http://mxcl.github.com/homebrew/

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Note that Xcode is a pre-req for Homebrew. Once the 1.6GB is done, you will have to install the Command Line Tools at least.

Create base folder

mkdir -p ~/src ~/projects

NOTE: Copy over your SSH Keys from your existing machine if you have them and want to carry over your existing SSH configs

cp ... chmod 600

I just check out psykidellic-keys from bitbucket and copy over.

Get some important basic tools

brew install git mercurial wget tmux reattach-to-user-namespace

brew install vim weechat zsh python

brew install openssl #required for pg gem to work

brew install imagemagick

brew install scala sbt

NOTE: I use Latex a lot and the basic package is 2GB. No fun but needs to be installed. Does not come on brew too: http://www.tug.org/mactex/

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support. Easier on the command line.

curl https://iterm2.googlecode.com/files/iTerm2_v1_0_0.zip -o x.zip && unzip x.zip -d ~/Applications && rm x.zip curl https://s3.amazonaws.com/spectacle/downloads/Spectacle+0.8.4.zip -o x.zip && unzip x.zip -d ~/Applications && rm x.zip

Private Dotfiles

mkdir ~/src

cd ~/src

<< CLONE THE PRIVATE DOTFILES FROM BITBUCKET >>

Consolas font - the new in thing font

./consolas.sh

I feel there is an advantage in setting all your dev apps to use a consistent color scheme, especially your terminal and text editor/dev environment.

cd ~/projects && git clone git://github.com/altercation/solarized.git

Install: http://code.google.com/p/iterm2/wiki/ColorGallery or just use the above checked out folder

NOTE: This means you have to install both your terminal and editor (vim) colorschemes. I have been using Solarized (dark and light) but some command line app e.g. weechat dont work well with solarized. I may look into changing colors for it later on but its never the priority.

So leave the default dark and light too for edge cases like this.

Right now, there is no option to export/import profiles in iTerm2 but its there in alpha version so hopefully it will be released soon.

cd ~/ git clone --recurse git@github.com:psykidellic/vimfiles.git .vim

Create the symlink

ln -s $HOME/src/dotconffiles/.gitignore .gitignore && ln -s $HOME/src/dotconffiles/.vimrc .vimrc && ln -s $HOME/src/dotconffiles/.zshrc .zshrc && ln -s $HOME/src/dotconffiles/.my_aliases .my_aliases && ln -s $HOME/src/dotconffiles/.tmux.conf .tmux.conf && ln -s $HOME/src/dotconffiles/.gitconfig .gitconfig && ln -s $HOME/src/dotconffiles/.Vromrc .Vromrc && ln -s $HOME/src/dotconffiles/.hgrc .hgrc && ln -s $HOME/src/dotconffiles/bin bin

Add to .bashrc

export PYTHONSTARTUP=$HOME/src/dotconffiles/.pythonstartup mkdir -p ~/.ssh && cd ~/.ssh && ln -s $HOME/src/dotconffiles/config config

Install oh-my-zsh this will also set it to default

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

Set it to one I have

mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc

NOTE: Copy over your SSH Keys from your existing machine if you have them and want to carry over your existing SSH configs.

curl -L https://get.rvm.io | bash -s stable

NOTE: Start new shell session to get the new

Install VIM plugins

vim +BundleInstall +qall

Install ruby

rvm install 1.9.3 gem install bundler jekyll rvm notes

Vagrant (check for latest maybe)

cd ~/Downloads wget https://dl.bintray.com/mitchellh/vagrant/Vagrant-1.4.0.dmg

hdiutil mount Vagrant

sudo installer -package /Volumes/Vagrant/Vagrant.pkg -target "/Volumes/Macintosh HD"

hdiutil unmount /Volumes/vagrant

Install Elasticsearch

brew install elasticsearch

Set up the launctl etc, it will ask you to install Java SE 6

brew install node.js npm install -G coffee-script

Some repositories that I will be working upon in forseeable future so check them out

  • beamtous
  • psykidellic-keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment