Skip to content

Instantly share code, notes, and snippets.

@jrltt
Forked from alvarp/setup.sh
Last active November 18, 2020 08:01
Show Gist options
  • Select an option

  • Save jrltt/01afd55bd98cbc45399d7ed99ffca61a to your computer and use it in GitHub Desktop.

Select an option

Save jrltt/01afd55bd98cbc45399d7ed99ffca61a to your computer and use it in GitHub Desktop.
Mac Setup ✨
# how to run this thingy
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
#!/bin/bash
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 https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Install Homebrew Packages
cd ~
echo "Installing Homebrew packages"
homebrew_packages=(
"git"
"node"
"hub"
)
for homebrew_package in "${homebrew_packages[@]}"; do
brew install "$homebrew_package"
done
# Install Casks
echo "Installing Homebrew cask packages"
homebrew_cask_packages=(
"1password"
"alfred"
"cyberduck"
"docker"
"flux"
"github"
"google-chrome"
"grandperspective"
"firefox"
"imageoptim"
"iterm2"
"karabiner-elements"
"slack"
"spotify"
"sourcetree"
"telegram"
"the-unarchiver"
"tunnelblick"
"spectacle"
"pock"
"postman"
"visual-studio-code"
"vlc"
"zeplin"
"zoomus"
)
# install n (https://github.com/tj/n)
# make sure you follow steps here to take control of /usr folders
for homebrew_cask_package in "${homebrew_cask_packages[@]}"; do
brew cask install "$homebrew_cask_package"
done
# configure git
git config --global user.name "Joaquín Reyes"
git config --global user.email "hola@jrltt.net"
# Install NPM packages
npm_packages=(
"eslint"
"jest"
"ts-node"
"typescript"
)
for npm_package in "${npm_packages[@]}"; do
npm i "$npm_package" -g
done
# 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/id_rsa.pub
# Complete
echo "Installation Complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment