Skip to content

Instantly share code, notes, and snippets.

@rougeth
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rougeth/9301673 to your computer and use it in GitHub Desktop.
Save rougeth/9301673 to your computer and use it in GitHub Desktop.

Copied and modified from Zeno Rocha's OS X Maverick setup guide


1. Run Software Update

Make sure everything is up to date.

Software Update

2. Install Xcode and its "Command Line Tools"

  1. Go to App Store and install Xcode.
  2. Open and accept the terms
  3. Then go to the terminal and install "Command Line Tools":
xcode-select --install

Notice this only works for Mac OS X Mavericks (10.9). For earlier versions, continue to use the in-app download in Xcode.

3. Configuring OS X

curl -L https://gist.github.com/rougeth/9301673/raw/osx-conf.sh | sh

4. Install softwares

Install Homebrew:

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

Many softwares can be installed through homebrew-cask which makes the process way simpler:

curl -L https://gist.github.com/rougeth/9301673/raw/osx-brew.sh | sh

What's included?

Browser
Development
Others

Unfortunately some apps aren't available through homebrew-cask, so you need to install it manually:

App Store
Brew

5. Configuring...

iTerm2 colors

Hybrid iTerm2 colors

$ curl -L https://gist.github.com/luan/6362811/raw/Hybrid.itermcolors | open

# OS X settings
# -----------------------------------------------------------------------------
# Ask for the administrator password upfront
sudo -v
# General UI/UX
# -------------
# Disable the sound effects on boot
sudo nvram SystemAudioVolume=" "
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Always show scrollbars
defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic"
# Possible values: `WhenScrolling`, `Automatic` and `Always`
# Disable opening and closing window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
# Save to disk (not to iCloud) by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Reveal IP address, hostname, OS version, etc. when clicking the clock
# in the login window
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
# Disable smart quotes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
# Disable smart dashes as they’re annoying when typing code
defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
# disable dashboard
defaults write com.apple.dashboard mcx-disabled -boolean YES
# SSD-specific tweaks
# -------------------
# Disable hibernation (speeds up entering sleep mode)
# sudo pmset -a hibernatemode 0
# Trackpad, mouse, keyboard, Bluetooth accessories, and input
# -----------------------------------------------------------
# Trackpad: enable tap to click for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Automatically illuminate built-in MacBook keyboard in low light
defaults write com.apple.BezelServices kDim -bool true
# Turn off keyboard illumination when computer is not used for 5 minutes
defaults write com.apple.BezelServices kDimTime -int 300
# Stop iTunes from responding to the keyboard media keys
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null
# Screen
# ------
# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Save screenshots to the desktop
defaults write com.apple.screencapture location -string "${HOME}/Desktop"
# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"
# Enable HiDPI display modes (requires restart)
# sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true
# Install softwares
# -----------------------------------------------------------------------------
# homebrew-cask
brew tap phinze/homebrew-cask
brew install brew-cask
# Browser
brew cask install firefox
brew cask install google-chrome
# Development
brew cask install iterm2
brew cask install virtualbox
# Others
brew cask install alfred
brew cask install dropbox
brew cask install mou
brew cask install transmission
# Brew
brew install nodejs
brew install python
brew install python3
brew install tree
brew install wget
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment