Skip to content

Instantly share code, notes, and snippets.

@tuhuynh27
Created August 15, 2024 06:56
Show Gist options
  • Save tuhuynh27/31b4339e1fa89b94b888249d7f00f8da to your computer and use it in GitHub Desktop.
Save tuhuynh27/31b4339e1fa89b94b888249d7f00f8da to your computer and use it in GitHub Desktop.
Mac Quick Setup

If you only need to set up to code basic static pages, Chrome and Notepad are enough 😄, but since I work quite a lot with build scripts, build tools, and terminals, setting up the machine will be a bit more complicated.

brew install neofetch

Package Management

HomeBrew

If you're familiar with apt or yum on Linux, then on macOS we have brew, which helps you install, update, and remove software packages easily and quickly through its CLI.

Install HomeBrew (brew):

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

Terminal

iTerm2

The terminal is the next thing I think of first when setting up a new machine. The terminal handles all tasks related to Git and running build tasks. Since the default terminal on Mac is quite subpar, I decided to install 2 other terminal shells here: iTerm2 (this one is quite popular).

brew install --cask iterm2

Shell: ZSH with Oh My Zsh

Install ZSH with HomeBrew:

brew install zsh

Using a terminal without Zsh/Fish is boring, so I use it with Oh My Zsh, which is also quite popular. Using Zsh makes typing commands on the terminal faster and more convenient with many useful utilities and aliases, plus it makes you look cooler when typing commands 😏.

Additionally, I use Oh My Zsh with the SpaceShip theme and some other basic plugins.

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

To use a custom theme, install the SourceCode Pro font, which can be installed via HomeBrew:

brew tap homebrew/cask-fonts && brew install --cask font-source-code-pro

Then edit the Zsh config at ~/.zshrc, here’s my custom setup, which includes some additional plugins like suggestions and auto-complete:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
vim ~/.zshrc
plugins=(zsh-autosuggestions)
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
vim ~/.zshrc
ZSH_THEME="spaceship"

Auto Jump

git clone git://github.com/wting/autojump.git
cd autojump
./install.py

Nerd Fonts

brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font

Git, Docker, Node.js, Java, and Go

Of course, to code, you need these four 😄, very easy with brew:

brew install git
brew install podman
brew install nvm
brew tap homebrew/cask-versions
brew install --cask java
brew install go

Node version manager: https://github.com/nvm-sh/nvm Java version manager: https://github.com/shyiko/jabba

Also, install yarn and some commonly used global libraries in Node.js to use when needed:

npm install yarn -g
npm install pnpm -g

Code Editor

Visual Studio Code

I choose to use VSCode because it’s fast (of course, not as fast as Sublime Text or Vim), has many utilities, plugins, and is well supported by the community, with regular updates. It integrates well with almost every language (I use VSCode to code JS, TS, and Go, Java also works fine 😄).

brew install --cask visual-studio-code

Jetbrains Collection

*I switched to using Jetbrains IDEs in 2020.

brew install --cask intellij
brew install --cask datagrip

Browser

Safari Firefox Google Chrome with Chrome Dev Tools is still the best 😄.

brew install --cask google-chrome

Some Other Tools for Dev and Communication

brew install --cask postman

Dotfile

To save time (and avoid configuring), you can find and use pre-written dotfiles here.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment