安装所需 osxfuse
brew cask install osxfuse brew install sshfs
把远程目录 /data/v 挂载到 ~/v 目录下
sshfs -p 22 -o reconnect -o volname=v -o IdentityFile=~/.ssh/id_rsa [email protected]:/path/to/wherever /Volumes/SomeNiceName
参考:
安装所需 osxfuse
brew cask install osxfuse brew install sshfs
把远程目录 /data/v 挂载到 ~/v 目录下
sshfs -p 22 -o reconnect -o volname=v -o IdentityFile=~/.ssh/id_rsa [email protected]:/path/to/wherever /Volumes/SomeNiceName
参考:
brew install mysql-client
This is how to reset SMC on most modern Mac laptops, none of which have a removable battery:
Shutdown your MacBook Air / MacBook Pro
Connect the power adapter to the Mac
On the MacBook / Pro’s keyboard, hold down the Shift+Control+Option keys and the Power button at the same time
Release all keys and the power button at the same time – the little light on the MagSafe adapter may change colors briefly to indicate the SMC has reset
Boot your Mac as usual
When and How to Reset Mac SMC (System Management Controller)
https://support.apple.com/zh-cn/HT201295
清理 mac 下的 chrome
rm -rf ~/Library/Application\ Support/Google rm -rf ~/Library/Caches/Google rm -rf ~/Library/Caches/com.google.Chrome rm -rf ~/Library/Caches/com.google.Keystone rm -rf ~/Library/Caches/com.google.Keystone.Agent rm -rf ~/Library/Caches/com.google.SoftwareUpdate rm -rf ~/Library/Google/Google\ Chrome*
当使用自签的证书时,chrome 会不停地提示选择证书
已经被烦了几个月了,每次选择很浪费时间。还好 chrome 提供了自动选择证书 policy。
为名字为 AutoSelectCertificateForUrls 的 policy 创建规则
mac OSX 系统设置
# 清空这个选项的内容
defaults write com.google.Chrome AutoSelectCertificateForUrls -array
# 设置 policy
defaults write com.google.Chrome AutoSelectCertificateForUrls -array-add -string '{"pattern":"https://[*.]corp.foobar.com","filter":{"ISSUER":{"CN":"Foobar Internal Intermediate CA"}}}'
windows 新建一个 .reg 注册表文件,之后双击导入
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\AutoSelectCertificateForUrls]
"1"="{\"pattern\":\"https://[*.]corp.foobar.com\",\"filter\":{\"ISSUER\":{\"CN\":\"Foobar Internal Intermediate CA\"}}}"
检查 policy 是否生效,地址栏输入 chrome://policy
重新载入 policy,在最右侧的状态里看到是 ok 的则生效(如果上面写错,检查 json 语法,以及 CN,CN 是 iusser 的 common name)。
官方文档: https://chromium.org/administrators/policy-list-3#AutoSelectCertificateForUrls