← Back
config

How to setup (quickly) a computer for development

My goal was to get up and running the fastest possible. Here are the steps I followed:

1. Applications #

2. Command line #

Command line dev tools, git and oh-my-zash #

First I need MacOS command line dev tools, but those got installed (along git) with my shell of preference oh-my-zsh:

# Install oh-my-zsh 
# command line dev tools and git are installed along the way
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

CLI Tools #

zsh nvm plugin (I did a post some time ago):

git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm

~/.gitconfig #

[alias]
    st = status
    co = checkout
    cob = checkout -b
    del = branch -D    
    br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
    lg = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30

~/.ssh/config #

Host *
    UseKeychain yes
https://superuser.com/questions/1127067/macos-keeps-asking-my-ssh-passphrase-since-i-updated-to-sierra

3. Docker, databases and services #

I use docker for all services. No need to install anything. Docker for Mac (installed in first step) works perfectly out of the box.

One trick I started to do is having a git-enabled ~/dev folder with a docker-compose.yml file to start my required services. Currently is just this simple:

version: "3.4"
services:
postgres:
image: postgres
restart: unless-stopped
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=postgres

volumes:
postgres:

Then I just need to start them:

docker-compose up -d

I use the ~/dev folder to keep notes and snippets for my current (and future) projects.

To query and view Postgres I use postico

4. VSCode #

I've created a separate post for that. But basically download, add some plugins, fonts and theme 💅 and ready to go.


Notes: