-
-
Save charliep6/89df5412b52877feb253c94ec847b785 to your computer and use it in GitHub Desktop.
Setup for new devs
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 | |
# basics | |
brew install wget | |
brew install coreutils | |
brew install gnu-sed --default-names | |
# 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 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:charliep6/bin.git | |
ln -s ~/Sites/system/bin ~/bin | |
cd ~/Sites/system && git clone git@github.com:charliep6/dotfiles.git | |
cd ~/Sites/system/dotfiles && ./install | |
# Ruby Gems | |
gem install bundler | |
# applications | |
brew cask install iterm2 | |
# bash completions | |
brew tap homebrew/completions | |
brew install bundler-completion | |
brew install gem-completion | |
brew install grunt-completion | |
brew install pip-completion | |
# 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 |
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
- Install XCode | |
- Create SSH keys | |
$ ssh-keygen | |
- Upload public key to Assembla & Github | |
$ cat ~/.ssh/id_rsa.pub | pbcopy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment