Skip to content

Instantly share code, notes, and snippets.

@mdlavin
Last active July 7, 2022 11:45
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 mdlavin/0791ddace126fbbfb6a89beabc8a9e94 to your computer and use it in GitHub Desktop.
Save mdlavin/0791ddace126fbbfb6a89beabc8a9e94 to your computer and use it in GitHub Desktop.
Machine setup

Enable FileVault disk encryption

Enable Firewall

sudo defaults write /Library/Preferences/com.apple.alf globalstate -int 1

Disable guest account

sudo defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool FALSE

Reboot computer

Update settings

  • Enable right button click
  • Remap Caps Lock key to Control
  • Set bottom left corner to lock
  • Unset bottom right corner
  • Increase mouse speed

Install Oh-my-zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/jeffreytse/zsh-vi-mode ~/.oh-my-zsh/custom/plugins/zsh-vi-mode

Add the following before the source $ZSH/oh-my-zsh.sh line:

# Enable VI mode for ZSH
# Only changing the escape key to `jk` in insert mode, we still
# keep using the default keybindings `^[` in other modes
ZVM_VI_INSERT_ESCAPE_BINDKEY=jk
plugins+=(zsh-vi-mode)

Install home-brew (http://brew.sh/)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install common software

brew install gpg pinentry-mac evernote brave-browser homebrew/cask/docker docker-compose awscli toggl-track todoist spotify visual-studio-code git zoom keepassxc slack dropbox microsoft-office microsoft-teams drawio pritunl

Configure Brave

Install better fonts

brew tap homebrew/cask-fonts
brew install --cask font-fira-code

Configure VS Code

code --install-extension eamodio.gitlens
code --install-extension vscodevim.vim
code --install-extension dbaeumer.vscode-eslint

Configure Git

git config --global user.name "Matt Lavin"
git config --global user.email matt.lavin@lifeomic.com
git config --global --replace user.signingkey "BCE82A21"
git config --global --replace commit.gpgsign true
git config --global --replace tag.gpgsign true
git config --global --replace push.autoSetupRemote true

brew install java echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.zshrc


Copy critical files from old computer

echo "What is location of the backup home directory (without trailing slash)?" read BACKUP_HOME echo "What is the new home directory (without trailing slash)?" read NEW_HOME

[[ -n $BACKUP_HOME && -n $NEW_HOME ]] && rsync -av "$BACKUP_HOME/{.ssh,.aws,.okta,.bin,.gnupg}" $NEW_HOME [[ -n $BACKUP_HOME && -n $NEW_HOME ]] && rsync -av "$BACKUP_HOME/" "$NEW_HOME" --inplace --include "Documents" --include "Documents/" --exclude "*" -P [[ -n $BACKUP_HOME && -n $NEW_HOME ]] && /usr/local/bin/rsync -av "$BACKUP_HOME/" "$NEW_HOME" --inplace --exclude '/node_modules' --include "Projects" --include "Projects/" --exclude "*" --whole-file -P [[ -n $BACKUP_HOME && -n $NEW_HOME ]] && /usr/local/bin/rsync -av "$BACKUP_HOME/" "$NEW_HOME" --inplace --exclude '/node_modules' --include "Personal" --include "Personal/**" --exclude "*" --whole-file -P


Install NVM

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash nvm install --lts nvm alias default lts npm install -g yarn

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