Skip to main content

Mutable Ideas

Setting up Macbook Pro for Development

As I’m building a new startup I’ve been installing several Macbooks and helping engineers on their own setup, of course, we all have our kinks on configuring our machines but there is a base that would be nice to share and keep as standard as possible. Those are my (hopefully sane) defaults.

# Install the Command Line Tools

xcode-select --install

# Install Homebrew

Follow instructions from their site

# Install relevant packages (for a JVM developer)

# Installing OpenJDK 8/11
brew tap AdoptOpenJDK/openjdk

# Fonts
brew tap homebrew/cask-fonts

# Useful software and packages
brew cask install \
    adoptopenjdk8 \
    adoptopenjdk11 \
    docker \
    dropbox \
    font-source-code-pro \
    google-chrome \
    google-drive-file-stream \
    google-hangouts \
    intellij-idea-ce \
    iterm2 \
    lastpass \
    pritunl \
    pycharm-ce \
    postico \
    postman \
    ngrok \
    qlcolorcode \
    qlimagesize \
    qlmarkdown \
    qlstephen \
    quicklook-csv \
    quicklook-json \
    slack \
    spectacle \
    spotify \
    visual-studio-code \
    vlc \
    virtualbox \
    whatsapp \
    zoomus

brew untap AdoptOpenJDK/openjdk
brew untap homebrew/cask-fonts

# cli
brew install \
    awscli \
    bat \
    git \
    git-gui \
    httpie \
    hugo \
    imagemagick \
    jenv \
    jupyter \
    jmeter \
    kotlin \
    kubernetes-helm \
    pyenv \
    python3 \
    jq \
    tree \
    watch \
    wget \
    zsh \
    zsh-completions

# Sanity checks ;)
brew cleanup
brew doctor

# Configure oh-my-zsh

Check ohmyz.sh:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Check available plugins here. Pick your list and add on ~/.zshrc:

plugins=(
    aws
    docker
    git
    colorize
    helm
    httpie
    iterm2
)

## Custom Theme

Recently a friend recommended powerlevel9k as a good theme, so I’m giving it a try:

git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
wget -O ~/Downloads/PowerlineSymbols.otf https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
open ~/Downloads/PowerlineSymbols.otf

Install Powerline font

### Updating ~/.zshrc

ZSH_THEME="powerlevel9k/powerlevel9k"

# Custom prompt elements
# https://github.com/bhilburn/powerlevel9k#available-prompt-segments
#
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(root_indicator background_jobs)

# Customizations

It is considered a good practice to keep your customizations out of ~/.zshrc, for that you have ~/.zprofile:

# Compatible with server configs
export LC_ALL="en_US.UTF-8"
export LANG="en_US"
export TZ='UTC'

# Setting default JVM to 11
# export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
export JAVA_HOME="$(/usr/libexec/java_home -v 11)"

# Aliases
alias de='cd ~/Desktop'
alias dl='cd ~/Downloads'
alias dr='cd ~/Dropbox/Public'
alias l1='ls -1'
alias ll='ls -la'
alias lh='ls -lah'
alias o='open .'
alias p='cd ~/Projects'
alias s='cd ~/Sandbox'

alias gk='gitk --all 2> /dev/null &'

# Hugo Preview
alias hugop='hugo serve -w -D'

# Visual Studio Code

# Extensions
code --install-extension CoenraadS.bracket-pair-colorizer
code --install-extension mathiasfrohlich.Kotlin
code --install-extension ms-azuretools.vscode-docker
code --install-extension ms-python.python
code --install-extension yzhang.markdown-all-in-one

# A few more things I’ve to try yet

## Audit & Security

## References