Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Mac from scratch

Install Software

Install from App Store

Install from Third-Party Websites


Mensch coding font


Folders of interest

mkdir -p ~/{Projects,Virtualenvs}


Install Homebrew

ruby -e "$(curl -fsSL"

#Xcode Command Line Tools Xcode > Preferences > Downloads > Command Line Tools

Install Homebrew extension Cask

brew install caskroom/cask/brew-cask

Install applications via Homebrew Cask

for app in atom github vagrant vagrant-manager virtualbox \
           box-sync dropbox slack boot2docker intellij-idea; do
    brew cask install ${app}

Install common applications via Homebrew

brew install ack autojump automake colordiff curl git git-flow gnu-sed gnu-which gnu-tar gnutls \
             gnu-getopt hub icoutils imagemagick libmemcached memcached openssl ossp-uuid qt \
             go readline redis tmux wget scala python node

Node / NPM

npm install -g npm@latest

for app in grunt-cli express bower; do
    npm install -g ${app}

Python setup and configuration

Add the following to ~/.bash_profile this configuration will require all pip executions to be from a virtual env.

# pip should only run if there is a virtualenv currently activated
pip install virtualenvwrapper
# global pip access via `gpip`


for pkg in pip setuptools virtualenv virtualenv awscli glances httpie; do
    gpip install --upgrade ${pkg}

# install virtualenv wrapper
echo "export WORKON_HOME=~/Virtualenvs"
echo "source /usr/local/bin/" >> ~/.extra"

# create the rst documentation virtualenv
mkvirtualenv documentation
pip install sphinx markdown

configure aws-cli

aws configure

AWS KeyCHain Util


sudo gem install aws-keychain-util
aws-creds init
aws-creds add
aws-creds ls


Install custom .dotfiles (optional)

cd ~/
git init
git remote add origin git@${git_home_of_dot_files}
git fetch origin
git checkout -b master --track origin/master
. ~/.bash_profile

OS X Preferences

# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0.02
# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12
# Show the ~/Library folder
chflags nohidden ~/Library
# Store screenshots in subfolder on desktop
mkdir ~/Desktop/Screenshots
defaults write location ~/Desktop/Screenshots


Setup Github

ssh-keygen -t rsa -C "${my_email_address}"

# Copy ssh key to
ssh-add ~/.ssh/

# Test connection
ssh -T

# Set git config values
git config --global "${FULL_NAME}"
git config --global "${GIT_EMAIL}"
git config --global github.user ${GITHUB_USERNAME}
git config --global github.token ${your_github_token_here}

git config --global core.editor "vim"
git config --global color.ui true



# for remote docker servers/shared build/docker env
export DOCKER_HOST=tcp://

#for boot2docker local
boot2docker init
boot2docker up
export DOCKER_CERT_PATH=/Users/`whoami`/.boot2docker/certs/boot2docker-vm
export DOCKER_HOST=tcp://${address_of_boot2docker_or_remote_docker_instance}


brew install postgres --no-ossp-uuid --with-python
brew pin postgres

PostgreSQL Settings

# Initialize db if none exists already
initdb /usr/local/var/postgres

# Create launchctl script
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/*/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/

# Edit launchctl script (set to not start automatically and keepalive false)
mvim ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

# Inject launchctl script
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

# Start PostgreSQL
launchctl start pg

# Create DB
createdb `whoami`

This comment has been minimized.

Copy link
Owner Author

@zircote zircote commented Apr 5, 2016

El Capitan:
gem install nokogiri -- --use-system-libraries


This comment has been minimized.

Copy link

@kvengala kvengala commented Mar 27, 2017

The virtual environment set up the line
echo "source /usr/local/bin/" >> ~/.extra"

The line should be
echo "source /usr/local/bin/ >> ~/.extra"

to start the virtual environment,
the commands must be executed in the following order.

source which
source ~/.bash_profile

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