奇技淫巧

图床

下载

picgo 图床 Imagine 压缩图片

设置github

  • 注册github(跳过)
  • 新建repo,命名为img
  • 设置token
    • 访问:https://github.com/settings/tokens
    • 点击:generate new token
    • 打钩 “repo“就可以了
    • 点:generate token
    • 注意:把生成的token复制下来,下面需要使用,这个token生成后只会显示一次

设置picGO

  • 打开详细设置
  • 点击“图床设置”-“GitHub图床”
    • 设置仓库名:如:github名称/仓库名
    • 设定分支名:如:master
    • 设定token:上面让你生成的token

开始使用

  • 截图后用imagine压缩
  • 直接拖拽到picGO上
  • 粘贴剪切板的链接到markdown文档里

jupyter 制作网页ppt

安装和使用

1
2
3
4
5
6
7
pip3 install jupyter  # or python -m pip install jupyter

pip3 install RISE
jupyter-nbextension install rise --py --sys-prefix
jupyter-nbextension enable rise --py --sys-prefix

jupyter notebook # 启动jupyter

压测工具 Locust

安装

1
2
pip3 install locustio
文档地址:https://docs.locust.io/en/stable/

快速生成flask项目

安装:

1
2
3
4
pip3 install cookiecutter
cookiecutter https://github.com/sloria/cookiecutter-flask.git

github地址:https://github.com/sloria/cookiecutter-flask

基本使用

1
2


视频下载(youtube-dl、you-get)**

安装

1
2
pip3 install --upgrade youtube-dl
pip3 install --upgrade you-get

数据可视化模块

安装

1
pip3 install pyecharts

文档地址(中文):https://pyecharts.org/#/zh-cn/

linux命令

tldr命令

github地址:https://github.com/tldr-pages/tldr

1
pip3 install tldr # 提示命令如何使用

github地址:

fzf命令**

github地址:https://github.com/junegunn/fzf

1
2
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

thefuck

下载

1
pip3 install thefuck

github地址:https://github.com/nvbn/thefuck

基本使用**

1
2
3
4
5
6
7
8
9
10
cd **  # 然后tab
ctrl + r # 查看历史命令

fzf --preview '[[ $(file --mime {}) =~ binary ]] &&
echo {} is a binary file ||
(bat --style=numbers --color=always {} ||
highlight -O ansi -l {} ||
coderay {} ||
rougify {} ||
cat {}) 2> /dev/null | head -500'

vim小游戏

下载

1
2
3
git clone https://github.com/jmoon018/PacVim.git
cd PacVim
[sudo] make install

玩法

chrome插件

  • FeHelper插件
  • Tampermonkey(油猴子)
  • vimium
  • Octotree
  • Momentum
  • OneTab

管理python环境

下载

1
pip3 install virtualenvwrapper

设置环境变量

1
2
3
4
5
6
7
8
9
10
把下面两行代码添加到 ~/.bashrc文件中
打开文件
vim ~/.bashrc
写入以下两行代码
export WORKON_HOME=~/Envs #设置virtualenv的统一管理目录
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages' #添加virtualenvwrapper的参数,生成干净隔绝的环境
export VIRTUALENVWRAPPER_PYTHON=/opt/python347/bin/python3 #指定python解释器
source /opt/python34/bin/virtualenvwrapper.sh #执行virtualenvwrapper安装脚本
读取文件,使得生效,此时已经可以使用virtalenvwrapper
source ~/.bashrc

常用命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 创建一个虚拟环境
mkvirtualenv 环境名称 # 例如:mkvirtualenv flask_demo

# 激活虚拟环境
workon 环境名称 # 例子:workon flask_demo

#停止虚拟环境
deactivate

# 删除虚拟环境,需要先退出虚拟环境
rmvirtualenv 环境名称 # 例子:rmvirtualenv flask_demo

# 列举所有的环境
lsvirtualenv

# 文档地址:https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html

文档查询工具

下载

1
2
3
地址:https://zealdocs.org/

MacOS系统的:https://kapeli.com/dash