- 线程池是线程的更高层的抽象
- 更容易扩展
- C++编码规范不鼓励异常,除非已有项目/底层库使用了异常,这时候必须要catch所有异常
| #!/usr/bin/env zsh | |
| git show-branch -a \ | |
| | grep '\*' \ | |
| | grep -v `git rev-parse --abbrev-ref HEAD` \ | |
| | head -n1 \ | |
| | sed 's/.*\[\(.*\)\].*/\1/' \ | |
| | sed 's/[\^~].*//' | |
| # How it works: |
| 1. install iterm2 | |
| 2. brew install lrzsz | |
| 3. donwload iterm2 files and mv to /usr/local/bin (these iterm2-* files doesn't work again, try this https://github.com/aikuyun/iterm2-zmodem) | |
| 4. config the triggers like below | |
| Regular expression: rz waiting to receive.\*\*B0100 | |
| Action: Run Silent Coprocess | |
| Parameters: /usr/local/bin/iterm2-send-zmodem.sh | |
| Regular expression: \*\*B00000000000000 | |
| Action: Run Silent Coprocess |