shortcuts
1 | ⌃⌘+F 最大化窗口 |
command
brew
Disable auto update when install
1
2
3
4
5
6
7
8
9
10
11
12
13
14temp method 1:
HOMEBREW_NO_AUTO_UPDATE=1 brew install <formula>
temp method 2:
export HOMEBREW_NO_AUTO_UPDATE=1
permanently method:
vim ~/.bashrc
export HOMEBREW_NO_AUTO_UPDATE=1
source ~/.bashrc
or
vim ~/.zshrc
export HOMEBREW_NO_AUTO_UPDATE=1
source ~/.zshrcupgrade app
1
HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade <app> # disable update
PORT
查看指定进程pid的占用端口
1
lsof -i -P -n | grep LISTEN | grep {pid}
monitor
1 | sudo asitop --interval 10 |
memory
top -l 1 | head -n 10
finder
快速定位目录 Shift + Command + G
显示隐藏文件 Shift + Command + .
service
The Mac equivalent to systemctl
or service
is launchctl
.
1 | # 查看所有的 plist 服务 |
extract
- zip
1 | ditto -V -x -k --sequesterRsrc filename.zip destination |
File
- 解压带有中文名称的zip包
1 | ditto -V -x -k --sequesterRsrc filename.zip destination |
查看目录下文件夹大小
1
2
3du -d 1 -h 命令查看当前目录下所有文件夹的大小 -d 指深度,后面加一个数值
或
du -hd1
Install pkg
a.
1 | sudo installer -pkg /path/to/package.pkg -target / |
Here /
is the mount point of Macintosh HD
volume. -target
accepts path like "/Volumes/Macintosh HD"
, or /dev/disk0
also.
b.
1 | installer -pkg myapp.pkg -target CurrentUserHomeDirectory |
base64
Using base64 to decode some text
1 | base64 --decode |
soft
在系统语言设置english的情况下,设置微信的language
1
defaults write com.tencent.xinWeChat AppleLanguages '("zh-CN")'
mysql
未通过brew安装,安装路径/usr/local/mysql
mysql login:1qaz2wsx
暂未配置my.cnf文件
1
2
3mysql --help | grep my.cnf
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
dbeaver
script脚本位置
1
/Users/dongwei/Library/DBeaverData/workspace6/dingoDB/Scripts
age
加密工具,通过brew安装
docker
环境配置 ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker
启动服务
1 | open -a Docker |
kafka
- 安装目录
/Users/dongwei/Applications/confluent-7.0.1
- 启动命令 先启动zookeeper,然后启动kafka
wmv(microsoft音频格式)
- 使用播放软件elmedia player
shadowsocksR-NG
会把自己的log文件:ss-local.log
保存在路径:~/Library/Logs/ss-local.log
https://www.twisted-meadows.com/shadowsocksx-ng
clashx
解析地址出错时
1 | 您的连接不是私密连接 |
更换节点即可
vscode
- 多行编辑
option+shift+选中
intellij idea
- 去除无用的import引用
control + option + o
- 代码格式化
command + option + l
redis
使用brew安装
1 | brew services start/stop/info redis |
elastic
启动
./bin/elasticsearch
Translate
homebrew安装的translate-shell
https://www.soimort.org/translate-shell/
暂时还有问题
安装gawk时提示(https://macappstore.org/gawk/)
gawk: no bottle available!
karabiner
mc
1 | binary file |
破解软件安装
-
下载完成之后,安装dmg文件之后,需要执行Help.txt里面的文字
1
2
3
4
5
6
7Option I
For a certain application run in Terminal:(我选择这种方式)
sudo xattr -rd com.apple.quarantine /Applications/LockedApp.app
Option II
To disable checks globally run in Terminal:
sudo spctl --master-disable
搜狗输入法
- 简繁体切换
ctrol + shift + F
ja-netfilter
jetbrains activate tool
1 | Appearance & Behavior -> System Settings -> Language and Region -> Region |