Mac

Show dotfiles

CMD + SHIFT + .

PostgreSQL

$ brew install postgresql
$ brew services start postgresql
$ createdb `whoami`

Nginx

$ brew install nginx
$ brew services start nginx

OpenResty

$ brew install openresty/brew/openresty
$ brew services start openresty

V2Ray

$ brew tap v2ray/v2ray
$ brew install v2ray-core
$ brew services start v2ray-core

Brew

列出某个包安装的所有文件:

$ brew list postgresql
$ brew list -v postgresql

Bash

$ brew install bash
$ brew install bash-completion@2
$ brew install git

sudo

sudo 使用 Touch ID,将下面一行放到 /etc/pam.d/sudo 的最上面:

auth sufficient pam_tid.so

JDK

$ brew tap homebrew/cask-versions
$ brew cask install java11
$ brew cask info java11

Ctrl+w everywhere

$ vim ~/Library/KeyBindings/DefaultKeyBinding.dict

{
    "^w" = "deleteWordBackward:";
}

VScode key repeating

$ defaults delete com.microsoft.VSCode ApplePressAndHoldEnabled
$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false