質問
This article describes effective procedures for developer with JavaScript/TypeScript/Ruby to setup Mac Monterey.
Update: 

Install Awesome Apps

For development

Docker For Mac

iTerm

JetBrains Toolbox

Source Tree

Visual Studio Code

For productivity

CleanShot X

DeepL

Dropbox

Figma

Just Focus

Magnet

MeetingBar

Spotify

Tripmode

Zoom

Write a comment

Homebrew

You can execute the following command to install

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

If you are asked about Xcode Command line tool while installing with Homebrew, please install it.

Write a comment

Oh-my-zsh

If you want to use a coftable Zsh customized by the community, let's install

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

Git

You should install Git command line tool:

brew install git
git config --global user.name "USER_NAME"
git config --global user.email email@example.com
git config --global tag.sort version:refname
git config --global alias.co checkout

After installing Git, we recommend to set global .gitignore:

# install generator for .gitignore
brew install gibo

# Set some unnecessary files of JetBrains and Mac to .gitignore
gibo dump JetBrains macOS Ruby Rails Node > ~/.gitignore

# Set the .gitignore to set git global setting
git config --global --add core.excludesfile "$HOME/.gitignore"

In addition, please add a alias git push-f to vi ~/.gitconfig

[alias]
  push-f = push --force-with-lease
Write a comment

autojump

If you want to fill a path more quickly,

is one of the greatest solutions.
brew install autojump

After installing, set the following setting by vi ~/.zshrc

# autojump
[ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh

After the setting, execute the following command to reflect the setting:

source ~/.zshrc
Write a comment

fzf

brew install fzf

After installing, set the following setting by vi ~/.zshrc

# fzf
br() {
  git checkout $(git branch --format '%(refname:short)' | fzf --layout=reverse)

}

After the setting, execute the following command to reflect the setting:

source ~/.zshrc
Write a comment

Font HackGen

Ricty is a fonts for programming, if you want to try it, please set the following command:

# Installing HackGen
brew tap homebrew/cask-fonts
brew install --cask font-hackgen

# Setting about anti-alias
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
Write a comment

rbenv

To avoid installing unnecessary documents, add the following setting vim ~/.gemrc:

install: --no-document
update: --no-document

After the above setting, let's install the following rbenv and Ruby-build:

# installing rbenv / ruby-build
brew install rbenv ruby-build

# Setting to installing gems when introducing new version
git clone https://github.com/sstephenson/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems

# Setting default install gems
echo 'bundler\nrails\npg\npry' > ~/.rbenv/default-gems

Edit the following setting by vi ~/.zshrc:

# rbenv
[[ -d ~/.rbenv  ]] && \
  export PATH=${HOME}/.rbenv/bin:${PATH} && \
  eval "$(rbenv init -)"

The setting is reflected by the following command:

source ~/.zshrc

Install Ruby by rbenv:

# show list of ruby versions which is able to install
rbenv install -l

# Install latest ruby version(e.g. 2.6.6)
rbenv install 2.6.6
rbenv global 2.6.6
Write a comment

Node Version Manager

Please refer to

and install it.
Write a comment

Install Yarn

brew install yarn
Write a comment

Install libvips

I sometimes get an error when installing libraries such as sharp in the npm library.

brew info vips
brew reinstall vips
Write a comment

Install v8

There are many libraries that depend on v8, so it is good to install them.

brew install v8
Write a comment

Optional

PostgreSQL

Install PostgreSQL:

brew install postgresql
brew services start postgresql

Docker

Please set alias to vi ~/.zshrc:

# Docker
alias d='docker'
alias dc='docker-compose'
alias dm='docker-machine'

After setting, reflect the upper settings:

source ~/.zshrc

Chromedriver

If you use Chromedriver for selenium test or etc, please execute the follows:

brew tap homebrew/cask
brew install --cask chromedriver

IntelliJ

Please refer to the following articles and configure it.

Python

brew install python

Please set alias to vi ~/.zshrc:

# Python
export PATH=$(brew --prefix python)/libexec/bin:$PATH

After setting, reflect the upper settings:

source ~/.zshrc

Shortcut for Ruby dev

Please write the bellow code in vi ~/.zshrc:

# nodebrew(Node.js)
export PATH=$HOME/.nodebrew/current/bin:$PATH

# Rails
alias rspec="bundle exec rspec"
alias rake="bundle exec rake"
alias rubocop="bundle exec rubocop"

Java

Download JDK from

and install it.

After install JDK, you should install Maven & gradle too.

brew install maven32 gradle

After that, please write the bellow code in .zshrc:

# Java
export JAVA_HOME=`/usr/libexec/java_home -v 10.0.2`

Shortcut for Source Tree

sudo ln -s /Applications/SourceTree.app/Contents/Resources/stree /usr/local/bin/

Change computer name

Application > System Preferences > Sharing > Computer Name

Change cursor speed

Application > System Preferences > Mouse > Tracking Speed

Improve Sound Quality

sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true
sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true

Keytype speed

defaults write -g KeyRepeat -int 2
defaults write -g InitialKeyRepeat -int 12
Write a comment

References


Write a comment
この記事が気に入ったら応援お願いします🙏
10
ツイート
LINE
Engineer
morizyun
Full stack developer. Be able to build an optimal architecture with Next.js / Firebase / TypeScript / JavaScript Ruby / Golang / Kotlin / Java.