macos-collections

bash

iterm2 ohmyzsh

command

  • 查看监听端口
  • 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.10.15.0 -netmask 255.255.255.0 10.10.15.255 ip mask gateway 适用内网与外网网关不同时

brew

替换homebrew默认源

替换brew.git:

1
2
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

替换homebrew-core.git:

1
2
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

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

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

切回官方源
重置brew.git:

1
2
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

重置homebrew-core.git:

1
2
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.g

替换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 / yu writer
    • with hexo
  • Onenote
  • notion
  • 滴答清单

效率

FTP

  • transmit

convenient

  • Default Folder(finder 快速切换目录)
  • bandzip 压缩
  • bingpaper 壁纸
  • iina 播放器
  • source tree (git gui)
  • teamviewer (anydesk/microsoft remote desktop)
  • easy new file (新建文件,快速打开终端)
  • FDM 下载器
  • 迅雷
  • Scroll reverser 鼠标滚轮反转
  • PDF element PRO
  • termius (ssh management)
  • fine reader ocr
  • magnet (窗口管理)
  • PicGo 图片上传客户端
  • dozer brew cask install dozer 状态菜单图标隐藏
  • iStat Menus 添加状态菜单(CPU/MEM/风扇)

Visual

DB

  • navicat
    • 旧版本可构造公私钥对
  • datum

Develope

  • pycharm
  • idea
  • android studio
  • anaconda

Backup

office