Closed7
M2 Mac 環境構築

macOS Ventura 13.5
xcode & command line tools
最新の安定版をインストール
zsh & homebrew
$ cd ~
$ touch .zprofile
$ touch .zshrc
$ echo "source ~/.zprofile" >> .zshrc
# homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> .zprofile
$ source .zshrc
$ brew -v
# => Homebrew 4.1.6
## zshテーマ
$ brew install romkatv/powerlevel10k/powerlevel10k
$ echo "source $(brew --prefix)/opt/powerlevel10k/powerlevel10k.zsh-theme" >> ~/.zprofile
$ reload
$ exit
# 再起動してテーマ設定する
asdf
$ brew install asdf
$ echo ". $(brew --prefix asdf)/libexec/asdf.sh" >> .zprofile
$ reload
# nodejs
$ asdf plugin-add nodejs
$ asdf install nodejs 20.5.1
$ asdf global nodejs 20.5.1
$ asdf plugin-add pnpm
$ asdf install pnpm latest
$ asdf reshim
$ reload
$ node -v
#=> V20.5.1
$ pnpm -v
# => 10.6.5
# java (firebase emulator用に19.xをインストール)
$ asdf plugin-add java https://github.com/halcyon/asdf-java.git
$ asdf list-all java
# => list versions
$ asdf install java corretto-19.0.2.7.1
$ asdf global java corretto-19.0.2.7.1
$ echo ". ~/.asdf/plugins/java/set-java-home.zsh" .zprofile
$ asdf reshim
$ reload
$ java -version
#=> openjdk version "19.0.2" 2023-01-17
# 2025/3/25時点でasdfのコマンド変わってる
$ asdf plugin add python
$ asdf list all python
$ asdf install python 3.13.2
$ asdf set -u python 3.13.2 # -u付きでglobal / 無しでlocal
$ asdf plugin add poetry
$ asdf install poetry latest
$ asdf set -u poetry 2.1.1
$ asdf reshim
$ poetry config virtualenvs.in-project true
$ reload
.tool-versions
だけでなく .node-version
などのファイルをサポートする。
(versionを読み取る時に1行の方が何かと便利なのでこの形式を利用している)
$ touch ~/.asdfrc
$ echo "legacy_version_file = yes" >> ~/.asdfrc
githook
GUIツール用にパスを通しておく
$ touch .lefthookrc
$ echo "source ~/.zshrc"
Forkの場合は Fork > Settings > Git > ENV PATH: System shell 'bin/zsh'
に変更
隠しファイル表示
$ defaults write com.apple.finder AppleShowAllFiles -bool true
$ killall Finder

Google IME
開発版をダウンロード
システム設定 > キーボード > 入力ソース
- 左下
-
から既存の日本語設定をすべて削除 - 左下
+
から日本語を2回追加すると「ひらがな(Google)、英数(Google)」がIMEに追加される
このときキーボードレイアウトが表示されないので分かりにくい

github
# @refs: https://docs.github.com/ja/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
$ ssh-keygen -t ed25519 -C "your@example.com"
$ pbcopy < ~/.ssh/id_ed25519.pub
# settings > SSH and GGP Keysから登録
$ git config --global user.name "tkc310"
$ git config --global user.email tkc310@example.com

vscode or cursor
insiders版

github desktop
通知用
zoom
clipy
notion
DBeaver
ChatGPT
DeepL
ショートカットを ctrl + opt + c
に変更
Grammaly
Atom
Android Studio
Fork
DevToys
Insomnia
Docker Desktop

chrome拡張機能
フォーカスが外れないのでポップアップメニューの要素検証などに使える
- page ruler
https://chromewebstore.google.com/detail/page-ruler/jcbmcnpepaddcedmjdcmhbekjhbfnlff?hl=ja - chroma eyedropper & color picker tool
https://chromewebstore.google.com/detail/chroma-eyedropper-color-p/pkgejkfioihnchalojepdkefnpejomgn

キーボード、トラックパッド
- キーボードのリピート速度、トラックパッドの軌道速度を高くする
- スペース2回でピリオドをオフる
https://zenn.dev/paraches/articles/double-space-priod
このスクラップは2023/08/27にクローズされました