bharat kalluri

experiments and experiences, personal blog of bharat kalluri

18 Apr 2020

Setting up a brand new MacBook for development : 2020 edition

When I started working for my new company (JiTFin co), they gave me a MacBook Pro 2019 model. This article will detail what I do to setup my MacBook pro for day to day dev usage. This article also evolves as my job evolves. Currently I do mostly Python and Typescript, So all the tooling will be focused on those languages.

Getting started

  • Go through all the steps of Mac setup like setting up time zone etc..
  • Update your system so that you have all the security updates and patches

Homebrew

Homebrew is a package manager for Mac OS. If you are familiar with apt on ubuntu or dnf on fedora, you will feel right at home. Install homebrew from command line

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Apps

Brew broadly has two types of apps, normal open source applications like git etc.. and binary applications like firefox as casks. So brew install git installs git and brew cask install firefox installs firefox since firefox is a binary.

brew install \
  git \
  yarn \
  postgresql \
  redis \
  fzf \
  make

Now let us install casks

brew cask install \
  visual-studio-code \
  firefox \
  rectangle \
  iterm2 \
  docker \
  vlc \
  flock \
  spotify \
  postico \
  postman \
  jetbrains-toolbox \
  zoom \
  ticktick \
  anaconda \
  bitwarden \
  whatsapp

Shell

MacOS already comes with zsh as the default shell, let us install oh-my-zsh which comes with a range of plugins and themes.

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

To complete setup for FZF

$(brew --prefix)/opt/fzf/install

To complete postgres setup

initdb /usr/local/var/postgres

Adding contents to .zshrc

ZSH_DISABLE_COMPFIX=true
# adding path for anaconda
export PATH="/usr/local/anaconda3/bin:$PATH"

SSH

Generate ssh keys and add them to github/gitlab

ssh-keygen -t ed25519 -C "<email>"

Safari extensions

Safari is a good browser and a sane default, but it requires some extensions for it to be ready for day to day use.

Safari extensions to install

  • Enable Bitwarden on safari
  • Adguard

Changes in MacOS settings and tweaks in other applications

  • Enable tap on click on touch pad at Track pad > Tap to click
  • Change caps lock to escape key : Keyboard > modifier keys > Caps lock - escape
  • Set dark mode
  • Dock preferences > Automatically hide and show dock
  • Turn on firewall
  • Change to natural preset for keyboard in iterm
  • Change iterm theme to smooth and appearance to minimal