Skip to content

Instantly share code, notes, and snippets.

Last active March 19, 2024 15:21
Show Gist options
  • Save saetia/1623487 to your computer and use it in GitHub Desktop.
Save saetia/1623487 to your computer and use it in GitHub Desktop.
Clean Install – OS X 10.11 El Capitan

OS X Preferences

most of these require logout/restart to take effect

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

# Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0

# Disable window animations ("new window" scale effect)
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

# Turn on dashboard-as-space
defaults write enabled-state 2

# Use plain text mode for new TextEdit documents
defaults write RichText -int 0

# Make top-right hotspot start screensaver
defaults write wvous-tr-corner -int 5 && \
defaults write wvous-tr-modifier -int 0

# Set default Finder location to home folder (~/)
defaults write NewWindowTarget -string "PfLo" && \
defaults write NewWindowTargetPath -string "file://${HOME}"

# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

# Disable ext change warning
defaults write FXEnableExtensionChangeWarning -bool false

# Check for software updates daily, not just once per week
defaults write ScheduleFrequency -int 1

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

# Show Path bar in Finder
defaults write ShowPathbar -bool true

# Show Status bar in Finder
defaults write ShowStatusBar -bool true

# Show icons for hard drives, servers, and removable media on the desktop
defaults write ShowExternalHardDrivesOnDesktop -bool true && \
defaults write ShowHardDrivesOnDesktop -bool true && \
defaults write ShowMountedServersOnDesktop -bool true && \
defaults write ShowRemovableMediaOnDesktop -bool true

# Avoid creating .DS_Store files on network volumes
defaults write DSDontWriteNetworkStores -bool true

# Disable disk image verification
defaults write skip-verify -bool true && \
defaults write skip-verify-locked -bool true && \
defaults write skip-verify-remote -bool true

# Trackpad: map bottom right corner to right-click
defaults write TrackpadCornerSecondaryClick -int 2 && \
defaults write TrackpadRightClick -bool true && \
defaults -currentHost write NSGlobalDomain -int 1 && \
defaults -currentHost write NSGlobalDomain -bool true

# Enable the Develop menu and the Web Inspector in Safari
defaults write IncludeInternalDebugMenu -bool true && \
defaults write IncludeDevelopMenu -bool true && \
defaults write WebKitDeveloperExtrasEnabledPreferenceKey -bool true && \
defaults write -bool true && \
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

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

# Show absolute path in finder's title bar. 
defaults write _FXShowPosixPathInTitle -bool YES

# Auto-play videos when opened with QuickTime Player
defaults write MGPlayMovieOnOpen 1

# Enable AirDrop over Ethernet and on unsupported Macs
defaults write BrowseAllInterfaces -bool true

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


####Switch to z-shell

curl -L | sh


# install package manager
/usr/bin/ruby -e "$(curl -fsSL"

# install homebrew packages
brew install \
tree \
node \
ssh-copy-id \
wget \
jpegoptim \
pngcrush \
colordiff \
ghostscript \
imagemagick --with-ghostscript \
graphicsmagick \

####Homebrew Web Server Packages

brew install \
dnsmasq \
nginx \
mariadb \
redis \
memcached \
libmemcached \

####Homebrew Cask Apps & Fonts

# add support for fonts
brew tap caskroom/fonts

#add dev/beta versions
brew tap caskroom/versions

#install mac apps & fonts
brew cask install \
font-source-code-pro \
adobe-creative-cloud \
blueharvest \
cleanmymac \
cocktail \
ghostlab \
coda \
sublime-text-dev \
virtualbox \
coderunner \
google-chrome \
firefox \
codekit \
iterm2-beta \
sequel-pro \
querious \
imageoptim \
imagealpha \
xquartz \
simpholders-2-alpha \
handbrake \
vagrant \
ksdiff \

####Update .zshrc

wget -O \

#syntax highlighting
git clone git:// \

####Set hostname

sudo scutil --set HostName Work

###Agree To Xcode

sudo xcrun cc


####Setup Github

ssh-keygen -t rsa -C ""

#copy ssh key to clipboard for adding to
pbcopy < ~/.ssh/

#test connection
ssh -T

#set git config values
git config --global "Joel Glovacki" && \
git config --global "" && \
git config --global github.user saetia && \
git config --global core.editor "subl -w" && \
git config --global color.ui true && \
git config --global push.default simple

git config --global github.token your_token_here
brew install diff-so-fancy
git config --global pager.diff "diff-so-fancy | less --tabs=4 -RFX" && \
git config --global "diff-so-fancy | less --tabs=4 -RFX"


####Install markdown support

git clone \
~/Library/Application\ Support/Coda\ 2/modes/Markdown.mode

###Sublime Text

####Install Soda Theme

git clone git:// \
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Theme\ -\ Soda

####Install Tomorrow Night Eighties Themes

#Sublime Text
git clone git:// \
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Color\ Scheme\ -\ Tomorrow

wget \
-O ~/Downloads/Tomorrow\ Night\ Eighties.itermcolors && open ~/Downloads/Tomorrow\ Night\ Eighties.itermcolors

mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes && \
wget -O \
~/Library/Developer/Xcode/UserData/FontAndColorThemes/Tomorrow\ Night\ Eighties.dvtcolortheme


	"close_windows_when_empty": true,
	"color_scheme": "Packages/Color Scheme - Tomorrow/Tomorrow-Night-Eighties.tmTheme",
	"draw_indent_guides": false,
	"font_face": "Source Code Pro",
	"font_size": 22.0,
	"highlight_modified_tabs": true,
	"show_full_path": true,
	"show_tab_close_buttons": false,
	"spell_check": false,
	"tab_size": 2,
	"theme": "Soda Light.sublime-theme",
	"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"

####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"} }


git clone \
~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoB


sudo gem install cocoapods
pod setup


Ruby version manager

curl -L | bash -s stable --rails


gem install pygmentize growl guard guard-phpunit bropages



npm install -g coffee-script bower


vagrant plugin install vagrant-hostsupdater


#switch from SecureTransport
brew reinstall --with-openssl curl

#install php-fpm
brew tap homebrew/dupes && \
brew tap homebrew/versions && \
brew tap homebrew/dupes && \
brew install php70 \
--with-fpm \
--without-apache \
--with-mysql \
--with-homebrew-curl \
--with-homebrew-openssl \ 

#setup daemon
ln -sfv /usr/local/opt/php70/*.plist ~/Library/LaunchAgents && \
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php70.plist


#brew install php70-redis
brew install --HEAD homebrew/php/php70-redis


brew install homebrew/php/php70-imagick


#setup daemon
ln -sfv /usr/local/opt/mariadb/*.plist ~/Library/LaunchAgents && \
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

#initial setup

#secure mariadb


sudo cp -v /usr/local/opt/nginx/*.plist /Library/LaunchDaemons/ && 
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist &&
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist

Local Web Server

Add DNS Domains, Enable dnsmasq daemon

This will route requests to any url ending in .build back to your own computer. The goal is to use urls like for development while you work on

mkdir -pv $(brew --prefix)/etc/ && \
echo 'address=/.build/' > $(brew --prefix)/etc/dnsmasq.conf && \
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons && \
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist && \
sudo mkdir -v /etc/resolver && \
sudo zsh -c 'echo "nameserver" > /etc/resolver/build'

#flush cache
sudo discoveryutil mdnsflushcache && scutil --dns

####Enable virtual hosts

This will allow you to serve folders under ~/Sites/ as websites.

  • ~/Sites
      • htdocs
        • index.html

to access this site, visit

####Match production server paths

sudo mkdir -p /var/ && sudo ln -s ~/Sites /var/www

aww yeah

Copy link

@abecko I have met this problem, do you slove this problem?? turn SIP off ??

Copy link

abecko commented Dec 30, 2015

@jasonsworld No, i don't have a solution. I wan't disable SIP :/

Copy link

Converted this into an Ansible build

Copy link

ryderr commented Jan 8, 2016

thanks for this.

Copy link

can you help me with installing mcrypt and smbclient php extensions?
I have follow all instruction to install it and done it correctly, but after restart I don't see there this two extension. I have installed others also and this I have running in php.


Copy link

chromuh commented Feb 6, 2016


Copy link

gxgani commented Mar 10, 2016

Suggestion: Disable Accented Character menu

defaults write -g ApplePressAndHoldEnabled -bool false

Copy link

This helped alot! Thank you.

Copy link

@abecko @jasonsworld Might be too little, too late, but found a solution to the

warning: pear/PEAR requires package "pear/Archive_Tar"

problem. Seems to have gotten things installed satisfactorily.

sudo php /usr/lib/php/install-pear-nozlib.phar -d /usr/local/lib/php -b /usr/local/bin


if nothing else, maybe it'll help someone else who comes bumbling around these parts. :P

Copy link

It's not that the defaults write command fails. I verified the file, and it wrote the variable to it.
The problem is somewhere in the design. Maybe they have moved it?
I have been looking in the containers and other files but no luck yet.
I hope they didn't completely kill it.
Maybe there is a way to copy the old Yosemite version of QL back?
If I figure it out, I will update here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment