Skip to content

Instantly share code, notes, and snippets.

@jbnunn
Created September 18, 2012 14:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbnunn/3743541 to your computer and use it in GitHub Desktop.
Save jbnunn/3743541 to your computer and use it in GitHub Desktop.
Clean Install – Mountain Lion OS X 10.8 DP3

#Mac OS X

Mensch coding font

Apps

#Xcode Command Line Tools

Xcode > Preferences > Downloads > Command Line Tools

Chrome

Pendule Plugin

#Shell

Switch to z-shell

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

Update .zshrc

subl ~/.zshrc
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="kphoen"
plugins=(git osx rails ruby github node npm brew)
source $ZSH/oh-my-zsh.sh
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/usr/X11/bin

Install rvm

curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable

Install rubies

rvm get head
rvm install 1.9.3
rvm --default use 1.9.3

OS X Preferences

#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

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

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

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

#Show Path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true

#Show Status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true

#Show indicator lights for open applications in the Dock
defaults write com.apple.dock show-process-indicators -bool true

#Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true

#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

#Disable disk image verification
defaults write com.apple.frameworks.diskimages skip-verify -bool true &&
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true &&
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true

#Disable Safari’s thumbnail cache for History and Top Sites
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2

#Enable Safari’s debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true

#Disable the Ping sidebar in iTunes
defaults write com.apple.iTunes disablePingSidebar -bool true

#Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

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

#Disable ping dropdowns
defaults write com.apple.iTunes hide-ping-dropdown true

Set hostname

sudo scutil --set HostName Work

#Homebrew

/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
brew install git ack wget curl memcached libmemcached readline sqlite gdbm pkg-config

Mongo

brew install mongodb

MongoDB Preferance Pane

Git

git config core.editor "nano"
git config --global user.email "jbnunn@gmail.com"
git config --global user.name "J. Nunn"

Create a global .gitignore file in ~/.gitignore_global, then git config --global core.excludesfile ~/.gitignore_global

# OS generated files #
######################
.DS_Store
.DS_Store?
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

Install python

brew install python --framework --universal

Add into your ~/.zshrc

export PATH=/usr/local/share/python:$PATH

Change system symlinks

cd /System/Library/Frameworks/Python.framework/Versions
sudo rm Current
ln -s /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/Current

#Git

Setup Github

ssh-keygen -t rsa -C "g3dinua@gmail.com"

#copy ssh key to github.com
subl ~/.ssh/id_rsa.pub

#test connection
ssh -T git@github.com

#set git config values
git config --global user.name "Bohdan Viter"
git config --global user.email "g3dinua@gmail.com"
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 2.app/Contents/SharedSupport/bin/subl" "/usr/local/bin/subl"

Install Package Control

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

Install Soda Theme

git clone git://github.com/buymeasoda/soda-theme.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Theme\ -\ Soda

Install Tomorrow Theme

git clone git://github.com/chriskempson/textmate-tomorrow-theme.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Color\ Scheme\ -\ Tomorrow

Settings

{
  "close_windows_when_empty": true,
  "color_scheme": "Packages/Color Scheme - Tomorrow/Tomorrow-Night-Eighties.tmTheme",
  "font_face": "Mensch",
  "font_size": 12,
  "highlight_modified_tabs": true,
  "show_tab_close_buttons": false,
  "tab_size": 2,
  "theme": "Soda Light.sublime-theme",
  "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?",
  "translate_tabs_to_spaces": 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"} }
]

Snippets

git clone git@github.com:bytestudios/sublime-snippets.git "/Users/jbnunn/Library/Application Support/Sublime Text 2/Packages/Byte"

XAMPP

XAMPP for local development

Add entry to /etc/hosts

127.0.0.1 somesite.dev

Uncomment, in /Applications/XAMPP/etc/httpd.conf,

Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

Enable Virtual Hosts /Applications/XAMPP/etc/extra/httpd-vhosts.conf: NameVirtualHost *:80

<VirtualHost *:80>
  DocumentRoot "/Users/jbnunn/www"
  ServerName localhost
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "/Users/jbnunn/www/somesite"
  ServerName somesite.dev
  ServerAlias www.somesite.dev
</VirtualHost>

Ruby/Rails stuff

Ruby + Rails via RVM

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

Redis

brew install redis
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/redis/2.4.17/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

ImageMagick

brew install -f imagemagick --disable-openmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment