Mac 配置笔记

环境配置

Node 安装

curl -fsSL https://fnm.vercel.app/install | bash

# fnm
export PATH="/Users/yang.zeng/Library/Application Support/fnm:$PATH"
eval "`fnm env`"

# 安装node
fnm list-remote
fnm list 
fnm install

# 切换
fnm use  

终端配置

oh-my-zsh 主题显示执行时间

进入主题目录~/.oh-my-zsh/themes,以默认主题robbyrussell为例,在robbyrussell.zsh-theme 追加如下内容:

function preexec() {
  timer=${timer:-$SECONDS}
}

function precmd() {
  if [ $timer ]; then
    timer_show=$(($SECONDS - $timer))
    if [[ $timer_show -ge $min_show_time ]]; then
      RPROMPT='%{$fg_bold[red]%}(${timer_show}s)%f%{$fg_bold[white]%}[%*]%f %{$reset_color%}%'
    else
      RPROMPT='%{$fg_bold[white]%}[%*]%f'
    fi
    unset timer
  fi
}

autoload -Uz add-zsh-hook
add-zsh-hook preexec preexec
add-zsh-hook precmd precmd

软件配置

sunshine

安装

brew tap LizardByte/homebrew

# beta 好用
brew install sunshine-beta

需授予终端录屏权限(不是给sunshine授权),建议用系统自带终端

To start lizardbyte/homebrew/sunshine now and restart at login:
  brew services start lizardbyte/homebrew/sunshine
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/sunshine/bin/sunshine /Users/funnyang/.config/sunshine/sunshine.conf

用户名/密码:sunshine/sunshine

好用的软件

划掉表示没用了

免费资源

  • pixabay 免费图片、视频、音频网站

输入法

# 东方破 一个 rime 输入法管理工具
curl -fsSL https://raw.githubusercontent.com/rime/plum/master/rime-install | bash

# 雾松拼音
https://github.com/iDvel/rime-ice

技巧

代理

# ssh 动态代理
ssh -i ~/.ssh/id_rsa -D 9000 {user}@{ip}

简易http服务

python -m SimpleHTTPServer 8080

python3 -m http.server 8080

导出 Google Authenticator 到 1Password

https://github.com/scito/extract_otp_secrets

zip 加密压缩

zip -e xxx.zip file1 file2 file3

本文链接:参与评论 »

--EOF--

专题「笔记」的其它文章 »

Comments