Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Last active July 24, 2023 08:16
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save ericboehs/1052590 to your computer and use it in GitHub Desktop.
Save ericboehs/1052590 to your computer and use it in GitHub Desktop.
What I do after a fresh install of Mac OS X

How I setup my machine after a fresh install

Download and Install Applications

  1. Install Dropbox
  2. Install 1Password
  3. Install Alfred
  4. Install Skype
  5. Install iTerm
  6. Install Cloud App
  7. Install BetterTouchTool
  8. Install iStatMenus
  9. Install SafariTabSwitching for Safari

System Preferences

  1. Keyboard -> Keyboard Repeat Rate/Delay Until Repeat -> All the way
  2. Keyboard -> Keyboard -> Modifier Keys -> Remap Caps to Ctrl
  3. Keyboard Shortcuts -> Full Keyboard Access -> All controls (Control+F7)
  4. Mouse -> Increase tracking all the way
  5. Trackpad:
    1. (Point & Click) Increase Tracking Speed all the way
    2. (Point & Click) Turn on Tap to Click
    3. (Scroll & Zoom) Turn off Rotate and Zoom in or out
    4. (More Gestures) Set Swipe between pages to 2/3 finger swipes (I use BetterTouchTool to bind three finger swipes to something else)
  6. Sharing -> Enable:
    1. Screen Sharing
    2. Remote Login
  7. Date & Time -> Clock -> Uncheck show date and time (I use the clock in iStat Menus)
  8. Time Machine -> Enable (Backs up to my time capsule)
  9. Universal Access -> Check Enable access for assistive devices (for Divvy)

Finder & Dock

  1. Finder -> Change layout view to Columns (Cmd-3)
  2. Finder -> Preferences -> Advanced -> Uncheck "Show warning before emptying the Trash"
  3. Dock Order: App Store, Mail, Messages, Safari, Reminders, Notes, iTerm | Downloads, Trash
  4. Menubar Order: Dropbox, CloudApp, iStat Network, iStat Memory, iStat CPU, Wifi, Sound, iStat Battery, iStat Date/Time, Spotlight, Notification Center

Dropbox

  1. Choose the location of my Dropbox (/Volumes/Dropbox)
  2. Use black and white menu bar icons
  3. Selective sync (none of my git repos in Code/)

1Password

  1. Setup my keychain from my Dropbox
  2. Install Safari extension from the settings

Alfred

  1. Enable the Powerpack
  2. General -> Change "Alfred hotkey" to Ctrl-Space
  3. General -> Change "Where are you" to US
  4. Advanced -> Keyboard -> Cmd + Enter -> Search with default web search
  5. Appearance:
    1. Theme -> Install my all white theme
    2. Options:
      1. Check Hide hat on Alfred window
      2. Check Hide prefs cog on Alfred window
      3. Check Hide menu bar icon
      4. Check Remember window position
      5. I want to see: 9 visible result items
  6. Features:
    1. Default Results -> Search Scope -> Add my Dropbox Volume
    2. Applications -> Partial matching for Applications
    3. Fallback Searches -> Uncheck Wikipedia and Amazon
    4. Fallback Searches -> Hide alfred didn't find what I was looking for...
    5. Calculator -> Enable advanced calculator with keyword '='
    6. Spelling -> Paste word on action
    7. iTunes -> Clear miniplayer shortcut (conflicts with my editor)
    8. iTunes -> Hide Mini Player after selecting song
    9. Clipboard -> Enable and Persist for: 3 Month
    10. Clipboard -> Change shortcut to Alt double tap
    11. Enable 1Password bookmarks
    12. System Commands -> File System -> Check Eject and Eject All
    13. File Navigation -> Advanced -> Check Escape path on 'Copy path to Clipboard' action
    14. Terminal/Shell -> Application -> iTerm2
    15. Terminal/Shell -> Prefix -> $
  7. Extensions:
    1. Install Alfred Install Extension
    2. Install and configure Nest Thermostat
    3. Install VPN Toggle
    4. Install Bluetooth Toggle
    5. Install Screen Sharing for Alfred
    6. Install Layouts
    7. Install Open Last Downloaded File
    8. Install Rdio Controls

CloudApp

  1. Launch at login

iTerm

  1. Import my Thayer theme
  2. Uncheck "Confirm Quit iTerm2 command"

Skype

  1. General -> Uncheck Show status in menu bar
  2. Calls -> Default Country -> United States
  3. Notifications -> Event: Contact Becomes Available -> Uncheck "Play sound" and "Display built-in visual notification"
  4. Notifications -> Event: Contact Becomes Unavailable -> Uncheck "Display built-in visual notification"
  5. Advanced -> Check Display technical call information

Unix/Command Line

  1. Make admin need no password:

     sudo visudo #Then in vim: :34 <Enter> $biNOPASSWD:^[:x <Enter>
    
  2. Install Command Line Tools for Xcode

  3. Install homebrew /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

  4. brew install git ruby tmux ctags ack htop-osx elinks memcached node postgresql redis watch zsh

  5. gem install bundler --pre

  6. gem install tmuxinator hub heroku capistrano nest_thermostat

#!/usr/bin/env zsh
successfully() {
$* || (echo "failed" 1>&2 && exit 1)
}
echo "Checking for SSH key, generating one if it doesn't exist ..."
[[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa
echo "Copying public key to clipboard. Paste it into your Github account ..."
[[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | pbcopy
successfully open https://github.com/account/ssh
echo "Fixing permissions ..."
successfully sudo chown -R `whoami` /usr/local
echo "Installing Homebrew, a good OS X package manager ..."
successfully ruby <(curl -fsS https://raw.github.com/mxcl/homebrew/go)
successfully brew update
echo "Putting Homebrew location earlier in PATH ..."
successfully echo "
# recommended by brew doctor
export PATH='/usr/local/bin:$PATH'" >> ~/.zshenv
successfully source ~/.zshenv
echo "Installing GNU Compiler Collection and dependencies ..."
successfully brew tap homebrew/dupes
successfully brew install autoconf automake apple-gcc42
echo "Installing libksba, recommended for Ruby 1.9.3 ..."
successfully brew install libksba
echo "Installing Postgres, a good open source relational database ..."
successfully brew install postgres
successfully initdb /usr/local/var/postgres -E utf8
echo "Installing ack, for searching the contents of files ..."
successfully brew install ack
echo "Installing ctags, for indexing files for vim tab completion of methods, classes, variables ..."
successfully brew install ctags
echo "Installing tmux, for saving project state and switching between projects ..."
successfully brew install tmux
echo "Installing reattach-to-user-namespace, for copy-paste and RubyMotion compatibility with tmux ..."
successfully brew install reattach-to-user-namespace
echo "Installing ImageMagick, for cropping and re-sizing images ..."
successfully brew install imagemagick
echo "Installing watch, used to execute a program periodically and show the output ..."
successfully brew install watch
echo "Installing Ruby 1.9.3-p327 ..."
successfully brew install ruby
echo "#TODO: Add ruby to $PATH"
echo "Installing critical Ruby gems for Rails development ..."
successfully gem install bundler rails pg foreman rake --no-rdoc --no-ri
echo "Installing standalone Heroku CLI client. You'll need administrative rights on your machine ..."
successfully curl -s https://toolbelt.heroku.com/install.sh | sh
echo "Installing the heroku-config plugin for pulling config variables locally to be used as ENV variables ..."
successfully /usr/local/heroku/bin/heroku plugins:install git://github.com/ddollar/heroku-config.git
echo "Your shell will now restart in order for changes to apply."
exec $SHELL -l
# Menu bar: disable transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Restart automatically if the computer freezes
systemsetup -setrestartfreeze on
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
# 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
# Increase sound quality for Bluetooth headphones/headsets
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Enable access for assistive devices
echo -n 'a' | sudo tee /private/var/db/.AccessibilityAPIEnabled > /dev/null 2>&1
sudo chmod 444 /private/var/db/.AccessibilityAPIEnabled
# Use scroll gesture with the Ctrl (^) modifier key to zoom
defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144
# Follow the keyboard focus while zoomed in
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true
# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0
# 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
# 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
# Enable subpixel font rendering on non-Apple LCDs
defaults write NSGlobalDomain AppleFontSmoothing -int 2
# When performing a search, search the current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Empty Trash securely by default
defaults write com.apple.finder EmptyTrashSecurely -bool true
# Enable AirDrop over Ethernet and on unsupported Macs running Lion
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Show the ~/Library folder
chflags nohidden ~/Library
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Add iOS Simulator to Launchpad
ln -s /Applications/Xcode.app/Contents/Applications/iPhone\ Simulator.app /Applications/iOS\ Simulator.app
# Set Safari’s home page to `about:blank` for faster loading
defaults write com.apple.Safari HomePage -string "about:blank"
# Allow hitting the Backspace key to go to the previous page in history
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true
# Hide Safari’s bookmarks bar by default
defaults write com.apple.Safari ShowFavoritesBar -bool false
# 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
# Make Safari’s search banners default to Contains instead of Starts With
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
# Remove useless icons from Safari’s bookmarks bar
defaults write com.apple.Safari ProxiesInBookmarksBar "()"
# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Allow installing user scripts via GitHub or Userscripts.org
defaults write com.google.Chrome ExtensionInstallSources -array "https://*.github.com/*" "http://userscripts.org/*"
defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://*.github.com/*" "http://userscripts.org/*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment