Skip to content

Instantly share code, notes, and snippets.

@joyjding
Created January 26, 2016 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joyjding/b8e2ef4ea01fba63a64c to your computer and use it in GitHub Desktop.
Save joyjding/b8e2ef4ea01fba63a64c to your computer and use it in GitHub Desktop.
setting-up-new-developer.sh
fancy_echo() {
local fmt="$1"; shift
# shellcheck disable=SC2059
printf "\n$fmt\n" "$@"
}
append_to_bash_profile() {
echo "$1" >> ~/.bash_profile
}
if ! command -v brew >/dev/null; then
fancy_echo "Installing Homebrew ..."
curl -fsS \
'https://raw.githubusercontent.com/Homebrew/install/master/install' | ruby
append_to_bash_profile '# Put /usr/local/bin at head of PATH for Homebrew'
append_to_bash_profile 'export PATH="/usr/local/bin:$PATH"'
export PATH="/usr/local/bin:$PATH"
fi
if brew list | grep -Fq brew-cask; then
fancy_echo "Uninstalling old Homebrew-Cask ..."
brew uninstall --force brew-cask
fi
set -e
fancy_echo "Updating Unix tools ..."
brew install 'vim'
brew_install 'openssl'
brew unlink openssl && brew link openssl --force
fancy_echo "Updating Heroku tools ..."
brew install 'heroku-toolbelt'
brew install 'parity'
fancy_echo "Updating GitHub tools ..."
brew install 'hub'
fancy_echo "Updating image tools ..."
brew install 'imagemagick'
fancy_echo "Updating testing tools ..."
brew install 'qt'
fancy_echo "Updating programming languages ..."
brew install 'node'
fancy_echo "Updating databases ..."
brew install 'postgres'
brew install 'redis'
fancy_echo "Installing sexy bash prompt"
(cd /tmp && git clone --depth 1 https://github.com/twolfson/sexy-bash-prompt && cd sexy-bash-prompt && make install) && source ~/.bashrc
fancy_echo "Installing apps through brew cask"
brew cask
brew cask install sublime-text
brew cask install google-chrome
brew cask install google-drive
brew cask install firefox
brew cask install sizeup
brew cask install dropbox
brew cask install gitx
brew cask install atom
brew cask install cyberduck
fancy_echo "Installing aliases"
append_to_bash_profile
append_to_bash_profile "# Aliases"
append_to_bash_profile "alias ll='ls -l'"
append_to_bash_profile "alias lla='ls -la'"
append_to_bash_profile "alias ..=\"cd ..\""
fancy_echo "Increasing keyboard rate"
defaults write -g InitialKeyRepeat -int 10
defaults write -g KeyRepeat -int 1
fancy_echo "Remove character recommendation when you hold a button"
defaults write -g ApplePressAndHoldEnabled -bool false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment