OS X defaults

defaults write com.apple.dock no-glass -boolean true
defaults write com.apple.dock pinning -string start
defaults write com.apple.dock orientation -string right 
defaults write com.apple.dock tilesize -integer 23
defaults write com.apple.dock mineffect -string scale
defaults write com.apple.dock "minimize-to-application" -bool true
killall Dock
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:labelOnBottom" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:labelOnBottom bool false" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:gridSpacing" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:gridSpacing integer 100" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:iconSize" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:iconSize integer 32" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:showIconPreview" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:showIconPreview bool true" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:showItemInfo" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:showItemInfo bool true" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:textSize" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:textSize integer 10" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:viewOptionsVersion" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:viewOptionsVersion bool none" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :DesktopViewSettings:IconViewSettings:arrangeBy" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :DesktopViewSettings:IconViewSettings:arrangeBy string grid" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :ShowHardDrivesOnDesktop" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Add :ShowHardDrivesOnDesktop bool true" ~/Library/Preferences/com.apple.finder.plist
/usr/libexec/PlistBuddy -c "Delete :StandardViewOptions:ColumnViewOptions:ColumnWidth" ~/Library/Preferences/com.apple.finder.plist 
/usr/libexec/PlistBuddy -c "Add :StandardViewOptions:ColumnViewOptions:ColumnWidth integer 320" ~/Library/Preferences/com.apple.finder.plist
killall -u $(whoami) cfprefsd
killall Finder
defaults write com.apple.TextEdit RichText -boolean false
defaults write com.apple.menuextra.battery ShowPercent -bool true
defaults write com.apple.menuextra.battery ShowTime -bool false
defaults write com.apple.menuextra.clock DateFormat -string "E MMM d  h:mm a"
defaults write loginwindow AutoLaunchedApplicationDictionary -array-add '{Path="/Applications/iChat.app";}'
defaults write loginwindow AutoLaunchedApplicationDictionary -array-add '{Path="/Applications/Mail.app";}'
defaults write loginwindow AutoLaunchedApplicationDictionary -array-add '{Path="/Applications/Notational\ Velocity.app";}'
defaults write com.apple.Safari ShowFavoritesBar -bool false
defaults write com.apple.Safari NewWindowBehavior -int 0
defaults write com.apple.Safari NewTabBehavior -int 0
defaults write net.notational.velocity QuitWhenClosingMainWindow -bool false
defaults write com.apple.screensaver askForPassword -bool true
defaults write -g KeyRepeat -integer 1
defaults write -g com.apple.keyboard.fnState -int 1
defaults write -g AppleMiniaturizeOnDoubleClick -bool true
sudo defaults write /Library/Preferences/com.apple.alf globalstate -bool true
sudo defaults write /Library/Preferences/com.apple.driver.AppleIRController DeviceEnabled -bool false
sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -bool false
sudo killall -SIGHUP blued
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.blued.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.locationd.plist
sudo rm -rf /private/etc/ScreenSharing.launchd

Update 1

Just had a reader write in with a Mavericks update: It would appear that the OS X preference cache needs to be flushed after at least the Finder changes. If you’re running into issues with preferences not updating after a defaults change, you may need to do a killall -u $(whoami) cfprefsd to flush the cache. Thanks Mariano!

This is a personal website. Unless otherwise stated, the content and opinions expressed here are my own and not those of my employer.