Skip to content

Instantly share code, notes, and snippets.

@dting
Last active August 29, 2015 14:10
Show Gist options
  • Save dting/ea1b3ae8b0b92314f241 to your computer and use it in GitHub Desktop.
Save dting/ea1b3ae8b0b92314f241 to your computer and use it in GitHub Desktop.
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -v; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Update OS X
sudo softwareupdate -i -a
# Install Command Line Tools
if [[ `xcode-select -p` != "/Applications/Xcode.app/Contents/Developer" ]]; then
xcode-select --install
fi
# Install homebrew
if [ ! -d /usr/local/.git ]; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew doctor
brew tap homebrew/versions
brew tap homebrew/dupes
brew tap homebrew/homebrew-x11
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
## Binaries
# Install GNU core utilities (those that come with OS X are outdated).
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils
if [ ! -f "/usr/local/bin/sha256sum" ]; then
sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
fi
# Install some other useful utilities like `sponge`.
brew install moreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed.
brew install findutils
# Install GNU `sed`, `ack`, and `grep`, overwriting the built-ins.
brew install gnu-sed --with-default-names
brew install grep --with-default-names
brew install ack --with-default-names
brew install tree
brew install protobuf
# Bash
brew install bash
if ! grep -q '/usr/local/bin/bash' "/etc/shells" ; then
echo "Editing /etc/shells to include brew bash and setting it as default shell."
sudo sh -c "echo >> /etc/shells"
sudo sh -c "echo \"/usr/local/bin/bash\" >> /etc/shells"
chsh -s /usr/local/bin/bash
fi
brew install bash-completion
# Install `wget` with IRI support.
brew install wget --with-iri
brew install dockutil
## Ruby stuff
# Dependancies
brew install libyaml
brew install readline
brew install openssl
# Rbenv
brew install rbenv
brew install rbenv-gem-rehash
brew install ruby-build
# Remember to add "eval "$(rbenv init -)" to .bashrc
eval "$(rbenv init -)"
rbenv install 2.1.5
rbenv global 2.1.5
eval "$(rbenv init -)"
which ruby
gem update --system
gem install homesick
homesick clone dting/dotfiles
homesick symlink dotfiles
gem install sass
gem install jekyll
brew install python
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
# install nvm and node
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
if [ -z "$NVM_DIR" ]; then
NVM_DIR="$HOME/.nvm"
fi
source $NVM_DIR/nvm.sh
nvm install stable
nvm alias default stable
nvm use stable
brew install gradle
brew install https://raw.github.com/gcuisinier/jenv/homebrew/jenv.rb
eval "$(jenv init -)"
## Cask Apps
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
brew cask install java6
brew cask install java7
brew cask install java
brew cask install bettertouchtool
brew cask install spectacle
brew cask install little-snitch
brew cask install vlc
brew cask install iterm2
brew cask install sublime-text3
brew cask install easyfind
brew cask install caffeine
brew cask install the-unarchiver
brew cask install hyperswitch
brew cask install quicklook-json
brew cask install quicklook-csv
brew cask install betterzipql
brew cask install qlstephen
brew cask install qlcolorcode
brew cask install colorpicker-developer
brew cask install colorpicker-hex
# Google
if [ ! -d "/Applications/Google Chrome.app" ]; then
brew cask install google-chrome
# Need to be moved into /Applications to allow sandboxing and extensions to work
rm /Applications/Google\ Chrome.app
sudo cp -R /opt/homebrew-cask/Caskroom/google-chrome/latest/Google\ Chrome.app /Applications
fi
brew cask install music-manager
brew cask install chromecast
brew cask install google-hangouts
brew cask install google-drive
brew cask install dropbox
brew cask install evernote
brew cask install firefox
# Development
brew cask install github
brew cask install virtualbox
brew cask install vagrant
brew cask install sourcetree
brew cask install intellij-idea
brew cask install eclipse-jee
# Atom
brew cask install atom
apm install tomorrow-night-eighties
apm install gruvbox
## Order Sensitive Installs
brew cask install xquartz
brew install hicolor-icon-theme
brew install libglade
brew install rarian
brew install xz
brew install intltool
brew install pygtk
brew install pygtksourceview
brew install pygobject
brew install meld
# NPM installs
npm install -g grunt-cli
npm install -g karma
npm install -g bower
npm install -g yo
npm install -g generator-angular
## Dock Manipulations
dockutil --remove "Contacts" --no-restart
dockutil --remove "Calendar" --no-restart
dockutil --remove "Safari" --no-restart
dockutil --remove "Mail" --no-restart
dockutil --remove "Notes" --no-restart
dockutil --remove "Maps" --no-restart
dockutil --remove "FaceTime" --no-restart
dockutil --remove "iBooks" --no-restart
dockutil --remove "Reminders" --no-restart
dockutil --remove "Messages" --no-restart
dockutil --remove "iTunes" --no-restart
dockutil --remove "Terminal" --no-restart
dockutil --remove "Launchpad" --no-restart
dockutil --add /Applications/Google\ Chrome.app --no-restart
dockutil --add /Applications/Eclipse.app --no-restart
dockutil --add /Applications/Firefox.app --no-restart
dockutil --add /Applications/Atom.app --no-restart
dockutil --add /Applications/iTerm.app --no-restart
dockutil --add /Applications/ --no-restart
dockutil --add /Applications/Utilities --no-restart
dockutil --move "Google Chrome" --position 1 --no-restart
dockutil --move "Firefox" --position 2 --no-restart
dockutil --move "Eclipse" --position 3 --no-restart
dockutil --move "Atom" --position 4 --no-restart
dockutil --move "iTerm" --position 5 --no-restart
dockutil --move "System Preferences" --position 6 --no-restart
dockutil --move "App Store" --position 7 --no-restart
echo "REMINDERS:"
echo "Add Java Versions to JEnv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment