Skip to content

Instantly share code, notes, and snippets.

@zainfathoni
Last active November 15, 2019 22:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zainfathoni/51a508565f837e923671eb419deb2199 to your computer and use it in GitHub Desktop.
Save zainfathoni/51a508565f837e923671eb419deb2199 to your computer and use it in GitHub Desktop.
macOS Initial Setup

macOS Initial Setup

My personal macOS setup guide for a new fresh installation

Notes

This repository was ported from Gist to GitHub repository due to these reasons:

  1. Gist does not support directories. 😢 I want to be able to customize my VS Code experience in this repository through configurations in a .vscode folder.
  2. The number of files are getting larger than I was planning. 😅

Since I'm not pushing to the Gist repository anymore, from now on, please refer to https://github.com/zainfathoni/macOS-Initial-Setup for the most updated version of this guide.

Google Chrome Setup

This setup is necessary if you want to use ChromeDriver to run Selenium tests in your machine. Again, this is also based on GitLab Development Kit preparation.

Install ChromeDriver using Homebrew
$ brew cask install chromedriver
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 3575, done.
remote: Counting objects: 100% (3575/3575), done.
remote: Compressing objects: 100% (3564/3564), done.
remote: Total 3575 (delta 27), reused 462 (delta 9), pack-reused 0
Receiving objects: 100% (3575/3575), 1.20 MiB | 1.29 MiB/s, done.
Resolving deltas: 100% (27/27), done.
Tapped 1 command and 3463 casks (3,581 files, 3.9MB).
==> Downloading https://chromedriver.storage.googleapis.com/78.0.3904.70/chromedriver_mac64.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'chromedriver'.
==> Installing Cask chromedriver
==> Linking Binary 'chromedriver' to '/usr/local/bin/chromedriver'.
🍺  chromedriver was successfully installed!

# Verify installation
$ chromedriver --version
ChromeDriver 78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800})

GitLab Development Kit preparation

Based on Install OS X prerequisites using Homebrew section.

Install only missing brew formulas
# List installed formulas
$ brew list
autoconf automake coreutils gettext git libgpg-error libksba libtool libyaml openssl@1.1 pcre2 pkg-config readline zlib

# Strip out git pkg-config openssl coreutils node@12 yarn
$ brew install redis postgresql@10 libiconv cmake re2 graphicsmagick runit icu4c exiftool
==> Downloading https://homebrew.bintray.com/bottles/redis-5.0.6.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/8a/8ae4fed5494daa20391ab16d4be0ba4eca3d55235c02aa576604bee568559608?__gda__=exp=1573853247~hmac=72a7e3c02643c2dff205e23e4b9178e1147aacd059685d8dcdcf57730456ee2b&response-content-disposition=at
######################################################################## 100.0%
==> Pouring redis-5.0.6.catalina.bottle.tar.gz
==> Caveats
To have launchd start redis now and restart at login:
  brew services start redis
Or, if you don't want/need a background service you can just run:
  redis-server /usr/local/etc/redis.conf
==> Summary
🍺  /usr/local/Cellar/redis/5.0.6: 13 files, 3.1MB
==> Installing dependencies for postgresql@10: icu4c
==> Installing postgresql@10 dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-64.2.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e9/e9ae7bb5a76b48e82f56bc744eaaa1e9bdb5ca49ea6b5a2e4d52f57ad331f063?__gda__=exp=1573853253~hmac=42367c9441f3b80903c3ca1222ff8bbe74bc6a103c151ebc33e39125d24586bc&response-content-disposition=at
######################################################################## 100.0%
==> Pouring icu4c-64.2.catalina.bottle.tar.gz
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

==> Summary
🍺  /usr/local/Cellar/icu4c/64.2: 257 files, 69.3MB
==> Installing postgresql@10
==> Downloading https://homebrew.bintray.com/bottles/postgresql@10-10.10_1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/36/366f1eeb324e064dc0dc7feb2daec0c516cd8f3efcdaeacf5dd3ac18b09e3eef?__gda__=exp=1573853268~hmac=a296d6d0079b141d0447de6c7e66fca562421a6ba31d65d13c5fe1f94ac35717&response-content-disposition=at
######################################################################## 100.0%
==> Pouring postgresql@10-10.10_1.catalina.bottle.tar.gz
==> /usr/local/Cellar/postgresql@10/10.10_1/bin/initdb /usr/local/var/postgresql@10
==> Caveats
To migrate existing data from a previous major version of PostgreSQL run:
  brew postgresql-upgrade-database

postgresql@10 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have postgresql@10 first in your PATH run:
  echo 'export PATH="/usr/local/opt/postgresql@10/bin:$PATH"' >> ~/.zshrc

For compilers to find postgresql@10 you may need to set:
  export LDFLAGS="-L/usr/local/opt/postgresql@10/lib"
  export CPPFLAGS="-I/usr/local/opt/postgresql@10/include"

For pkg-config to find postgresql@10 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/postgresql@10/lib/pkgconfig"


To have launchd start postgresql@10 now and restart at login:
  brew services start postgresql@10
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgresql@10 start
==> Summary
🍺  /usr/local/Cellar/postgresql@10/10.10_1: 1,708 files, 21.7MB
==> Downloading https://homebrew.bintray.com/bottles/libiconv-1.16.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/24/24d81638fcd7416a56c3dbdac7e2265d7b0476b17a71b631045425380122e6b1?__gda__=exp=1573853291~hmac=9f71887fa2b28f8b36ef4ec04da2bcaa90f9f2ee1e5cadd76bf7832483e24642&response-content-disposition=at
######################################################################## 100.0%
==> Pouring libiconv-1.16.catalina.bottle.tar.gz
==> Caveats
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libiconv first in your PATH run:
  echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.zshrc

For compilers to find libiconv you may need to set:
  export LDFLAGS="-L/usr/local/opt/libiconv/lib"
  export CPPFLAGS="-I/usr/local/opt/libiconv/include"

==> Summary
🍺  /usr/local/Cellar/libiconv/1.16: 30 files, 2.4MB
==> Downloading https://homebrew.bintray.com/bottles/cmake-3.15.5.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/46/46b47f448f7690bbed70526a42f27bea54aa7562c9eefb86955102fc83d1366d?__gda__=exp=1573853297~hmac=459a8fd3f06db57ead2e7bf30e438a85609b9064460bab2fb465ed1de16d5211&response-content-disposition=at
######################################################################## 100.0%
==> Pouring cmake-3.15.5.catalina.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/cmake
==> Summary
🍺  /usr/local/Cellar/cmake/3.15.5: 5,801 files, 53.4MB
==> Downloading https://homebrew.bintray.com/bottles/re2-20191101.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/08/08eb2896f304e147b44fc2b3ef9631277bc09bc2ac574e8d8d951e0349c4858b?__gda__=exp=1573853312~hmac=c66b709850c20ab1b700a6b6f17a7952b7c3dea024c06b6091001e328887c54c&response-content-disposition=at
######################################################################## 100.0%
==> Pouring re2-20191101.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/re2/20191101: 14 files, 1MB
==> Installing dependencies for graphicsmagick: libpng, freetype, jpeg, jasper, libtiff, little-cms2 and webp
==> Installing graphicsmagick dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.37.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/c8/c8e74da602c21f978cd7ee3d489979b4fc6681e71f678a1d99012943ee3a909f?__gda__=exp=1573853320~hmac=78170657f8ba520c72e2bf16a9e5bc9652ee176bac675f73841859195ead9630&response-content-disposition=at
######################################################################## 100.0%
==> Pouring libpng-1.6.37.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/libpng/1.6.37: 27 files, 1.2MB
==> Installing graphicsmagick dependency: freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.10.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/dd/ddd686141a969caec11ea248324e3736f6db50a54673187be103dde39cb01ebf?__gda__=exp=1573853325~hmac=c4cda7151cd318dcb9251599fcba0452c804609a7c4d42d6b778c52d6eccc93e&response-content-disposition=at
######################################################################## 100.0%
==> Pouring freetype-2.10.1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/freetype/2.10.1: 61 files, 2.2MB
==> Installing graphicsmagick dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-9c.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/b9/b94875481e23ee43f98c5d87085e47821a0100e2d79da309c31303f4c933f076?__gda__=exp=1573853331~hmac=02e9327dd7defe8bb3b96f7ef9f20a2dfdbd82d28cc903387808329f7944c432&response-content-disposition=at
######################################################################## 100.0%
==> Pouring jpeg-9c.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/jpeg/9c: 21 files, 764.9KB
==> Installing graphicsmagick dependency: jasper
==> Downloading https://homebrew.bintray.com/bottles/jasper-2.0.16_1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/eb/eb5d0888be36aa8afb0eccc43957eeda99ded64ec5a5531240a4ec99450ba183?__gda__=exp=1573853337~hmac=eb0cbe411b2eede2fb285d54afdad200fe273db73a8d524b3d6a18622975cc78&response-content-disposition=at
######################################################################## 100.0%
==> Pouring jasper-2.0.16_1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/jasper/2.0.16_1: 40 files, 1.4MB
==> Installing graphicsmagick dependency: libtiff
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.1.0.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/44/449bd9123e73e4c4eab85b77322d769cc9df0f6adab05e9b9319b012d1215a68?__gda__=exp=1573853342~hmac=ea0313c8bf649b8f13bbb0849e457e98694fad620f4e3d0ad624041d443265fc&response-content-disposition=at
######################################################################## 100.0%
==> Pouring libtiff-4.1.0.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/libtiff/4.1.0: 247 files, 3.7MB
==> Installing graphicsmagick dependency: little-cms2
==> Downloading https://homebrew.bintray.com/bottles/little-cms2-2.9.catalina.bottle.1.tar.gz
==> Downloading from https://akamai.bintray.com/fc/fc3b420e222a614a0f5b9fb91af41117ea1290ff19ea73dfc5e1b2021289b1b1?__gda__=exp=1573853349~hmac=a4fdb8e7d73a903d8aebbc32d14a664e21fd5cf49848204eae24cde264072731&response-content-disposition=at
######################################################################## 100.0%
==> Pouring little-cms2-2.9.catalina.bottle.1.tar.gz
🍺  /usr/local/Cellar/little-cms2/2.9: 18 files, 1MB
==> Installing graphicsmagick dependency: webp
==> Downloading https://homebrew.bintray.com/bottles/webp-1.0.3.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/6b/6bce8ee7b2b0cb615ea73deed3de3f345bcec05720222bd23882d4d8b7424fb6?__gda__=exp=1573853354~hmac=71b4dfbe3a9887b00b1a4fd21d9c231e059566622fe50074f4e916b4c82662aa&response-content-disposition=at
######################################################################## 100.0%
==> Pouring webp-1.0.3.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/webp/1.0.3: 39 files, 2.1MB
==> Installing graphicsmagick
==> Downloading https://homebrew.bintray.com/bottles/graphicsmagick-1.3.33.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/f7/f7a2699874e537fd81c0bcd0e06e72d987d0b951a34d724812459c42a6f6d16c?__gda__=exp=1573853360~hmac=b0d5b679cccabed652c90e5a0e632787acca6d7f0f1327c73478b8a90f10e81e&response-content-disposition=at
######################################################################## 100.0%
==> Pouring graphicsmagick-1.3.33.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/graphicsmagick/1.3.33: 490 files, 12.9MB
==> Downloading https://homebrew.bintray.com/bottles/runit-2.1.2.catalina.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring runit-2.1.2.catalina.bottle.1.tar.gz
==> Caveats
This formula does not install runit as a replacement for init.
The service directory is /usr/local/var/service instead of /service.

A system service that runs runsvdir with the default service directory is
provided. Alternatively you can run runsvdir manually:

     runsvdir -P /usr/local/var/service

Depending on the services managed by runit, this may need to start as root.

To have launchd start runit now and restart at login:
  brew services start runit
Or, if you don't want/need a background service you can just run:
  runit
==> Summary
🍺  /usr/local/Cellar/runit/2.1.2: 21 files, 310.1KB
==> Downloading https://homebrew.bintray.com/bottles/exiftool-11.70.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/fe/fed471f04fc57bfb8c5710d39a01f1a1176a85cf9cc0de2a9d8120382c287a2b?__gda__=exp=1573853375~hmac=5980563adbd43c1efe9857519d1ac23b5f6660e0b84f7bc4021722143369e83a&response-content-disposition=at
######################################################################## 100.0%
==> Pouring exiftool-11.70.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/exiftool/11.70: 556 files, 22.1MB
==> Caveats
==> redis
To have launchd start redis now and restart at login:
  brew services start redis
Or, if you don't want/need a background service you can just run:
  redis-server /usr/local/etc/redis.conf
==> icu4c
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

==> postgresql@10
To migrate existing data from a previous major version of PostgreSQL run:
  brew postgresql-upgrade-database

postgresql@10 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have postgresql@10 first in your PATH run:
  echo 'export PATH="/usr/local/opt/postgresql@10/bin:$PATH"' >> ~/.zshrc

For compilers to find postgresql@10 you may need to set:
  export LDFLAGS="-L/usr/local/opt/postgresql@10/lib"
  export CPPFLAGS="-I/usr/local/opt/postgresql@10/include"

For pkg-config to find postgresql@10 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/postgresql@10/lib/pkgconfig"


To have launchd start postgresql@10 now and restart at login:
  brew services start postgresql@10
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgresql@10 start
==> libiconv
libiconv is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libiconv first in your PATH run:
  echo 'export PATH="/usr/local/opt/libiconv/bin:$PATH"' >> ~/.zshrc

For compilers to find libiconv you may need to set:
  export LDFLAGS="-L/usr/local/opt/libiconv/lib"
  export CPPFLAGS="-I/usr/local/opt/libiconv/include"

==> cmake
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/cmake
==> runit
This formula does not install runit as a replacement for init.
The service directory is /usr/local/var/service instead of /service.

A system service that runs runsvdir with the default service directory is
provided. Alternatively you can run runsvdir manually:

     runsvdir -P /usr/local/var/service

Depending on the services managed by runit, this may need to start as root.

To have launchd start runit now and restart at login:
  brew services start runit
Or, if you don't want/need a background service you can just run:
  runit

Go Setup

Download Go macOS binary release and follow the installation instructions

Install Go using Homebrew
$ brew install go
==> Downloading https://homebrew.bintray.com/bottles/go-1.13.4.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/77/77af3e8081a002c86b4b87ec97dc5dc28cab49704913a4db22ebc7ce838dc6ad?__gda__=exp=1573853061~hmac=4f8bdec8b39750ab62edab55f63d702da3913ec5fc4fa004099021f382b97f69&response-content-disposition=at
######################################################################## 100.0%
==> Pouring go-1.13.4.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/go/1.13.4: 9,271 files, 414MB

# verify installation
$ go version
go version go1.13.4 darwin/amd64

$ echo $GOPATH
/Users/zain/Code/go

$ mkdir $GOPATH

$ cd $GOPATH

$ mkdir src

$ mkdir src/hello

$ cd src/hello

$ echo "package main

import \"fmt\"

func main() {
        fmt.Printf(\"hello, world\\\n\")
}" >> hello.go

$ go build

$ ./hello
hello, world

Installation

OS Preferences

  • Software Update
  • General
  • Desktop & Screen Saver
    Hot Corners Active Screen Corners
  • Display Settings
  • Dock
  • Internet Accounts
  • Touch ID
  • Keyboard
    • Input Sources - Dvorak
  • Trackpad
    Trackpad Trackpad
  • Mouse
  • Finder Sidebar
    Finder Sidebar Finder Sidebar

Applications

App Store

Manual Download

Development Environment

Terminal

Please refer to terminal.md file

NodeJS

Please refer to node-js.md file

Ruby

Please refer to ruby.md file

Go

Please refer to go.md file

Chrome

Please refer to chrome.md file

Please refer to gdk-prepare.md file

NodeJS Setup

Install as an oh-my-zsh custom plugn
$ git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
Cloning into '/Users/zain/.oh-my-zsh/custom/plugins/zsh-nvm'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 523 (delta 1), reused 2 (delta 0), pack-reused 517
Receiving objects: 100% (523/523), 74.10 KiB | 267.00 KiB/s, done.
Resolving deltas: 100% (272/272), done.

$ source ~/.zshrc
Installing nvm...
Cloning into '/Users/zain/.nvm'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 7566 (delta 5), reused 14 (delta 4), pack-reused 7549
Receiving objects: 100% (7566/7566), 2.50 MiB | 480.00 KiB/s, done.
Resolving deltas: 100% (4777/4777), done.

# Verify Installation https://github.com/nvm-sh/nvm#verify-installation
$ command -v nvm
nvm

# Ensure Upgrade command is working https://github.com/lukechilds/zsh-nvm#upgrade
$ nvm upgrade
Installed version is v0.35.1
Checking latest version of nvm...
You're already up to date

NodeJS

Install latest LTS version of NodeJS
$ nvm install --lts
Installing latest LTS version.
Downloading and installing node v12.13.0...
Downloading https://nodejs.org/dist/v12.13.0/node-v12.13.0-darwin-x64.tar.gz...
######################################################################################################################################################################################################################################### 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v12.13.0 (npm v6.12.0)
Creating default alias: default -> lts/* (-> v12.13.0)

# Verify Installation
$ nvm current
v12.13.0

$ node --version
v12.13.0

$ npm --version
6.12.0

Yarn

Install Yarn using Installation Script
$ curl -o- -L https://yarnpkg.com/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7152    0  7152    0     0  66841      0 --:--:-- --:--:-- --:--:-- 66841
Installing Yarn!
> Downloading tarball...

[1/2]: https://yarnpkg.com/latest.tar.gz --> /var/folders/5q/bylvzmn17nd7zqyx6gsvr08h0000gn/T/yarn.tar.gz.XXXXXXXXXX.EnIkfC0T
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    93  100    93    0     0   1309      0 --:--:-- --:--:-- --:--:--  1291
100   609    0   609    0     0   1164      0 --:--:-- --:--:-- --:--:--  1164
100 1214k  100 1214k    0     0   374k      0  0:00:03  0:00:03 --:--:--  568k

[2/2]: https://yarnpkg.com/latest.tar.gz.asc --> /var/folders/5q/bylvzmn17nd7zqyx6gsvr08h0000gn/T/yarn.tar.gz.XXXXXXXXXX.EnIkfC0T.asc
100    97  100    97    0     0   4041      0 --:--:-- --:--:-- --:--:--  4041
100   613    0   613    0     0   1583      0 --:--:-- --:--:-- --:--:--  1583
100   832  100   832    0     0   1258      0 --:--:-- --:--:-- --:--:--  1258
> Verifying integrity...
gpg: key 1646B01B86E50310: public key "Yarn Packaging <yarn@dan.cx>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: Signature made Tue Oct  8 19:36:57 2019 +08
gpg:                using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA
gpg: Good signature from "Yarn Packaging <yarn@dan.cx>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
     Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
> GPG signature looks good
> Extracting to ~/.yarn...
> Adding to $PATH...
> We've added the following to your /Users/zain/.zshrc
> If this isn't the profile of your current shell then please add the following to your correct profile:

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

> Successfully installed Yarn 1.19.1! Please open another terminal where the `yarn` command will now be available.

# Verify installation
$ source ~/.zshrc
#blank

$ yarn --version
1.19.1

Ruby Setup

Install maintainer's GPG keys
$ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: key 105BD0E739499BDB: public key "Piotr Kuczynski <piotr.kuczynski@gmail.com>" imported
gpg: key 3804BB82D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: Total number processed: 2
gpg:               imported: 2

# Ensure keys are properly installed
$ gpg2 --refresh-keys
gpg: refreshing 5 keys from hkps://keys.openpgp.org
gpg: key 3804BB82D39DC0E3: "Michal Papis (RVM signing) <mpapis@gmail.com>" not changed
gpg: key 105BD0E739499BDB: "Piotr Kuczynski <piotr.kuczynski@gmail.com>" not changed
gpg: key 1646B01B86E50310: "Yarn Packaging <yarn@dan.cx>" not changed
gpg: key 3E5591EDA5F9175F: "Zain Fathoni <zain.fathoni@gmail.com>" not changed
gpg: key 76D78F0500D026C4: "GPGTools Team <team@gpgtools.org>" not changed
gpg: Total number processed: 5
gpg:              unchanged: 5
Install RVM
$ \curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.9.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc
gpg: Signature made Wed Jul 10 16:31:02 2019 +08
gpg:                using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
GPG verified '/Users/zain/.rvm/archives/rvm-1.29.9.tgz'
Installing RVM to /Users/zain/.rvm/
    RVM PATH line found in /Users/zain/.zshrc.
    RVM PATH line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.
    RVM sourcing line found in /Users/zain/.zshrc.
    RVM sourcing line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.
Installation of RVM in /Users/zain/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/zain/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.

👉  Donate: https://opencollective.com/rvm/donate

# Verify Installation
$ rvm --version
rvm 1.29.9 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

Ruby

Based on GitLab Development Kit preparation.

Install Ruby
# Install the current gitlab Ruby version https://gitlab.com/gitlab-org/gitlab/blob/master/.ruby-version
$ rvm install 2.6.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.15/x86_64/ruby-2.6.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system - please wait
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl@1.1 - please wait
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/zain/.rvm/rubies/ruby-2.6.3, this may take a while depending on your cpu(s)...
ruby-2.6.3 - #downloading ruby-2.6.3, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.8M  100 13.8M    0     0  17.5M      0 --:--:-- --:--:-- --:--:-- 17.5M
ruby-2.6.3 - #extracting ruby-2.6.3 to /Users/zain/.rvm/src/ruby-2.6.3 - please wait
ruby-2.6.3 - #configuring - please wait
ruby-2.6.3 - #post-configuration - please wait
ruby-2.6.3 - #compiling - please wait
ruby-2.6.3 - #installing - please wait
ruby-2.6.3 - #making binaries executable - please wait
ruby-2.6.3 - #downloading rubygems-3.0.6
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  866k  100  866k    0     0  7468k      0 --:--:-- --:--:-- --:--:-- 7468k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.6.3 - #extracting rubygems-3.0.6 - please wait
ruby-2.6.3 - #removing old rubygems - please wait
$LANG was empty, setting up LANG=en_US.US-ASCII, if it fails again try setting LANG to something sane and try again.
ruby-2.6.3 - #installing rubygems-3.0.6 - please wait
ruby-2.6.3 - #gemset created /Users/zain/.rvm/gems/ruby-2.6.3@global
ruby-2.6.3 - #importing gemset /Users/zain/.rvm/gemsets/global.gems - please wait
ruby-2.6.3 - #generating global wrappers - please wait
ruby-2.6.3 - #gemset created /Users/zain/.rvm/gems/ruby-2.6.3
ruby-2.6.3 - #importing gemsetfile /Users/zain/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.6.3 - #generating default wrappers - please wait
ruby-2.6.3 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.6.3 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri

# Verify installation
$ ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin19]

Bundler

Install the version of Bundler specified in Gemfile.lock, right below the text BUNDLED WITH.

Install Bundler $ gem install bundler -v 1.17.3 Fetching bundler-1.17.3.gem Successfully installed bundler-1.17.3 Parsing documentation for bundler-1.17.3 Installing ri documentation for bundler-1.17.3 Done installing documentation for bundler after 3 seconds 1 gem installed

Terminal Setup

Basic Environment

Default Shell

Right after installing iTerm2, you must be getting this prompt:

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit Use zsh as the default shell on your Mac.

chsh -s /bin/zsh
$ chsh -s /bin/zsh
Changing shell for zain.
Password for zain:

Package Manager

Install Homebrew package manager.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/bin
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
/usr/local/var
/usr/local/opt
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/Homebrew
/usr/local/Frameworks
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown zain /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Homebrew /usr/local/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /Users/zain/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/zain/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown zain /Users/zain/Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools for Xcode-11.2
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ for\ Xcode-11.2
Software Update Tool


Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
==> Downloading and installing Homebrew...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 128580 (delta 6), reused 1 (delta 0), pack-reused 128564
Receiving objects: 100% (128580/128580), 30.65 MiB | 7.56 MiB/s, done.
Resolving deltas: 100% (94350/94350), done.
From https://github.com/Homebrew/brew
 * [new branch]      master     -> origin/master
 * [new tag]         0.1        -> 0.1
 * [new tag]         0.2        -> 0.2
 * [new tag]         0.3        -> 0.3
 * [new tag]         0.4        -> 0.4
 * [new tag]         0.5        -> 0.5
 * [new tag]         0.6        -> 0.6
 * [new tag]         0.7        -> 0.7
 * [new tag]         0.7.1      -> 0.7.1
 * [new tag]         0.8        -> 0.8
 * [new tag]         0.8.1      -> 0.8.1
 * [new tag]         0.9        -> 0.9
 * [new tag]         0.9.1      -> 0.9.1
 * [new tag]         0.9.2      -> 0.9.2
 * [new tag]         0.9.3      -> 0.9.3
 * [new tag]         0.9.4      -> 0.9.4
 * [new tag]         0.9.5      -> 0.9.5
 * [new tag]         0.9.8      -> 0.9.8
 * [new tag]         0.9.9      -> 0.9.9
 * [new tag]         1.0.0      -> 1.0.0
 * [new tag]         1.0.1      -> 1.0.1
 * [new tag]         1.0.2      -> 1.0.2
 * [new tag]         1.0.3      -> 1.0.3
 * [new tag]         1.0.4      -> 1.0.4
 * [new tag]         1.0.5      -> 1.0.5
 * [new tag]         1.0.6      -> 1.0.6
 * [new tag]         1.0.7      -> 1.0.7
 * [new tag]         1.0.8      -> 1.0.8
 * [new tag]         1.0.9      -> 1.0.9
 * [new tag]         1.1.0      -> 1.1.0
 * [new tag]         1.1.1      -> 1.1.1
 * [new tag]         1.1.10     -> 1.1.10
 * [new tag]         1.1.11     -> 1.1.11
 * [new tag]         1.1.12     -> 1.1.12
 * [new tag]         1.1.13     -> 1.1.13
 * [new tag]         1.1.2      -> 1.1.2
 * [new tag]         1.1.3      -> 1.1.3
 * [new tag]         1.1.4      -> 1.1.4
 * [new tag]         1.1.5      -> 1.1.5
 * [new tag]         1.1.6      -> 1.1.6
 * [new tag]         1.1.7      -> 1.1.7
 * [new tag]         1.1.8      -> 1.1.8
 * [new tag]         1.1.9      -> 1.1.9
 * [new tag]         1.2.0      -> 1.2.0
 * [new tag]         1.2.1      -> 1.2.1
 * [new tag]         1.2.2      -> 1.2.2
 * [new tag]         1.2.3      -> 1.2.3
 * [new tag]         1.2.4      -> 1.2.4
 * [new tag]         1.2.5      -> 1.2.5
 * [new tag]         1.2.6      -> 1.2.6
 * [new tag]         1.3.0      -> 1.3.0
 * [new tag]         1.3.1      -> 1.3.1
 * [new tag]         1.3.2      -> 1.3.2
 * [new tag]         1.3.3      -> 1.3.3
 * [new tag]         1.3.4      -> 1.3.4
 * [new tag]         1.3.5      -> 1.3.5
 * [new tag]         1.3.6      -> 1.3.6
 * [new tag]         1.3.7      -> 1.3.7
 * [new tag]         1.3.8      -> 1.3.8
 * [new tag]         1.3.9      -> 1.3.9
 * [new tag]         1.4.0      -> 1.4.0
 * [new tag]         1.4.1      -> 1.4.1
 * [new tag]         1.4.2      -> 1.4.2
 * [new tag]         1.4.3      -> 1.4.3
 * [new tag]         1.5.0      -> 1.5.0
 * [new tag]         1.5.1      -> 1.5.1
 * [new tag]         1.5.10     -> 1.5.10
 * [new tag]         1.5.11     -> 1.5.11
 * [new tag]         1.5.12     -> 1.5.12
 * [new tag]         1.5.13     -> 1.5.13
 * [new tag]         1.5.14     -> 1.5.14
 * [new tag]         1.5.2      -> 1.5.2
 * [new tag]         1.5.3      -> 1.5.3
 * [new tag]         1.5.4      -> 1.5.4
 * [new tag]         1.5.5      -> 1.5.5
 * [new tag]         1.5.6      -> 1.5.6
 * [new tag]         1.5.7      -> 1.5.7
 * [new tag]         1.5.8      -> 1.5.8
 * [new tag]         1.5.9      -> 1.5.9
 * [new tag]         1.6.0      -> 1.6.0
 * [new tag]         1.6.1      -> 1.6.1
 * [new tag]         1.6.10     -> 1.6.10
 * [new tag]         1.6.11     -> 1.6.11
 * [new tag]         1.6.12     -> 1.6.12
 * [new tag]         1.6.13     -> 1.6.13
 * [new tag]         1.6.14     -> 1.6.14
 * [new tag]         1.6.15     -> 1.6.15
 * [new tag]         1.6.16     -> 1.6.16
 * [new tag]         1.6.17     -> 1.6.17
 * [new tag]         1.6.2      -> 1.6.2
 * [new tag]         1.6.3      -> 1.6.3
 * [new tag]         1.6.4      -> 1.6.4
 * [new tag]         1.6.5      -> 1.6.5
 * [new tag]         1.6.6      -> 1.6.6
 * [new tag]         1.6.7      -> 1.6.7
 * [new tag]         1.6.8      -> 1.6.8
 * [new tag]         1.6.9      -> 1.6.9
 * [new tag]         1.7.0      -> 1.7.0
 * [new tag]         1.7.1      -> 1.7.1
 * [new tag]         1.7.2      -> 1.7.2
 * [new tag]         1.7.3      -> 1.7.3
 * [new tag]         1.7.4      -> 1.7.4
 * [new tag]         1.7.5      -> 1.7.5
 * [new tag]         1.7.6      -> 1.7.6
 * [new tag]         1.7.7      -> 1.7.7
 * [new tag]         1.8.0      -> 1.8.0
 * [new tag]         1.8.1      -> 1.8.1
 * [new tag]         1.8.2      -> 1.8.2
 * [new tag]         1.8.3      -> 1.8.3
 * [new tag]         1.8.4      -> 1.8.4
 * [new tag]         1.8.5      -> 1.8.5
 * [new tag]         1.8.6      -> 1.8.6
 * [new tag]         1.9.0      -> 1.9.0
 * [new tag]         1.9.1      -> 1.9.1
 * [new tag]         1.9.2      -> 1.9.2
 * [new tag]         1.9.3      -> 1.9.3
 * [new tag]         2.0.0      -> 2.0.0
 * [new tag]         2.0.1      -> 2.0.1
 * [new tag]         2.0.2      -> 2.0.2
 * [new tag]         2.0.3      -> 2.0.3
 * [new tag]         2.0.4      -> 2.0.4
 * [new tag]         2.0.5      -> 2.0.5
 * [new tag]         2.0.6      -> 2.0.6
 * [new tag]         2.1.0      -> 2.1.0
 * [new tag]         2.1.1      -> 2.1.1
 * [new tag]         2.1.10     -> 2.1.10
 * [new tag]         2.1.11     -> 2.1.11
 * [new tag]         2.1.12     -> 2.1.12
 * [new tag]         2.1.13     -> 2.1.13
 * [new tag]         2.1.14     -> 2.1.14
 * [new tag]         2.1.15     -> 2.1.15
 * [new tag]         2.1.16     -> 2.1.16
 * [new tag]         2.1.2      -> 2.1.2
 * [new tag]         2.1.3      -> 2.1.3
 * [new tag]         2.1.4      -> 2.1.4
 * [new tag]         2.1.5      -> 2.1.5
 * [new tag]         2.1.6      -> 2.1.6
 * [new tag]         2.1.7      -> 2.1.7
 * [new tag]         2.1.8      -> 2.1.8
 * [new tag]         2.1.9      -> 2.1.9
HEAD is now at e2c76cce8 Merge pull request #6713 from papz/master
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 5084, done.
remote: Counting objects: 100% (5084/5084), done.
remote: Compressing objects: 100% (4879/4879), done.
remote: Total 5084 (delta 45), reused 380 (delta 10), pack-reused 0
Receiving objects: 100% (5084/5084), 4.17 MiB | 1.97 MiB/s, done.
Resolving deltas: 100% (45/45), done.
Tapped 2 commands and 4867 formulae (5,126 files, 12.9MB).
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation:
    https://docs.brew.sh

Official Git

Install the latest official Git version (as opposed to the Apple Git version) using Homebrew.

brew install git
$ brew install git
==> Installing dependencies for git: gettext and pcre2
==> Installing git dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.20.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/10/107d7f386fbeea6979f9376cdbbcf3f60943caaad61bdc754d3019ce625dffe6?__gda__=exp=1573233830~hmac=1bcb001fb839dc8886
######################################################################## 100.0%
==> Pouring gettext-0.20.1.catalina.bottle.tar.gz
==> Caveats
gettext is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have gettext first in your PATH run:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.zshrc

For compilers to find gettext you may need to set:
  export LDFLAGS="-L/usr/local/opt/gettext/lib"
  export CPPFLAGS="-I/usr/local/opt/gettext/include"

==> Summary
🍺  /usr/local/Cellar/gettext/0.20.1: 1,893 files, 18.4MB
==> Installing git dependency: pcre2
==> Downloading https://homebrew.bintray.com/bottles/pcre2-10.33.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/7b/7b92993a7ad0487cabc4395e3633d8294896fa9ffa9e46507d9a7ef25a213ab8?__gda__=exp=1573233836~hmac=931bf03fae3350118d
######################################################################## 100.0%
==> Pouring pcre2-10.33.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/pcre2/10.33: 226 files, 5.8MB
==> Installing git
==> Downloading https://homebrew.bintray.com/bottles/git-2.24.0.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/fa/fa754c684673a191b999528995c1dc4b0d597a95ed6a2b1dd213c8e7018885ab?__gda__=exp=1573233845~hmac=94da9661072522e3cf
######################################################################## 100.0%
==> Pouring git-2.24.0.catalina.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git
==> Summary
🍺  /usr/local/Cellar/git/2.24.0: 1,547 files, 45.5MB
==> Caveats
==> gettext
gettext is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have gettext first in your PATH run:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.zshrc

For compilers to find gettext you may need to set:
  export LDFLAGS="-L/usr/local/opt/gettext/lib"
  export CPPFLAGS="-I/usr/local/opt/gettext/include"

==> git
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git

Dotfiles

Clone your personal dotfiles repository over HTTPS using personal access token.

https://git.io/dotbot
$ git clone https://github.com/zainfathoni/dotfiles.git
Cloning into 'dotfiles'...
remote: Enumerating objects: 56, done.
remote: Counting objects: 100% (56/56), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 164 (delta 21), reused 46 (delta 15), pack-reused 108
Receiving objects: 100% (164/164), 54.99 KiB | 244.00 KiB/s, done.
Resolving deltas: 100% (74/74), done.

$ cd dotfiles
# blank

$ ./install
Submodule 'dotbot' (https://github.com/anishathalye/dotbot) registered for path 'dotbot'
Cloning into '/Users/zain/Code/GitHub/zainfathoni/dotfiles/dotbot'...
Submodule path 'dotbot': checked out 'fe9ca6f5ede35d16f28e0c5db781fb39437fd171'
Submodule 'lib/pyyaml' (https://github.com/anishathalye/pyyaml) registered for path 'dotbot/lib/pyyaml'
Cloning into '/Users/zain/Code/GitHub/zainfathoni/dotfiles/dotbot/lib/pyyaml'...
Submodule path 'dotbot/lib/pyyaml': checked out 'f30c956c11aa6b5e7827fe5840cc9ed40b938d17'
All targets have been cleaned
Creating link ~/bamboo-agent.cfg.xml -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/bamboo-agent.cfg.xml
Creating link ~/.dotfiles -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/
Creating link ~/.gitconfig -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitconfig
Creating link ~/.gitconfig_ninjavan -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitconfig_ninjavan
Creating link ~/.gitconfig_zainfathoni -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitconfig_zainfathoni
Creating link ~/.gitignore_global -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitignore_global
Creating directory /Users/zain/.ssh
Creating link ~/.ssh/config -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/ssh/config
Creating link ~/.ssl -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/ssl
Creating link ~/.vimrc -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/vimrc
Creating link ~/.zsh -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/zsh
Creating link ~/.zshrc -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/zshrc
All links have been set up

==> All tasks executed successfully

SSH

Add your SSH key to the ssh-agent

Start the ssh-agent in the background.
$ eval "$(ssh-agent -s)"
Agent pid 27674
Symlink SSH keys from Box folder
$ chmod +x ~/Box/dotfiles/install-ssh-keys.sh
# blank

$ ~/Box/dotfiles/install-ssh-keys.sh
# blank

$ ls -al ~/.ssh
total 0
drwxr-xr-x   5 zain  staff   160 Nov  9 02:11 .
drwxr-xr-x+ 37 zain  staff  1184 Nov  9 02:11 ..
lrwxr-xr-x   1 zain  staff    55 Nov  9 01:57 config -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/ssh/config
lrwxr-xr-x   1 zain  staff    41 Nov  9 02:11 zainfathoni -> /Users/zain/Box/dotfiles/.ssh/zainfathoni
lrwxr-xr-x   1 zain  staff    45 Nov  9 02:11 zainfathoni.pub -> /Users/zain/Box/dotfiles/.ssh/zainfathoni.pub
Add your SSH private key to the ssh-agent and store your passphrase in the keychain
$ ssh-add -K ~/.ssh/zainfathoni
Enter passphrase for /Users/zain/.ssh/zainfathoni:
Identity added: /Users/zain/.ssh/zainfathoni (/Users/zain/.ssh/zainfathoni)

Advanced Environment

GPG Key for signing commits

1. Install GPG Suite

Refer to their first steps tutorial if necessary.

2. Install LastPass binary-version from AppStore

So you can download your GPG secret key file.

GPG Key file stored at LastPass GPG Key file stored at LastPass

3. Import GPG Key to GPG Keychain

Import GPG Key to GPG Keychain Import GPG Key to GPG Keychain

4. If you performed above steps properly, when you're committing in Visual Studio Code for the first time, you will be prompted for a passphrase to unlock your OpenPGP secret key

Please make sure that you check ✅ Save in Keychain so that you don't need to enter the passphrase anymore in the future.

Save GPG Passphrase in Keychain Save GPG Passphrase in Keychain

5. To ensure that it's working, restart the laptop and try committing again through Visual Studio Code

You should not be required to enter the passphrase anymore while keep getting your commits signed properly.

Signed Commits 🎉 Signed Commits

Cosmetics

Based on Badassify your terminal and shell article and iterm2-solarized gist.

Install oh-my-zsh

Install oh-my-zsh and fix .zshrc symlink file
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Cloning Oh My Zsh...
Cloning into '/Users/zain/.oh-my-zsh'...
remote: Enumerating objects: 1102, done.
remote: Counting objects: 100% (1102/1102), done.
remote: Compressing objects: 100% (1054/1054), done.
remote: Total 1102 (delta 23), reused 884 (delta 19), pack-reused 0
Receiving objects: 100% (1102/1102), 721.38 KiB | 401.00 KiB/s, done.
Resolving deltas: 100% (23/23), done.

Looking for an existing zsh config...
Found ~/.zshrc. Backing up to /Users/zain/.zshrc.pre-oh-my-zsh
Using the Oh My Zsh template file and adding it to ~/.zshrc.

         __                                     __
  ____  / /_     ____ ___  __  __   ____  _____/ /_
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/
                        /____/                       ....is now installed!


Please look over the ~/.zshrc file to select plugins, themes, and options.

p.s. Follow us on https://twitter.com/ohmyzsh

p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh

$ mv ~/.zshrc ~/.zshrc.post-oh-my-zsh # Rename the new .zsh file from installation
blank

$ ~/Code/GitHub/zainfathoni/dotfiles/install # Reinstall dotfiles to put back the original .zsh file from dotfiles
All targets have been cleaned
Link exists ~/bamboo-agent.cfg.xml -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/bamboo-agent.cfg.xml
Link exists ~/.dotfiles -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/
Link exists ~/.gitconfig -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitconfig
Link exists ~/.gitconfig_ninjavan -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitconfig_ninjavan
Link exists ~/.gitconfig_zainfathoni -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitconfig_zainfathoni
Link exists ~/.gitignore_global -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/gitignore_global
Link exists ~/.hushlogin -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/hushlogin
Link exists ~/.ssh/config -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/ssh/config
Link exists ~/.ssl -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/ssl
Link exists ~/.vimrc -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/vimrc
Link exists ~/.zsh -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/zsh
Creating link ~/.zshrc -> /Users/zain/Code/GitHub/zainfathoni/dotfiles/zshrc
All links have been set up

==> All tasks executed successfully

Install Fonts

Install Powerlevel10k
$ git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
Cloning into '/Users/zain/.oh-my-zsh/custom/themes/powerlevel10k'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 10496 (delta 1), reused 5 (delta 1), pack-reused 10489
Receiving objects: 100% (10496/10496), 54.43 MiB | 1.35 MiB/s, done.
Resolving deltas: 100% (6548/6548), done.
Install Source Code Pro + Font Awesome patched font
  1. Download SourceCodePro+Powerline+Awesome+Regular.ttf font
  2. Install the font
  3. Set this font in iTerm2 (iTerm → Preferences → Profiles → Text → Change Font), best to do this for "Font" and for "Non-ASCII Font". iTerm2 Font Settings
  4. Restart iTerm2 for all changes to take effect.
Install zsh-autosuggestions
$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Cloning into '/Users/zain/.oh-my-zsh/custom/plugins/zsh-autosuggestions'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 2275 (delta 2), reused 4 (delta 0), pack-reused 2266
Receiving objects: 100% (2275/2275), 519.66 KiB | 586.00 KiB/s, done.
Resolving deltas: 100% (1449/1449), done.
Install zsh-syntax-highlighting
$ cd ~/.oh-my-zsh && git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
Cloning into 'zsh-syntax-highlighting'...
remote: Enumerating objects: 104, done.
remote: Counting objects: 100% (104/104), done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 5492 (delta 66), reused 70 (delta 39), pack-reused 5388
Receiving objects: 100% (5492/5492), 1.13 MiB | 340.00 KiB/s, done.
Resolving deltas: 100% (3642/3642), done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment