vim
yy 復制當前行
p 粘貼到下一行
f + xx 光標調到當前行的第一個xx
SHELL
tar -zcvf xxx.tar.gz file-path 打包
tar -zxvf xxx.tar.gz 解壓
unzip xx.zip
ifconfig 查看內網ip
curl ifconfig.me 外網ip
Python
- 開啟服務器
python -m http.server
- python中"""和"的區(qū)別:
" "只能單行賦值矩欠,跨行需加 \
"""abc, # this is zhushi
def"""
可以直接跨行賦值(相當于加了\n)悬槽,可以在其中添加注釋
- dict設置初始值
data = [
("animal", "bear"),
("animal", "duck"),
("plant", "cactus"),
("vehicle", "speed boat"),
("vehicle", "school bus")
]
groups = {}
for (key, value) in data:
groups.setdefault(key, []).append(value)
Pycharm
http://idea.lanyus.com/
shift + shift 查找文件名
ctrl + shift +N 查找文件名
snippets創(chuàng)建
settings -> editor -> live templates
Pip
緩存代理服務器
pip install -i https://pypi.doubanio.com/simple xxx(WeasyPrint)
導出安裝包文件
pip freeze > requirement.txt
Virtualenv
source ../bin/active
Github
Chrome實用插件Octotree