日常

作者: manbug | 来源:发表于2017-04-11 16:11 被阅读0次

    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

    相关文章

      网友评论

          本文标题:日常

          本文链接:https://www.haomeiwen.com/subject/skluattx.html