- Setup
Homebrew Settings (homebrew)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install \
fish ghq peco gh fzf trash-cli terminal-notifier \
jq tig httpie anyenv fx translate-shell tree bat gitmoji coreutils \
procs exa fd tesseract-lang google-cloud-sdk pre-commit \
tflint buildpacks/tap/pack tgenv grep miniserve orbstack helm
brew install --cask miniconda warp
brew install --cask rectangle
brew tap redis-stack/redis-stack
brew install redis-stack
# https://github.com/sindresorhus/quick-look-plugins
brew install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize suspicious-package quicklookase qlvideo
xattr -r ~/Library/QuickLook
xattr -d -r com.apple.quarantine ~/Library/QuickLook
ghq get -p nkmr-jp/setup
# ~/.gitconfig
[include]
path = ~/ghq/github.com/nkmr-jp/setup/gitconfig
git config --global user.name "username"
git config --global user.email "mailaddress"
Fish Settings (fish)
Install fisher (fisher)
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
fish
fisher install \
decors/fish-ghq \
edc/bass \
fishpkg/fish-humanize-duration \
franciscolourenco/done \
jethrokuan/fzf \
jethrokuan/z \
oh-my-fish/theme-nai
fisher list
exit
# A message that is displayed at random when the shell starts.
echo "hello world!" >> ~/ghq/github.com/nkmr-jp/setup/.messages
echo "shut the fuck up and write some code" >> ~/ghq/github.com/nkmr-jp/setup/.messages
echo "stay hungry stay foolish" >> ~/ghq/github.com/nkmr-jp/setup/.messages
source $HOME/.path.sh
source $HOME/ghq/github.com/nkmr-jp/setup/zprofile.sh
source $HOME/.env.sh
exec fish
source $HOME/ghq/github.com/nkmr-jp/setup/config.fish
# write fish scripts here.
fish
fish_config
# Setting in browser
Anyenv (anyenv)
anyenv install --init
anyenv install rbenv
anyenv install pyenv
anyenv install goenv
anyenv install nodenv
anyenv install tfenv
exec $SHELL -l
goenv install 1.16.3
goenv global 1.16.3
go version
# > go version go1.16.3 darwin/amd64
# rbenv pyenv nodenv ...
brew upgrade anyenv
anyenv install --update
anyenv install goenv
# rbenv pyenv nodenv jenv ...
Install Poetry (poetry)
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
poetry --version
# > Poetry version 1.1.11
poetry completions fish > ~/.config/fish/completions/poetry.fish
poetry # press tab
# > about (Shows information about Poetry.)
# > add (Adds a new dependency to pyproject.toml.)
# > build (Builds a package, as a tarball and a wheel by default.)
# > cache (Interact with Poetry's cache)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup -V
# > rustup 1.23.1 (3df2264a9 2020-11-30)
# > info: This is the version for the rustup toolchain manager, not the rustc compiler.
# > info: The currently active `rustc` version is `rustc 1.51.0 (2fd73fabe 2021-03-23)`
/usr/libexec/java_home --request
# > Unable to find any JVMs matching version "(null)".
# > No Java runtime present, requesting install.
#
# Download Java installer and install.
#
/usr/libexec/java_home -V
# > Matching Java Virtual Machines (1):
# > 16, x86_64: "Java SE 16" /Library/Java/JavaVirtualMachines/jdk-16.jdk/Contents/Home
# > /Library/Java/JavaVirtualMachines/jdk-16.jdk/Contents/Home
brew install java
sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
/usr/libexec/java_home -V
# > Matching Java Virtual Machines (2):
# > 16, x86_64: "Java SE 16" /Library/Java/JavaVirtualMachines/jdk-16.jdk/Contents/Home
# > 15.0.2, x86_64: "OpenJDK 15.0.2" /Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home
# Add ~/.path.sh
# export PATH="/usr/local/opt/openjdk/bin:$PATH"
brew install temurin
brew install temurin@8
/usr/libexec/java_home -V
# Matching Java Virtual Machines (2):
# 22.0.2 (arm64) "Eclipse Adoptium" - "OpenJDK 22.0.2" /Library/Java/JavaVirtualMachines/temurin-22.jdk/Contents/Home
# 1.8.0_422 (x86_64) "Eclipse Temurin" - "Eclipse Temurin 8" /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
# /Library/Java/JavaVirtualMachines/temurin-22.jdk/Contents/Home
jenv add (/usr/libexec/java_home -v "22")
jenv add (/usr/libexec/java_home -v "1.8")
jenv global system
jenv versions
# * system (set by /Users/nkmr/.anyenv/envs/jenv/version)
# 1.8
# 1.8.0.422
# 22
# 22.0
# 22.0.2
# temurin64-1.8.0.422
# temurin64-22.0.2
Install and update the AWS CLI version 2 using the macOS command line
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
aws --version
#> aws-cli/2.2.34 Python/3.8.8 Darwin/19.6.0 exe/x86_64 prompt/off
Access key ID and secret access key
# Create key https://console.aws.amazon.com/iamv2/home#/users
aws configure
#> AWS Access Key ID [None]: xxxx
#> AWS Secret Access Key [None]: xxxx
#> Default region name [None]: ap-northeast-1
#> Default output format [None]: json
aws iam list-users --output table
#> ---------------------------------------------------------------
#> | ListUsers |
#> +-------------------------------------------------------------+
#> || Users ||
#> |+-------------------+---------------------------------------+|
#> || Arn | arn:aws:iam::xxxxxxxxxxxx:user/hoge ||
#> || CreateDate | 2019-05-21T13:05:41+00:00 ||
#> || PasswordLastUsed | 2021-09-01T02:07:31+00:00 ||
#> || Path | / ||
#> || UserId | XXXXXXXXXXXXXXXXXXXXX ||
#> || UserName | hoge ||
#> |+-------------------+---------------------------------------+|
gem install iStats
npm install -g fkill-cli
pip install yq jupyterlab notebook voila iplantuml
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b (go env GOPATH)/bin v1.46.2
mkdir -p ~/src ~/src/bin
cd ~/src
curl -OL https://github.com/cheat/cheat/releases/download/4.2.0/cheat-darwin-amd64.gz
gzip -d cheat-darwin-amd64.gz
mv cheat-darwin-amd64 ./bin/cheat
chmod 755 ./bin/cheat
mkdir -p ~/src ~/src/bin
cd ~/src
curl -OL https://github.com/buildkite/terminal-to-html/releases/download/v3.6.1/terminal-to-html-3.6.1-darwin-amd64.gz
gzip -d terminal-to-html-3.6.1-darwin-amd64.gz
mv terminal-to-html-3.6.1-darwin-amd64 ./bin/terminal-to-html
chmod 755 ./bin/terminal-to-html
See: https://buildpacks.io/docs/tools/pack/
source (pack completion --shell fish)
See: クイックスタート: Cloud SDK スタートガイド | Cloud SDK のドキュメント | Google Cloud
See: https://qiita.com/numanomanu/items/513d62fb4a7921880085
# ~/.tigrc
bind main B !git rebase -i %(commit)
bind diff B !git rebase -i %(commit)