Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Clean Install – Mountain Lion OS X 10.8 DP3 Update 4

#Mac OS X

Mensch coding font


Webkit, Chrome, Firefox, iTerm, Transmit, Coda, Sublime Text, Sequel Pro, 1Password, LiveReload, LiveReload Extensions

#Xcode Command Line Tools

Xcode > Preferences > Downloads > Command Line Tools


Switch to z-shell

curl -L | sh

Update .zshrc

wget -O ~/.zshrc

OS X Preferences

#Disable window animations
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false

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

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

#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 indicator lights for open applications in the Dock
defaults write show-process-indicators -bool true

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

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

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

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

#Disable Safari’s thumbnail cache for History and Top Sites
defaults write DebugSnapshotsUpdatePolicy -int 2

#Enable Safari’s debug menu
defaults write IncludeInternalDebugMenu -bool true

#Disable the Ping sidebar in iTunes
defaults write disablePingSidebar -bool true

#Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

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

#Disable ping dropdowns
defaults write hide-ping-dropdown true

Set hostname

sudo scutil --set HostName Work


/usr/bin/ruby -e "$(/usr/bin/curl -fksSL"
brew install git ack wget curl redis memcached libmemcached colordiff imagemagick icoutils


Setup Github

ssh-keygen -t rsa -C ""

#copy ssh key to
subl ~/.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 github.token your_token_here

git config --global core.editor "subl -w"
git config --global color.ui true


Install markdown support

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

#Sublime Text

Add Sublime Text CLI

sudo mkdir -p "/usr/local/bin/" && ln -s "/Applications/Sublime Text" "/usr/local/bin/subl"

Install Package Control

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen(''+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

Install Soda Theme

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

Install Tomorrow Theme

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


	"close_windows_when_empty": true,
	"color_scheme": "Packages/Color Scheme - Tomorrow/Tomorrow-Night-Eighties.tmTheme",
	"draw_indent_guides": false,
	"font_face": "Mensch",
	"font_size": 18,
	"highlight_modified_tabs": true,
	"show_tab_close_buttons": false,
	"tab_size": 2,
	"spell_check": false,
	"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 "/Users/Joel/Library/Application Support/Sublime Text 2/Packages/Byte"


Install dnsmasq

brew install dnsmasq

Add DNS Domains

mkdir -p /usr/local/etc/ &&
echo "address=/build/" >> /usr/local/etc/dnsmasq.conf && 
echo "address=/stage/" >> /usr/local/etc/dnsmasq.conf && 
echo "listen-address=" >> /usr/local/etc/dnsmasq.conf

Enable dnsmasq daemon

sudo cp "/usr/local/Cellar/dnsmasq/2.57/homebrew.mxcl.dnsmasq.plist" "/Library/LaunchDaemons" &&
sudo launchctl load -w "/Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"

Add Localhost to /etc/resolver

sudo -s
sudo mkdir -p /etc/resolver
sudo echo 'nameserver' > /etc/resolver/build

#flush cache
dscacheutil -flushcache

#ensure it works
scutil --dns

Enable virtual hosts

subl "/etc/apache2/users/$USER.conf"
DocumentRoot "/Users/Joel/Sites/"
NameVirtualHost *:80
<Directory "/Users/Joel/Sites/">
    Options Indexes MultiViews FollowSymLinks Includes
    AllowOverride All
    Order allow,deny
    Allow from all
<VirtualHost *:80>
    UseCanonicalName off
    VirtualDocumentRoot /Users/Joel/Sites/%-2+/httpdocs
#open apache config
subl "/etc/apache2/httpd.conf"

Configure httpd.conf

ServerRoot "/usr"

Listen 80

LoadModule authn_file_module libexec/apache2/
LoadModule authn_dbm_module libexec/apache2/
LoadModule authn_anon_module libexec/apache2/
LoadModule authn_dbd_module libexec/apache2/
LoadModule authn_default_module libexec/apache2/
LoadModule authz_host_module libexec/apache2/
LoadModule authz_groupfile_module libexec/apache2/
LoadModule authz_user_module libexec/apache2/
LoadModule authz_dbm_module libexec/apache2/
LoadModule authz_owner_module libexec/apache2/
LoadModule authz_default_module libexec/apache2/
LoadModule auth_basic_module libexec/apache2/
LoadModule auth_digest_module libexec/apache2/
LoadModule cache_module libexec/apache2/
LoadModule disk_cache_module libexec/apache2/
LoadModule mem_cache_module libexec/apache2/
LoadModule dbd_module libexec/apache2/
LoadModule dumpio_module libexec/apache2/
LoadModule reqtimeout_module libexec/apache2/
LoadModule ext_filter_module libexec/apache2/
LoadModule include_module libexec/apache2/
LoadModule filter_module libexec/apache2/
LoadModule substitute_module libexec/apache2/
LoadModule deflate_module libexec/apache2/
LoadModule log_config_module libexec/apache2/
LoadModule log_forensic_module libexec/apache2/
LoadModule logio_module libexec/apache2/
LoadModule env_module libexec/apache2/
LoadModule mime_magic_module libexec/apache2/
LoadModule cern_meta_module libexec/apache2/
LoadModule expires_module libexec/apache2/
LoadModule headers_module libexec/apache2/
LoadModule ident_module libexec/apache2/
LoadModule usertrack_module libexec/apache2/
#LoadModule unique_id_module libexec/apache2/
LoadModule setenvif_module libexec/apache2/
LoadModule version_module libexec/apache2/
LoadModule proxy_module libexec/apache2/
LoadModule proxy_connect_module libexec/apache2/
LoadModule proxy_ftp_module libexec/apache2/
LoadModule proxy_http_module libexec/apache2/
LoadModule proxy_scgi_module libexec/apache2/
LoadModule proxy_ajp_module libexec/apache2/
LoadModule proxy_balancer_module libexec/apache2/
LoadModule ssl_module libexec/apache2/
LoadModule mime_module libexec/apache2/
LoadModule dav_module libexec/apache2/
LoadModule status_module libexec/apache2/
LoadModule autoindex_module libexec/apache2/
LoadModule asis_module libexec/apache2/
LoadModule info_module libexec/apache2/
LoadModule cgi_module libexec/apache2/
LoadModule dav_fs_module libexec/apache2/
LoadModule vhost_alias_module libexec/apache2/
LoadModule negotiation_module libexec/apache2/
LoadModule dir_module libexec/apache2/
LoadModule imagemap_module libexec/apache2/
LoadModule actions_module libexec/apache2/
LoadModule speling_module libexec/apache2/
LoadModule userdir_module libexec/apache2/
LoadModule alias_module libexec/apache2/
LoadModule rewrite_module libexec/apache2/
#LoadModule perl_module libexec/apache2/
LoadModule php5_module libexec/apache2/
#LoadModule hfs_apple_module libexec/apache2/

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User _www
Group _www



ServerName localhost

DocumentRoot "/Library/WebServer/Documents"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all

<Directory "/Library/WebServer/Documents">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

<IfModule dir_module>
    DirectoryIndex index.php index.html

<FilesMatch "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
    Order allow,deny
    Deny from all
    Satisfy All

<Files "rsrc">
    Order allow,deny
    Deny from all
    Satisfy All

<DirectoryMatch ".*\.\.namedfork">
    Order allow,deny
    Deny from all
    Satisfy All

ErrorLog "/private/var/log/apache2/error_log"

LogLevel warn

<IfModule log_config_module>

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

    CustomLog "/private/var/log/apache2/access_log" common


<IfModule alias_module>
    ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1"

<IfModule cgid_module>

<Directory "/Library/WebServer/CGI-Executables">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

DefaultType text/plain

<IfModule mime_module>

    TypesConfig /private/etc/apache2/mime.types

    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz


TraceEnable off

Include /private/etc/apache2/extra/httpd-mpm.conf
Include /private/etc/apache2/extra/httpd-autoindex.conf
Include /private/etc/apache2/extra/httpd-languages.conf
Include /private/etc/apache2/extra/httpd-userdir.conf
Include /private/etc/apache2/extra/httpd-manual.conf

<IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin

<IfModule php5_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
        DirectoryIndex index.html index.php

Include /private/etc/apache2/other/*.conf

Enable centOS style /var/www/vhosts

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


brew install


brew install mysql

MySQL Settings

#setup daemon
mkdir -p ~/Library/LaunchAgents && cp /usr/local/Cellar/mysql/5.5.20/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ && launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

#Set up databases to run as your user account
unset TMPDIR && mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

#start mysql
mysql.server start

#secure mysql

Configure php.ini

#create php.ini
sudo touch /etc/php.ini && subl /etc/php.ini

engine = On
short_open_tag = On
asp_tags = Off
precision = 14
y2k_compliance = On
output_buffering = 4096
;output_handler =
zlib.output_compression = On
zlib.output_compression_level = -1
zlib.output_handler =
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 17
allow_call_time_pass_reference = Off
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL | E_STRICT
display_errors = On
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
html_errors = On
;error_prepend_string = "<span style='color: #ff0000'>"
;error_append_string = "</span>"
;error_log = php_errors.log
;error_log = syslog
variables_order = "GPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "utf-8"
include_path = ".:/usr/lib/php/pear"
doc_root =
user_dir =
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626"
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60


date.timezone = "UTC"









pdo_mysql.cache_size = 2000



define_syslog_variables  = Off

[mail function]

SMTP = localhost
smtp_port = 25
mail.add_x_header = On


sql.safe_mode = Off


odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1


ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"


mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port = 3306
mysql.default_socket = /var/mysql/mysql.sock
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off


mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket = /var/mysql/mysql.sock
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off


mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off



pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0


sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10


bcmath.scale = 0



session.save_handler = files
session.use_cookies = 1
session.use_only_cookies = 1 = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = Off
session.bug_compat_warn = Off
session.referer_check =
session.entropy_length = 0
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"


mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off
mssql.secure_connection = Off







tidy.clean_output = Off


soap.wsdl_cache_limit = 5



ldap.max_links = -1



xdebug.profiler_output_name = cachegrind.out.%s 

Restart apache

sudo apachectl graceful

aww yeah

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