Skip to content

Instantly share code, notes, and snippets.

@jousby
Last active August 21, 2020 03:48
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jousby/2ab03202b5bf7878f9b850b916e54a3e to your computer and use it in GitHub Desktop.
Save jousby/2ab03202b5bf7878f9b850b916e54a3e to your computer and use it in GitHub Desktop.
#!/bin/bash
# Run outstanding system updates
echo "Updating system install..."
softwareupdate -ia --verbose
echo ""
# Install xcode cli development tools
echo "Installing xcode cli development tools..."
xcode-select --install
echo ""
#####################################################################
# Install brew apps
#####################################################################
# Install homebrew
echo "Installing homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo ""
echo "Installing brew apps..."
echo ""
# Dev cli apps
brew install neovim/neovim/neovim # Modern VIM
brew install tmux # Terminal multiplexer
brew install openssl # SSL
brew install ack # Grep for programmers
brew install awscli # AWS CLI
brew install aws-shell # Wrap aws-cli with autocomplete
brew install wget # Retrieve web files
brew install jq # Command line Json parser
brew install git # Version control
brew install go # Golang tooling
brew install pstree # ps output in tree format
brew install hub # convenience functions for github
brew install ghi # convencience functions for git hub issues
brew install reattach-to-user-namespace # Needed for clipboard integration from vim
brew install qemu # Processor emulator
brew tap aws/tap
brew install aws-sam-cli # AWS SAM CLI
# Dev gui apps
brew cask install google-chrome # Chrome web browser
brew cask install iterm2 # A better terminal
brew cask install postman # GUI for testing apis
brew cask install recordit # Screen recorder
open /Applications/RecordIt.app/
brew cask install skitch # Screenshot tool
brew cask install etcher # Burn raspberry pi images
brew cask install gimp # Graphics editor
brew cask install docker # Container tooling
brew cask install visual-studio-code # Electron based IDE
brew cask install intellij-idea-ce # JVM based IDE
# Personal gui apps
brew cask install amazon-workspaces # Amazon workspaces client
brew cask install amazon-workdocs # Amazon workdocs sync client
brew cask install 1password # Password manager
open /Applications/1Password\ 7.app/
brew cask install spotify # Streaming music
brew cask install slack # Realtime chat tool
brew cask install vlc # Media player
brew cask install bartender # Menubar manager
brew cask install whatsapp # Realtime chat tool
brew cask install whatsize # Disk usaage utility
brew cask install zoom # Video conferencing
brew cask install minecraft # Don't judge me...
# Productivity gui apps
brew cask install alfred # Mac os helper
open /Applications/Alfred\ 3.app/
brew cask install flux # Blue light solution
open /Applications/Flux.app/
brew cask install selfcontrol # Block access to websites
brew cask install rescuetime # App/time usage analytics
open /Applications/RescueTime.app/
echo ""
#####################################################################
# Install mac app store apps
#
# NOTE: The mas commands will only work if you are:
# - on High Sierra+
# - have downloaded the app from the store previously
# - are currently logged into the app store app
#####################################################################
echo "Installing mas cli..."
brew install mas # Mac App Store CLI
echo ""
echo "Installing mas apps..."
echo ""
# Dev gui apps
mas install 497799835 # Xcode, ios/osx app dev env
sudo xcodebuild -license accept
mas install 1295203466 # Microsoft Remote Desktop, rdp into windows
# Work gui apps
mas install 1003160018 # Quip, doc collaboration
mas install 937984704 # Amphetamine, keep-awake utility
mas install 1056643111 # Clocker, menubar world clock
mas install 417375580 # BetterSnapTool, PAID, window organiser
#####################################################################
# Pimp zsh
#
# NOTE: To use the bullet-train theme with zsh you will need to
# change Terminal/iterm2 to use one of the powerline fonts installed
# with the first set of commands below.
#####################################################################
# Install powerline fonts (needed by bullet train theme)
git clone https://github.com/powerline/fonts.git /tmp/fonts
/tmp/fonts/install.sh
rm -rf /tmp/fonts
# Install bullet-train theme
mkdir -p ~/.zsh-custom/themes
curl -L -o ~/.zsh-custom/themes/bullet-train.zsh-theme https://raw.githubusercontent.com/caiogondim/bullet-train.zsh/master/bullet-train.zsh-theme
# Install oh my zsh
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
# Customise oh my zsh to use bullet train theme
sed -i -e 's/ZSH_THEME="\(.*\)"/ZSH_THEME="bullet-train"/' ~/.zshrc
sed -i -e 's/^# ZSH_CUSTOM=\(.*\)/ZSH_CUSTOM=~\/.zsh-custom/' ~/.zshrc
cat << EOT >> ~/.zshrc
# Configure bullet train theme
export BULLETTRAIN_PROMPT_ORDER=(
time
aws
status
dir
screen
perl
ruby
virtualenv
go
elixir
git
hg
cmd_exec_time
)
export BULLETTRAIN_DIR_EXTENDED=2
EOT
#####################################################################
# Install the devtool version managers
#####################################################################
# Install Sdkman (manage jvm related build tools)
if [ ! -f ~/.sdkman/bin/sdkman-init.sh ]; then
echo "Installing Sdkman"
curl -s "https://get.sdkman.io" | bash
source ~/.sdkman/bin/sdkman-init.sh
sdk install java 8.0.181-zulu
sdk install gradle
sdk install maven
sdk install sbt
sdk install visualvm
fi
# Install Node Version Manager
if [ ! -f ~/.nvm/nvm.sh ]; then
echo "Installing Node Version Manager"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
cat << EOT >> ~/.zshrc
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
EOT
source ~/.zshrc
nvm install node
fi
# Install Python Virtualenv
sudo easy_install pip
sudo pip install virtualenv
virtualenv ~/.virtualenvs/default
# Install Ruby Version Manager
if [ ! -f ~/.rvm/scripts/rvm ]; then
echo "Installing RVM"
curl -L -o rvm-installer https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer
chmod +x ./rvm-installer
./rvm-installer
rm rvm-installer
source ~/.zshrc
rvm install ruby --latest --default
fi
#####################################################################
# Stuff that I'm to cheap to buy but might revisit
#####################################################################
#brew cask install keyboard-maestro # PAID - macro tool
#brew cask install transmit # PAID - file transfer
#brew cask install little-snitch # PAID - host based firewall
#brew cask install micro-snitch # PAID - camera/audio usage indicator
# Personal gui apps
#mas install 1225570692 # Ulysses, PAID, nice looking writers tool
#mas install 420212496 # Byword, PAID, nice looking editor
# Productivity gui apps
#mas install 904280695 # Install Things3, PAID, todo app
#open /Applications/Things2.app/
#mas install 961632516 # Install Be Focused Pro, PAID, time manager
#open /Applications/Be\ Focused\ Pro.app/
#mas install 435003920 # Install Fantastical, PAID, calendar app
#open /Applications/Fantastical.app/
#mas install 928871588 # Install Noizio, PAID, ambient sound
#open /Applications/Noizio.app/
#mas install 814499283 # Install Dropshare, PAID, file sharing app
#open /Applications/Dropshare.app/
@anamorph
Copy link

/!\ mas requires you to be signed in before you run anything /!\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment