0%

macos-collections

bash

iterm2 ohmyzsh

command manuel

  • 查看监听端口
  • sudo lsof -nP -iTCP[:端口号] -sTCP:LISTEN
  • netstat -an -p ‘tcp’

proxy

1
2
export {http,https,ftp}_proxy='http://127.0.0.1:1080'
export socks5_proxy='socks5://localhost:1080'

or proxychains4

双网卡 route

sudo route add -net 10.0.0.0 -netmask 255.0.0.0 172.29.7.254 ip mask gateway 适用内网与外网网关不同时

brew

替换homebrew默认源

1
2
3
4
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
brew update

如果替换源之后brew update 没反应

1
2
cd "$(brew --repo)"
git pull origin master

切回官方源

1
2
3
4
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
brew update

替换Homebrew Bottles源

Homebrew Bottles是Homebrew提供的二进制代码包,目前镜像站收录了以下仓库:

对于bash用户

1
2
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

对于zsh用户

1
2
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

install command

brew info python
brew install python
brew link python
brew cleanup

system

volumn

  • 通信自动音量调整关闭
    1
    2
    3
    通信前
    printf "p *(char*)(void(*)())AudioDeviceDuck=0xc3\nq" | lldb -n QQ
    printf "p *(char*)(void(*)())AudioDeviceDuck=0xc3\nq" | lldb -n WeChat

docker

  • mirror
    • RUN sed -i ‘s/archive.ubuntu.com/mirrors.ustc.edu.cn/g’ /etc/apt/sources.list
  • mysql error
    • run into this under ubuntu14.04 with updating password
    • [ERROR] Fatal error: Can’t open and lock privilege tables: Got error 140 from storage engine
    • mkdir /var/run/mysqld ; chown -R mysql:mysql /var/lib/mysql /var/run/mysqld && service mysql start
  • other error
    • maybe mkdir /var/run/xxx
  • gdb
    • docker run --privileged
    • docker run --cap-add=SYS_PTRACE (or ALL)
  • configure proxy server

software collection

resource url

Basic & Tools

python

Note

  • Mweb @Appstore / yu writer
    • with hexo
  • Onenote
  • notion
  • 滴答清单

效率

FTP

  • transmit

convenient

  • WeChatExtension
  • bandzip 压缩 @Appstore
  • bingpaper 壁纸
  • iina 播放器
  • source tree (git gui)
  • teamviewer (anydesk/microsoft remote desktop)
  • easy new file (新建文件,快速打开终端) @appstore
  • FDM 下载器
  • 迅雷
  • Scroll reverser 鼠标滚轮反转
  • PDF element PRO
  • fine reader ocr @Appstore
  • PicGo 图片上传客户端
  • dozer brew cask install dozer 状态菜单图标隐藏
  • LunarCal 日历 @Appstore
  • expression 正则测试 @Appstore
  • Permute3 音视频转换 @Appstore
  • 自动切换输入法 @Appstore 免费
  • XMind ZEN
  • OBS
    • with boom 2

Visual

  • PD/VMFUSION https://www.vmware.com/go/getfusion
    • vmfusion debian/ubuntu share open-vm-tools-dkms
      • vmhgfs-fuse .host:/ /mnt/hgfs/
      • /etc/fstab .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0
  • wine winetricks
  • docker

DB

Develope

  • pycharm
  • idea
  • android studio
  • anaconda

Backup

office