Skip to content

Instantly share code, notes, and snippets.

Forked from chris-sev/
Created Nov 28, 2019
What would you like to do?
Mac Setup
set -euo pipefail
# Display message 'Setting up your Mac...'
echo "Setting up your Mac..."
sudo -v
# Homebrew - Installation
echo "Installing Homebrew"
if test ! $(which brew); then
/usr/bin/ruby -e "$(curl -fsSL"
# Install Homebrew Packages
cd ~
echo "Installing Homebrew packages"
for homebrew_package in "${homebrew_packages[@]}"; do
brew install "$homebrew_package"
# Install Casks
echo "Installing Homebrew cask packages"
for homebrew_cask_package in "${homebrew_cask_packages[@]}"; do
brew cask install "$homebrew_cask_package"
# configure git
git config --global "Chris on Code"
git config --global ""
# Install Composer
echo "Installing Composer"
curl -sS | php
mv composer.phar /usr/local/bin/composer
# Create projects directory called batcave
echo "Creating a Batcave directory"
mkdir -p $HOME/documents/batcave
# Generate SSH key
echo "Generating SSH keys"
ssh-keygen -t rsa
echo "Copied SSH key to clipboard - You can now add it to Github"
pbcopy < ~/.ssh/
# zsh and oh-my-zsh
echo "Adding ZSH"
sh -c "$(curl -fsSL"
git clone $ZSH_CUSTOM/plugins/zsh-z
# zsh configuration
touch ~/.my-zshrc
# aliases
echo "alias list='ls --group-directories-first'" >> ~/.my-zshrc
echo "alias push='git push'" >> ~/.my-zshrc
echo "alias pull='git pull'" >> ~/.my-zshrc
echo "alias add='git add -A'" >> ~/.my-zshrc
echo "alias commit='git commit -m'" >> ~/.my-zshrc
echo "alias status='git status'" >> ~/.my-zshrc
echo "alias checkout='git checkout'" >> ~/.my-zshrc
echo "alias merge='git merge'" >> ~/.my-zshrc
echo "alias clean='git clean -f -d'" >> ~/.my-zshrc
echo "alias reset='git reset --hard'" >> ~/.my-zshrc
echo "alias nope='git reset --hard'" >> ~/.my-zshrc
echo "alias halt='vagrant halt'" >> ~/.my-zshrc
echo "alias destroy='vagrant destroy --force'" >> ~/.my-zshrc
echo "alias up='vagrant up'" >> ~/.my-zshrc
echo "alias suspend='vagrant suspend'" >> ~/.my-zshrc
echo "alias global='vagrant global-status'" >> ~/.my-zshrc
echo "alias vssh='vagrant ssh'" >> ~/.my-zshrc
echo "" >> ~/.my-zshrc
# zsh plugins
echo "plugins=(git zsh-completions zsh-z)" >> ~/.my-zshrc
echo "source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.my-zshrc
echo "source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.my-zshrc
# add our zshrc config to the main zshrc config
echo ". ~/.my-zshrc" >> "$HOME/.zshrc"
# finally changing default shell to zsh
chsh -s /bin/zsh
# Complete
echo "Installation Complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment