| Setup
Setup

GitLab Project

I use this GitLab Project for this work: https://code.jeromezng.com/groups/setup/-/boards/9

Devices

Desktop Apps

Dock
- Finder
- Firefox
- Slack
- Discord
- Zoom
- Spotify
- VSCode
- Sublime
- XCode
- Terminal
- Settings

Mobile Apps

Web Apps

Development Environment

Using Rosetta

If you're using an Apple Silicon Mac (M1), you may need to use Rosetta (Apple's translation layer from Intel to Arm) to run certain applications which aren't natively supported on Apple Silicon yet. Creating a Rosetta terminal allows you to run certain processes using Intel architecture rather than Arm.

Here's how to create a Rosetta terminal:
Use Finder and under Applications search for Terminal. Duplicate Terminal and rename it to "Rosetta-Terminal". Right click "Get Info" and select "Open Using Rosetta". Open the "Rosetta-Terminal" and type arch, you should see this say i386 or another Intel architecture.

Setup terminal

Setup default profile styling for terminal:
Open Terminal > Preferences > General > On startup, open: New window with profile: Pro

Setup default use of zshell for terminal:
Open Terminal > Preferences > General > Shell open with: Command (complete path): /bin/zsh

Create a dev folder

mkdir ~/dev

Setup SSH

Update your git config

git config --global user.name username

Check that the git config was added correctly

git config --global --list

Create a .ssh directory

mkdir ~/.ssh

Navigate to the .ssh directory

cd ~/.ssh

If you have an old ssh key you'd like to preserve, rename the old ssh key file to avoid overwriting the previous key

mv id_ed25519 id_ed25519_old
mv id_ed25519.pub id_ed25519.pub_old

Generate SSH key and set a password for added security

ssh-keygen -t ed25519

Copy SSH key

cat ~/.ssh/id_ed25519.pub

Add SSH to your code repository in GitLab / GitHub / etc.

Add the following to your zshell profile to always source your ssh key nano ~/.zshrc

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

Install XCode

XCode can be installed through the XCode website, using the App Store, or through your terminal using xcode-select --install. My preference is to use the XCode website.

During development I've frequently run into the error Gem installation error: You have to install development tools first. If you encounter this, run sudo xcode-select -switch / (Source: Stackoverflow)

Install VSCode

VSCode can be installed through the Visual Studio website, using the AppStore, or using homebrew using brew install visual-studio-code . My preference is to use the Visual Studio website.

Launch VSCode from Terminal

After VSCode is installed, use the code . command in your terminal to run VSCode. If it doesn't work, you can either:

A. Open the Command Palette (Cmd+Shift+P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.

B. Add the code command to ~/.zshrc

# Use VSCode 'code' command in shell
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}

Use VSCode as your default editor by adding it to your ~/.zshrc

# Use VSCode as default editor
export EDITOR="code --wait" 

VSCode Preferences

General > Preferences > Settings
- Editor Tab Size 2

VSCode Extensions

Install Sublime

Sublime text can be installed through the Sublime website or by using homebrew using brew install sublime-text. My preference is to use the Sublime website.

Using Homebrew

brew install sublime-text

Open sublime from terminal

subl .

Using Downloaded Install

Visit https://www.sublimetext.com/ and "Download for Mac". Open and install.

Make bin directory

mkdir ~/bin

Copy sublime to bin directory

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl

Add sublime command to be accessible from the command line

echo 'export PATH=$PATH:$HOME/bin' >> ~/.zshrc
echo "export EDITOR='subl' -w" >> ~/.zshrc

Restart terminal and open sublime from terminal

subl .

Browser Setup

Default Browser: Firefox
Home Content: None
Default Search Engine: DuckDuckGo
Browser Privacy: Strict
Send websites a "Do Not Track": Always
Logins and Passwords: No
Forms and Autofill: No
Data Collection and Use: None
Security: All
Sync: Bookmarks

Bookmarks

Browser Extensions

Finder Setup

Preferences > Sidebar > Locations > [x] Laptop, [x] Hard disks

Metabase Setup

Metabase can be downloaded using a Docker image or Jar file. I prefer to use the Docker file by opening a terminal and running docker run -d -p 4000:3000 --name metabase metabase/metabase. This will map your localhost:4000 to port 3000 inside the docker container.

When running metabase from within a container and trying to connect to a local database, use host.docker.internal instead of localhost. localhost will refer to localhost within a docker container where as host.docker.internal will provide the host which sits outside the docker container.