Skip to content

Instantly share code, notes, and snippets.

@mattbanks
Forked from saetia/gist:1623487
Last active December 20, 2015 16:19
Show Gist options
  • Save mattbanks/6160740 to your computer and use it in GitHub Desktop.
Save mattbanks/6160740 to your computer and use it in GitHub Desktop.

Source Code Pro, Chrome, Firefox, Kaleidoscope, iTerm, Transmit, Sublime Text, Sequel Pro, 1Password, LiveReload Extensions, XQuartz

#Xcode Command Line Tools

Xcode > Preferences > Downloads > Command Line Tools

#Shell

Switch to z-shell

chsh -s /bin/zsh

#Server

Install dnsmasq

brew install dnsmasq

Add DNS Domains

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

Enable dnsmasq daemon

sudo cp "/usr/local/Cellar/dnsmasq/2.63/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 127.0.0.1' > /etc/resolver/build

#flush cache
dscacheutil -flushcache

#ensure it works
scutil --dns

Enable virtual hosts

subl "/etc/apache2/users/$USER.conf"
DocumentRoot "/Users/mattbanks/Sites/"
NameVirtualHost *:80
<Directory "/Users/mattbanks/Sites/">
    Options Indexes MultiViews FollowSymLinks Includes
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
<VirtualHost *:80>
    UseCanonicalName off
    VirtualDocumentRoot /Users/mattbanks/Sites/%-2+/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment