thefuck

mac直接使用homebrew安装

1
brew install thefuck

编辑.zshrc文件, 将以下代码插入最后

1
eval "$(thefuck --alias)"

1
source .zshrc

使用

1
2
3
4
➜  ~ pythan
zsh: command not found: pythan
➜ ~ fuck
python [enter/↑/↓/ctrl+c]

cloc

统计代码语言, 空行数, 注释数

1
npm install cloc

1
2
3
4
5
6
7
8
9
10
11
$ cloc xx.py
1 text file.
1 unique file.
0 files ignored.

github.com/AlDanial/cloc v 1.72 T=0.04 s (22.3 files/s, 2346.2 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Python 1 28 2 75
-------------------------------------------------------------------------------