Skip to content

Instantly share code, notes, and snippets.

@dting
Created August 1, 2016 06:48
Show Gist options
  • Save dting/701336d993ba3feb6d808ebd7c2d1825 to your computer and use it in GitHub Desktop.
Save dting/701336d993ba3feb6d808ebd7c2d1825 to your computer and use it in GitHub Desktop.
sudo -v
# keep-alive: update existing `sudo` timestamp until bootstrap has finished
while true; do sudo -v; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
sudo softwareupdate -i -a
sudo xcodebuild -license accept
# 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 tap caskroom/cask
brew tap caskroom/versions
brew tap caskroom/fonts
brew update && brew cask update && brew cleanup && brew cask cleanup
# 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
# 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 docker
brew install dockutil
## Ruby stuff
# Dependancies
brew install libyaml
brew install readline
brew install openssl
# Rbenv
brew install rbenv
brew install ruby-build
# Remember to add "eval "$(rbenv init -)" to .bashrc
eval "$(rbenv init -)"
rbenv install 2.3.1
rbenv global 2.3.1
eval "$(rbenv init -)"
which ruby
gem update --system
gem install homesick
homesick clone dting/dotfiles
homesick symlink dotfiles
brew install jenv
eval "$(jenv init -)"
brew cask install java6
brew cask install java7
brew cask install java
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
brew cask install google-chrome
brew cask install music-manager
brew cask install google-hangouts
brew cask install google-drive
# Atom
brew cask install atom
apm install nuclide
apm install tomorrow-night-eighties
apm install gruvbox
brew cask install bettertouchtool
brew cask install caffeine
brew cask install dash
brew cask install dropbox
brew cask install easyfind
brew cask install eclipse-jee
brew cask install evernote
brew cask install firefox
brew cask install github-desktop
brew cask install hyperswitch
brew cask install intellij-idea
brew cask install iterm2
brew cask install lastpass
brew cask install little-snitch
brew cask install slack
brew cask install spectacle
brew cask install sourcetree
brew cask install sublime-text
brew cask install the-unarchiver
brew cask install vagrant
brew cask install virtualbox
brew cask install vlc
brew install python
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
pip install pip
pip install virtualenv
pip install virtualenvwrapper
brew install python3
## 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
# 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
## 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 "Launchpad" --no-restart
dockutil --remove "Photos" --no-restart
dockutil --add /Applications/Google\ Chrome.app --no-restart
dockutil --add /Applications/Firefox.app --no-restart
dockutil --add /Applications/IntelliJ\ IDEA.app --no-restart
dockutil --add /Applications/Sublime\ Text.app --no-restart
dockutil --add /Applications/Atom.app --no-restart
dockutil --add /Applications/Eclipse.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" --after "Google Chrome" --no-restart
dockutil --move "IntelliJ IDEA" --after "Firefox" --no-restart
dockutil --move "Sublime Text" --after "IntelliJ IDEA" --no-restart
dockutil --move "Atom" --after "Sublime Text" --no-restart
dockutil --move "Eclipse" --after "Atom" --no-restart
dockutil --move "iTerm" --after "Eclipse" --no-restart
dockutil --move "System Preferences" --after "iTerm" --no-restart
dockutil --move "App Store" --after "System Preferences" --no-restart
killall Dock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment