日常

2017-04-11  本文已影响0人  manbug

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中"""和"的区别:
" "只能单行赋值,跨行需加 \
"""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创建
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

上一篇 下一篇

猜你喜欢

热点阅读