Last active
August 29, 2015 14:08
-
-
Save robgeorgeuk/df824e1632052fe7c818 to your computer and use it in GitHub Desktop.
New OSX Setup. Run with: curl -L https://gist.githubusercontent.com/robgeorgeuk/df824e1632052fe7c818/raw/post_install.sh > install.sh && chmod 700 install.sh && ./install.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Heavily borrowed from: | |
#https://gist.github.com/t-io/8255711 | |
#http://mattstauffer.co/blog/setting-up-a-new-os-x-development-machine-part-2-global-package-managers | |
#https://gist.github.com/millermedeiros/6615994 | |
echo Install Homebrew | |
#next two lines ensure that apps are installed to applications but doesn't seem to take effect :-( | |
export HOMEBREW_CASK_OPTS="--appdir=/Applications" | |
echo HOMEBREW_CASK_OPTS="--appdir=/Applications" >> ~/.bash_profile | |
echo export PATH='/usr/local/sbin:$PATH' >> ~/.bash_profile | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
brew tap caskroom/cask | |
brew tap caskroom/homebrew-versions | |
brew install brew-cask | |
#read -p "Press any key to continue... " -n1 -s | |
#Non gui stuff | |
brew install dnsmasq | |
brew install zsh zsh-completions | |
#NodeJS and gulp | |
brew install node | |
sudo brew postinstall node | |
sudo npm install -g gulp | |
#Configure DNSMasq | |
cd $(brew --prefix) | |
mkdir etc | |
echo 'address=/.dev/127.0.0.1' > 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 /etc/resolver | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev' | |
cd ~ | |
#Install oh-my-zsh | |
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh | |
echo HOMEBREW_CASK_OPTS="--appdir=/Applications" >> ~/.zshrc | |
echo export PATH='/usr/local/sbin:$PATH' >> ~/.zshrc | |
#Core Functionality | |
echo Install Core Apps | |
brew cask install --appdir="/Applications" alfred | |
brew cask install --appdir="/Applications" divvy | |
brew cask install --appdir="/Applications" dropbox | |
brew cask install --appdir="/Applications" iterm2 | |
brew cask install --appdir="/Applications" java | |
brew cask install --appdir="/Applications" onepassword | |
brew cask install --appdir="/Applications" skype | |
brew cask install --appdir="/Applications" vlc | |
brew cask install --appdir="/Applications" the-unarchiver | |
#Development | |
echo Install Dev Apps | |
brew cask install --appdir="/Applications" paw | |
brew cask install --appdir="/Applications" phpstorm | |
brew cask install --appdir="/Applications" sequel-pro | |
brew cask install --appdir="/Applications" sourcetree | |
brew cask install --appdir="/Applications" sublime-text3 | |
brew cask install --appdir="/Applications" transmit | |
brew cask install --appdir="/Applications" vagrant | |
brew cask install --appdir="/Applications" virtualbox | |
#Browsers | |
echo Install Browsers | |
brew cask install --appdir="/Applications" firefox | |
brew cask install --appdir="/Applications" google-chrome | |
#Nice to have / optional | |
echo Install Some additional Apps | |
#brew cask install --appdir="/Applications" private-internet-access | |
brew cask install --appdir="/Applications" soundcleod | |
brew cask install --appdir="/Applications" selfcontrol | |
#Link Cask Apps to Alfred | |
read -p "Start Alfred and then press any key to continue... " -n1 -s | |
brew cask alfred link | |
#cleanup Homebrew | |
brew cleanup --force | |
rm -f -r /Library/Caches/Homebrew/* | |
#Change Shell | |
sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells" | |
chsh -s /usr/local/bin/zsh | |
#OSX Tweaks | |
#Quick view plain text files e.g. css | |
brew cask install --appdir="/Applications" qlstephen | |
#Finder: show hidden files by default | |
defaults write com.apple.finder AppleShowAllFiles -bool true | |
#Finder: show all filename extensions | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
#Finder: show status bar | |
defaults write com.apple.finder ShowStatusBar -bool true | |
#Finder: allow text selection in Quick Look | |
defaults write com.apple.finder QLEnableTextSelection -bool true | |
#Set a blazingly fast keyboard repeat rate | |
defaults write NSGlobalDomain KeyRepeat -int 0 | |
#Set a shorter Delay until key repeat | |
defaults write NSGlobalDomain InitialKeyRepeat -int 12 | |
#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 | |
#Store screenshots in subfolder on desktop | |
mkdir ~/Desktop/Screenshots | |
defaults write com.apple.screencapture location -string "~/Desktop/Screenshots" | |
#Enable full keyboard access for all controls (enable Tab in modal dialogs, menu windows, etc.) | |
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 | |
#Enable subpixel font rendering on non-Apple LCDs | |
defaults write NSGlobalDomain AppleFontSmoothing -int 2 | |
#Use column view in all Finder windows by default | |
defaults write com.apple.finder FXPreferredViewStyle Clmv | |
#Avoid creation of .DS_Store files on network volumes | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
#Setting email addresses to copy as '[email protected]' instead of 'Foo Bar <[email protected]>' in Mail.app" | |
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment