Create a gist now

Instantly share code, notes, and snippets.

@g3d /gist:2709563 forked from saetia/gist:1623487
Last active Mar 15, 2017

Clean Install – OS X 10.11 El Capitan

#Mac OS X

Mensch coding font


#Xcode Command Line Tools

Xcode > Preferences > Downloads > Command Line Tools


# install package manager
ruby -e "$(curl -fsSL"

# install homebrew packages
brew install \
tree \
node \
ssh-copy-id \
wget \
jpegoptim \
pngcrush \
colordiff \
imagemagick \
graphicsmagick \
ack \

####Homebrew Web Server Packages

brew install \
rabbitmq \
dnsmasq \
nginx \
mariadb \
redis \
memcached \
libmemcached \

####Homebrew Cask Apps & Fonts

# add support for fonts
brew tap caskroom/fonts

#add dev/beta versions
brew tap caskroom/versions

#install mac apps & fonts
brew cask install \
font-source-code-pro \
adobe-creative-cloud \
blueharvest \
cleanmymac \
cocktail \
ghostlab \
coda \
sublime-text-dev \
virtualbox \
coderunner \
google-chrome \
firefox \
codekit \
iterm2-beta \
sequel-pro \
querious \
imageoptim \
imagealpha \
xquartz \
simpholders-2-alpha \
handbrake \
vagrant \
ksdiff \
spotify \


Switch to z-shell

brew install zsh
curl -L | sh

Update .zshrc

subl ~/.zshrc
plugins=(git osx rails3 ruby github node npm brew)
source $ZSH/
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/usr/X11/bin

Install rvm

\curl -L | bash -s stable
rvm requirements

OR Install rbenv

brew install rbenv

Install rubies

rvm install 2.3.0 # OR
rbenv install 2.3.0

OS X Preferences

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0

# Disable window animations ("new window" scale effect)
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

# Turn on dashboard-as-space
defaults write enabled-state 2

# Use plain text mode for new TextEdit documents
defaults write RichText -int 0

# Make top-right hotspot start screensaver
defaults write wvous-tr-corner -int 5 && \
defaults write wvous-tr-modifier -int 0

# Set default Finder location to home folder (~/)
defaults write NewWindowTarget -string "PfLo" && \
defaults write NewWindowTargetPath -string "file://${HOME}"

# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

# Disable ext change warning
defaults write FXEnableExtensionChangeWarning -bool false

# Check for software updates daily, not just once per week
defaults write ScheduleFrequency -int 1

# Use current directory as default search scope in Finder
defaults write FXDefaultSearchScope -string "SCcf"

# Show Path bar in Finder
defaults write ShowPathbar -bool true

# Show Status bar in Finder
defaults write ShowStatusBar -bool true

# Show icons for hard drives, servers, and removable media on the desktop
defaults write ShowExternalHardDrivesOnDesktop -bool true && \
defaults write ShowHardDrivesOnDesktop -bool true && \
defaults write ShowMountedServersOnDesktop -bool true && \
defaults write ShowRemovableMediaOnDesktop -bool true

# Avoid creating .DS_Store files on network volumes
defaults write DSDontWriteNetworkStores -bool true

# Disable disk image verification
defaults write skip-verify -bool true && \
defaults write skip-verify-locked -bool true && \
defaults write skip-verify-remote -bool true

# Trackpad: map bottom right corner to right-click
defaults write TrackpadCornerSecondaryClick -int 2 && \
defaults write TrackpadRightClick -bool true && \
defaults -currentHost write NSGlobalDomain -int 1 && \
defaults -currentHost write NSGlobalDomain -bool true

# Enable the Develop menu and the Web Inspector in Safari
defaults write IncludeInternalDebugMenu -bool true && \
defaults write IncludeDevelopMenu -bool true && \
defaults write WebKitDeveloperExtrasEnabledPreferenceKey -bool true && \
defaults write -bool true && \
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

# Show the ~/Library folder
chflags nohidden ~/Library

# Show absolute path in finder's title bar. 
defaults write _FXShowPosixPathInTitle -bool YES

# Auto-play videos when opened with QuickTime Player
defaults write MGPlayMovieOnOpen 1

# Enable AirDrop over Ethernet and on unsupported Macs
defaults write BrowseAllInterfaces -bool true

# Disable's homepage
defaults write org.webkit.nightly.WebKit StartPageDisabled -bool true

Set hostname

sudo scutil --set HostName Work

Install python

brew install python3

Install virtualenv with pip

pip3 install virtualenv
pip3 install virtualenvwrapper

Source virtualenvwrapper script

VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3 source /usr/local/bin/


Setup Github

ssh-keygen -t rsa -C ""

#copy ssh key to
subl ~/.ssh/

#test connection
ssh -T

#set git config values
git config --global "Bohdan Viter"
git config --global ""
git config --global github.user g3d
git config --global github.token your_token_here

git config --global core.editor "subl -w"
git config --global color.ui true

#Sublime Text

Add Sublime Text CLI

sudo mkdir -p "/usr/local/bin/" && ln -s "/Applications/Sublime Text" "/usr/local/bin/subl"

Install Package Control

import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( '' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)


	"always_show_minimap_viewport": true,
	"bold_folder_labels": true,
	"close_windows_when_empty": true,
	"default_encoding": "UTF-8",
	"default_line_ending": "unix",
	"ensure_newline_at_eof_on_save": true,
	"fallback_encoding": "Cyrillic (Windows 1251)",
	"font_face": "Mensch",
	"font_size": 15,
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"margin": 2,
	"material_theme_accent_lime": true,
	"material_theme_accent_orange": true,
	"material_theme_accent_purple": true,
	"material_theme_accent_red": true,
	"material_theme_accent_yellow": true,
	"material_theme_bold_tab": true,
	"material_theme_disable_fileicons": true,
	"material_theme_disable_folder_animation": true,
	"material_theme_disable_tree_indicator": true,
	"material_theme_small_statusbar": true,
	"material_theme_small_tab": true,
	"open_files_in_new_window": false,
	"overlay_scroll_bars": "enabled",
	"show_full_path": true,
	"show_tab_close_buttons": true,
	"soda_classic_tabs": false,
	"soda_folder_icons": true,
	"spell_check": false,
	"tab_size": 2,
	"translate_tabs_to_spaces": true,
	"trim_trailing_white_space_on_save": true,
	"use_simple_full_screen": true,
	"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?",
	"word_wrap": "true"

Key Bindings

	{ "keys": ["super+b"], "command": "expand_selection", "args": {"to": "brackets"} },
	{ "keys": ["super+f"], "command": "show_panel", "args": {"panel": "replace"} },
	{ "keys": ["super+alt+f"], "command": "show_panel", "args": {"panel": "find"} }


Install pow

curl | sh


brew install mysql

MySQL Settings

# start mysql
mysql.server start

# secure mysql

# connecto to mysql
mysql -uroot


brew install postgres

PostgreSQL Settings

# connect to psql
psql -U `whoami` -d postgres

# create user and databases
createuser user
createdb -Ouser -Eutf8 -T template0 user_development
createdb -Ouser -Eutf8 -T template0 user_test

Manage homebrew installed packages with LaunchRocket

LaunchRocke Screenshot

Enjoy your new OS X!

aww yeah


👍 Thanks for this gist!

1um commented Jun 20, 2013



Thanks man!


Thanks for the gist and the gif lol

gdelfino commented Dec 5, 2013


ysfjwd commented Dec 17, 2013

hey, i wasn't able to launch fastcgi with it ...any idea what i am going wrong ?


I can't get the blazing fast key repeat to work. No matter what I set, no matter how many times I restart, it always seems to be the same. Only changes via system preferences.

lareb commented Jan 16, 2014





postgresql link is dead

just use brew postgresql --without-python


getting this error:
dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib Referenced from: /usr/local/bin/nginx Reason: image not found [1] 39977 trace trap nginx
I had to brew install pcre --universal
to make it work

ghost commented Apr 7, 2014

ruby <(curl -fsSkL
curl: (22) The requested URL returned error: 404 Not Found

that works
ruby -e "$(curl -fsSL"


No need to add python the the path

marnen commented Jun 5, 2014

Two points:

  • The "zsh installation" actually just installs oh-my-zsh.
  • The best way to install Postgres on Mac OS these days is

I gathered my own gist from various sources such as your gist:

diek commented Sep 9, 2014

I am hitting a wall on mysql_install_db. Error: zsh: command not found: mysql_install_db. I have searched but cannot find a solution.


A great addition to this and I recommend you check out and

cschar commented Jan 22, 2016

Thanks a lot! sped up my fresh mac install to dev status


Thanks! +1


Still the best, just got a new MBP from work and set it up using this 👍
Thanks for updating too!

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