Last active
May 11, 2016 14:53
-
-
Save jamestomasino/56567124ae8aa3d6873d02a7112e7673 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
set -e # exit on any nonzero command | |
read -n1 -r -p "Make sure SSH keys are set up on remotes. Press space to continue..." key | |
if [ "$key" = '' ]; then | |
# Remove default dotfiles that may exist | |
if [ -f "$HOME/.profile" ]; then | |
rm "$HOME/.profile" | |
fi | |
if [ -f "$HOME/.bashrc" ]; then | |
rm "$HOME/.bashrc" | |
fi | |
if [ -f "$HOME/.bash_profile" ]; then | |
rm "$HOME/.bash_profile" | |
fi | |
if [ -f "$HOME/.localrc" ]; then | |
rm "$HOME/.localrc" | |
fi | |
if [ -f "$HOME/.bash_logout" ]; then | |
rm "$HOME/.bash_logout" | |
fi | |
if [ -f "$HOME/.viminfo" ]; then | |
rm "$HOME/.viminfo" | |
fi | |
## homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update && brew upgrade | |
# tap | |
brew tap caskroom/cask | |
brew install brew-cask | |
brew install Caskroom/cask/xquartz | |
brew cask install java | |
brew tap homebrew/science | |
# basics | |
brew install wget | |
brew install coreutils | |
brew install gnu-sed --default-names | |
brew install keybase | |
brew install gpg | |
# git | |
brew install git git-flow-avh bash-completion gnu-getopt | |
wget https://raw.github.com/petervanderdoes/git-flow-completion/develop/git-flow-completion.bash | |
chmod 755 git-flow-completion.bash | |
mv git-flow-completion.bash ~/.git-flow-completion.sh | |
brew install tig | |
# python | |
brew install python | |
pip install --upgrade setuptools && pip install --upgrade pip | |
pip install qrcode | |
# utilities | |
brew install imagemagick | |
brew install libvpx | |
brew install ffmpeg --with-libvpx | |
brew install the_silver_searcher | |
brew install tree | |
brew install unrar | |
brew install calc | |
brew install lynx | |
brew install vimpager | |
brew install htop | |
brew install youtube-dl | |
# vim | |
brew install mercurial | |
brew install vim --with-python3 --with-tcl --with-perl --override-system-vi | |
# shell | |
brew install tmux | |
brew install reattach-to-user-namespace | |
brew install jq | |
brew install ssh-copy-id | |
# Ruby | |
brew install rbenv | |
brew install ruby-build | |
rbenv install 2.3.0 | |
rbenv rehash | |
rbenv global 2.3.0 | |
rbenv rehash | |
# Perl | |
\curl -L http://install.perlbrew.pl | bash | |
perlbrew install perl-5.16.0 | |
perlbrew switch perl-5.16.0 | |
# node | |
brew install node | |
npm install -g grunt-cli | |
## repositories | |
mkdir -p ~/Sites/system/ | |
mkdir -p ~/Sites/work/ | |
mkdir -p ~/Sites/personal/ | |
cd ~/Sites/system && git clone git@github.com:jamestomasino/bin.git | |
ln -s ~/Sites/system/bin ~/bin | |
cd ~/Sites/system && git clone git@github.com:jamestomasino/dotfiles.git | |
cd ~/Sites/system/dotfiles && ./install | |
cd ~/Sites/system && git clone git@bitbucket.org:jamestomasino/privatedot.git | |
cd ~/Sites/system/privatedot && ./install | |
# Ruby Gems | |
gem install bundler | |
# R and RStudio | |
brew install R | |
brew cask install rstudio | |
brew install libsvg curl libxml2 gdal geos boost | |
# applications | |
brew cask install iterm2 | |
brew cask install joinme | |
brew cask install vagrant | |
brew cask install vagrant-manager | |
brew cask install virtualbox | |
brew cask install virtualbox-extension-pack | |
brew cask install google-chrome | |
brew cask install skype | |
brew cask install viscosity | |
# bash completions | |
brew tap homebrew/completions | |
brew install vagrant-completion | |
brew install bundler-completion | |
brew install gem-completion | |
brew install grunt-completion | |
brew install pip-completion | |
# cryptostorm | |
wget https://raw.githubusercontent.com/cryptostorm/cryptostorm_client_configuration_files/master/mac/cstorm_Dynamic.ovpn -P "$HOME/Desktop/" | |
# vagrant plugins | |
vagrant plugin install vagrant-hostsupdater | |
# Configuration | |
#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 | |
#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 ~/Desktop/Screenshots | |
#Disable the 'Are you sure you want to open this application?' dialog | |
defaults write com.apple.LaunchServices LSQuarantine -bool false | |
#Show percentage in battery status | |
defaults write com.apple.menuextra.battery ShowPercent -string "YES" | |
defaults write com.apple.menuextra.battery ShowTime -string "NO" | |
#Disable Notification Center and remove the menu bar icon | |
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist | |
#Disable rubberband scrolling | |
defaults write -g NSScrollViewRubberbanding -bool false | |
#Disable dashboard | |
defaults write com.apple.dashboard mcx-disabled -boolean YES | |
#Move dock to left side of screen | |
defaults write com.apple.dock orientation -string left | |
#Show all filename extensions in Finder | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
#Expand save panel by default | |
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true | |
#Expand print panel by default | |
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true | |
#Avoid creating .DS_Store files on network volumes | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
#Disable the warning when changing a file extension | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
#Use list view in all Finder windows by default | |
#Four-letter codes for the other view modes: icnv, Nlmv, Flwv | |
defaults write com.apple.finder FXPreferredViewStyle -string "Nlmv" | |
#Remove default text from basic screen saver | |
defaults write ~/Library/Preferences/com.apple.ScreenSaver.Basic MESSAGE " " | |
#Disable sound effect when changing volume | |
defaults write -g com.apple.sound.beep.feedback -integer 0 | |
#Disable user interface sound effects | |
defaults write com.apple.systemsound 'com.apple.sound.uiaudio.enabled' -int 0 | |
#Set system sounds volume to 0 | |
defaults write com.apple.systemsound com.apple.sound.beep.volume -float 0 | |
#Kill affected applications, so the changes apply | |
for app in Safari Finder Dock Mail SystemUIServer; do killall "$app" >/dev/null 2>&1; done | |
# Instructions | |
echo "- Open tmux and run plugin installers: \`I" | |
echo "- Open vim and run :PlugInstall" | |
echo "- Open ovpn file on desktop, then hash key and run" | |
else | |
echo "Aborting" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment