mac 使用记录

414 阅读1分钟

tcp

netstat -vanp tcp

vim/shell color

# ~/bash_profile
  export PS1="\[\033[34m\]\u\[\033[m\]@\[\033[m\]\h:\[\033[33;34m\]\w\[\033[m\]\$ "
  export CLICOLOR=1
  export LSCOLORS=ExFxBxDxCxegedabagacad
# ~/.vimrc
  filetype plugin indent on
  set term=builtin_ansi
  syntax on

disable apsd

# Recovery env
csrutil enable
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.apsd.plist

Disable Mac Keychains

  Finder -> Go -> (press 'option') Library -> empty Keychains (dir) -> Reboot

Hotkey

Home       Fn + 左方向
End        Fn + 右方向
PageUP     Fn + 上方向
PageDOWN   Fn + 下方向
向前删除   delete
向后删除   Fn + delete

sublime

# Enable key repeat in mac (Vintage)
$ defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false
$ defaults write -g ApplePressAndHoldEnabled -bool false

xcode

  sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

homebrew

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

yarn

  brew install yarn

build

  yarn run clean && yarn && yarn gulp build --platform=os