Instantly share code, notes, and snippets.
Save kimmobrunfeldt/350f4898d1b82cf10bce to your computer and use it in GitHub Desktop.
Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.
I don't want:any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).
These are my opinions. Read this document through and pick up the good parts to your preferences.
Save the following commands assystem-preferences.sh
and runbash system-preferences.sh
################################################################################ General ################################################################################echo"Add some Finnish localization"defaults write NSGlobalDomain AppleLocale -string"fi_FI"defaults write NSGlobalDomain AppleMeasurementUnits -string"Centimeters"defaults write NSGlobalDomain AppleMetricUnits -booltrueecho"Disable the 'Are you sure you want to open this application?' dialog"defaults write com.apple.LaunchServices LSQuarantine -boolfalseecho"Disable Notification Center and remove the menu bar icon"launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plistecho"Disable auto-correct"defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -boolfalseecho"Show percentage in battery status"defaults write com.apple.menuextra.battery ShowPercent -string"YES"defaults write com.apple.menuextra.battery ShowTime -string"NO"echo"Fix fonth smoothing"defaults -currentHost write -globalDomain AppleFontSmoothing -int 0echo"Enable repeat on keydown"defaults write -g ApplePressAndHoldEnabled -boolfalseecho"Use current directory as default search scope in Finder"defaults write com.apple.finder FXDefaultSearchScope -string"SCcf"echo"Show Path bar in Finder"defaults write com.apple.finder ShowPathbar -booltrueecho"Show Status bar in Finder"defaults write com.apple.finder ShowStatusBar -booltrueecho"Set a blazingly fast keyboard repeat rate"defaults write NSGlobalDomain KeyRepeat -int 0.02echo"Set a shorter Delay until key repeat"defaults write NSGlobalDomain InitialKeyRepeat -int 12echo"Show the ~/Library folder"chflags nohidden~/Libraryecho"Disable rubberband scrolling"defaults write -g NSScrollViewRubberbanding -boolfalseecho"Disable dashboard"defaults write com.apple.dashboard mcx-disabled -boolean YESecho"Move dock to left side of screen"defaults write com.apple.dock orientation -string leftecho"Hide dock automatically"defaults write com.apple.dock autohide -booleantrue# I actually didn't get this working.. ideas?echo"Set Dock auto-hide delay"defaults write com.apple.dock autohide-delay 0echo"Show all filename extensions in Finder"defaults write NSGlobalDomain AppleShowAllExtensions -booltrueecho"Expand save panel by default"defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -booltrueecho"Expand print panel by default"defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -booltrueecho"Avoid creating .DS_Store files on network volumes"defaults write com.apple.desktopservices DSDontWriteNetworkStores -booltrueecho"Disable the warning when changing a file extension"defaults write com.apple.finder FXEnableExtensionChangeWarning -boolfalseecho"Require password after a minute after sleep or screen saver begins"defaults write com.apple.screensaver askForPassword -int 1defaults write com.apple.screensaver askForPasswordDelay -int 60echo"Use list view in all Finder windows by default"echo"Four-letter codes for the other view modes: icnv, Nlmv, Flwv"defaults write com.apple.finder FXPreferredViewStyle -string"Nlmv"echo"Remove default text from basic screen saver"defaults write~/Library/Preferences/com.apple.ScreenSaver.Basic MESSAGE""echo"Disable sound effect when changing volume"defaults write -g com.apple.sound.beep.feedback -integer 0echo"Disable user interface sound effects"defaults write com.apple.systemsound'com.apple.sound.uiaudio.enabled' -int 0echo"Set system sounds volume to 0"defaults write com.apple.systemsound com.apple.sound.beep.volume -float 0################################################################################ Trackpad, Mouse, Keyboard, Gestures ################################################################################echo"Enable tap to click (Trackpad)"defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -booltruedefaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1echo"Use scroll gesture with the Ctrl (^) modifier key to zoom"defaults write com.apple.universalaccess closeViewScrollWheelToggle -booltruedefaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144echo"Follow mouse when zoomed in"defaults write com.apple.universalaccess closeViewPanningMode -int 0echo"Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"defaults write NSGlobalDomain AppleKeyboardUIMode -int 3echo"Tap with two fingers to emulate right click"defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -booltrueecho"Disable three finger drag"defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -boolfalseecho"Disable automatic rearrangement of spaces based on most recent usage"defaults write com.apple.dock mru-spaces -boolfalse# For reference# echo "Save screenshots to the desktop"# defaults write com.apple.screencapture location -string "$HOME/Desktop"################################################################################ Activity monitor ################################################################################echo"Sort Activity Monitor results by CPU usage"defaults write com.apple.ActivityMonitor SortColumn -string"CPUUsage"defaults write com.apple.ActivityMonitor SortDirection -int 0echo"Kill affected applications, so the changes apply"forappin Safari Finder Dock Mail SystemUIServer;do killall"$app">/dev/null2>&1;done
After that, you have to do some settings manually. At least on clean Mavericks,these settings did not have effect when usingdefaults write
Keyboard > Shortcuts > Keyboard
: Move focus to next window shortcut to⌘+§
Accessibility > Mouse & Trackpad > Trackpad
: enable dragging with drag lockTrackpad
I recommend usingprofiles in Chrome
Atom is a new text editor by GitHub. It has a huge community, which I think will lead to death of Sublime Text.Update: Except it is currently painfully slow compared to Sublime Text :(
Good replacement for spotlight
Important: Homebrew and many other tools need this installed
Very good group chat for teams, which has integrations to GitHub, Trello etc.
Much better than default Terminal.app
Productivity app for creating gesture/mouse/keyboard shortcuts to about any action you can imagine. For example I have binded 3 finger tap to middle click, 3 finger left/right swipes to changing browser/text editor tabs and more.
I tested moom as an alternative, but BetterTouchTool has more features and is free. BetterTouchTool also ships with akiller feature that I've missed most from Ubuntu(Gnome), check it out:https://www.youtube.com/watch?v=wUeKjkpBdCo
Replaces bash.
Brew is essential for installing libraries and developer stuff easily.
Install some basic tools:
brew install git wget
Instead of
cd ~/code/personal/projects/secret/mysecretproject
you can justz mysecretproject
. Fast.Install:
mkdir ~/.bin cd ~/.bin git clone https://github.com/rupa/z.git echo "source ~/.bin/z/z.sh" >> ~/.zshrc
Useful helper commands/aliases for git and others
When you have difficult binaries to install like OpenCV or other complicated, it might be easier to install them to a vagrant box. Sometimes you just want to
sudo apt-get install python-opencv python-numpy
.If you don't want to pollute your OS X with tons of libraries and binaries(e.g. ruby gems/python packages), you can always spin up a vagrant box. For example you could have one vagrant box for running Python software and another for Ruby.
"Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications."
"Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud."
OS X ships with its own Python but I recommend installing Python with brew. It makes setupping pip and other Python tools easier.
Make sure that your brew installed Python is the one that you are running.If
which python
outputs/usr/bin/python
. Then you need to add/usr/local/bin
to your PATH before/usr/bin
.After installing virtualenv with pip,install also mkvirtualenvfor your convenience.
Install with: pkg, brew or nvm. I prefer brew.
Postgres
Mavericks does not have Postgres installed by default anymore:http://stackoverflow.com/questions/19611505/does-postgresql-exist-on-os-x-mavericks
I think usinghttp://postgresapp.com is the preferred way. Using brew might be fine also, don't know.
Windows virtual machines with IE versions
Microsoft provides virtual machines for different Windows + IE version combinations for your testing convenience.
I stole many of the information from these sources:
ryanmaclean commentedOct 21, 2014
You might like Homebrew Caskroom!https://github.com/caskroom/homebrew-cask
Think homebrew, but for apps that are distributed via DMG. It solves the vagrant and docker post-install actions, for example.
I'm redoing my Yosemite install and figured that I'd give you a heads-up :)
Looks very nice! Thanks :)
AlJohri commentedNov 2, 2014
for a selection of common apps installable via homebrew-cask check out my setup scripthttps://github.com/AlJohri/dotfiles/blob/master/setup-homebrew.sh#L140
macmladen commentedFeb 8, 2015
I've stumbled upon this in same search and it seem quality add on to your own steps:
http://fredkelly.net/articles/2014/10/19/developing_on_yosemite.html