Skip to content

Instantly share code, notes, and snippets.

@sierra073
Last active November 24, 2020 03:13
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 sierra073/9afbfd01671f1da752e84f6611c26fd2 to your computer and use it in GitHub Desktop.
Save sierra073/9afbfd01671f1da752e84f6611c26fd2 to your computer and use it in GitHub Desktop.
Notes for setting up a new Mac for development

Software to Download

Browsers

  • Google Chrome
  • Firefox

Other

  • Slack
  • Spotify
  • Jumpcut or alternative (keeps clipboard history)
  • Set up Mail app or Boxy Suite for gmail accounts
  • OneNote

Development

  • Xcode
  • Homebrew
  • VSCode
  • nvm & node.js: nvm install node
  • Postgres: download Postgres.app and enable CLI
  • Heroku CLI
  • AWS CLI
  • Docker Desktop

Terminal and .bash_profile customization

  • Terminal Profile: Set Default to Pro, Font to Monaco 14pt.
  • The following is a good minimum to have in ~/.bash_profile:
alias ls='ls -lHa'
alias herokudb='heroku pg:psql -a <YOUR-APP>'
alias db='psql postgres://YOUR@URL/DB'

function cdls { cd $1; ls;}

# git
parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "

# nvm
export NVM_DIR="/Users/MacBookPro17/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"

Github setup

  • via Terminal, cd into the directory that you want to install repos into and type git init
  • Configure your commit email address
  • To allow your computer to push to remote repos:
  1. Generate a new ssh key: ssh-keygen -t rsa -b 4096 -C "<your_github_email_address>". For MacOS 10.12.2 or later, we must modify ~/.ssh/config to automatically load keys into the ssh-agent and store passphrases in your keychain:
# ~/.ssh/config
Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Now run the SSH agent and add the key to it:

eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_rsa
  1. Navigate to the SSH and GPG keys settings page on Github and click "New SSH key"
  2. Copy the new ssh key you generated and paste it into the box: pbcopy < ~/.ssh/id_rsa.pub

VSCode Extensions

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