chrome插件备忘

必备

  • Proxy SwitchyOmega
  • Markdown Preview
  • User-Agent Switcher for Chrome
  • Charset
  • Redirector

开发

  • LiveReload
  • Moesif Origin & CORS Changer
  • React Developer Tools
  • Redux DevTools
  • User JavaScript and CSS
  • Vue.js devtools

跨域插件配置

如果想要携带cookie需要配置 Access-Control-Allow-Origin

  • Access-Control-Allow-Origin: http://localhost:8080
  • Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
  • Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH
  • Access-Control-Allow-Credentials: true

BASH小工具(2)

jq

用于命令行处理json数据

  • https://github.com/stedolan/jq
  • https://www.ibm.com/developerworks/cn/linux/1612_chengg_jq/index.html

xmlstarlet

用于命令行处理xml文档

  • https://www.ibm.com/developerworks/cn/xml/x-starlet.html
  • http://xmlstar.sourceforge.net/

断点续传

rsync -P --rsh=ssh myfile.tar 192.168.205.34:/home/myfile.tar
wget --no-check-certificate -c http://192.168.3.36/myfile.tar
curl --insecure -C -o myfile.tar http://192.168.3.36/myfile.tar

直接发送tcp/udp包

dd if=binary.dat bs=160 count=1 > /dev/udp/192.168.2.5/9000
echo '0006303030304e43' | xxd -r -p | nc -l localhost 8181

VSCODE

open new tab for edit file

{
    "git.ignoreMissingGitWarning": true,
    "window.zoomLevel": 0,
    "workbench.colorTheme": "Quiet Light",
    "extensions.ignoreRecommendations": true,
    "http.proxyStrictSSL": false,
    "http.proxy": "",
    "workbench.editor.enablePreview": false
}

PY科学计算

link memo

https://www.jianshu.com/p/9f6a9456ad5f
https://blog.csdn.net/qq_22022063/article/details/78979367
https://www.jianshu.com/p/68be3a7bd7b7
https://blog.csdn.net/rumswell/article/details/8927603
https://www.cnblogs.com/misswangxing/p/7903595.html
https://www.ixueshu.com/
http://wiki.jikexueyuan.com/project/start-learning-python/311.html

install pyenv and config

curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
pyenv install --list
pyenv install 3.6.3
pyenv rehash
pyenv versions
pyenv local 3.6.3 # set current folder 
python --version

set python3 venv

python3 -m venv ./venv
source venv/bin/activate # use venv
deactivate # exit venv

use douban as pypi source

vi ~/.pip/pip.conf
----------
[global]
index-url=http://pypi.doubanio.com/simple

[install]
trusted-host=pypi.doubanio.com

readline and tab-complete for python interact

yum -y install ncurses-devel patch
pip install gnureadline
wget -O repl.py -P /path/to/sys https://raw.githubusercontent.com/lilydjwg/winterpy/master/pylib/cli.py
python
>>> import repl

注意: 使用pip install readline不行; gcc需要使用4.7

pandas numpy error

pip uninstall numpy
pip install numpy==1.14.5

解决matplotlib.pyplot的依赖问题(bzip2,tkinter)

yum install bzip2-devel tkinter tk-devel
pyenv install 3.6.3 # reinstall
cd /root/.pyenv/versions/3.6.3/lib/python3.6/lib-dynload
cp ~/_bz2.cpython-36m-x86_64-linux-gnu.so ./
ln -s /usr/lib64/libbz2.so.1.0.6 /usr/lib64/libbz2.so.1.0

matplotlib.pyplot display undefine

vi ~/.bash_profile
----------
export MPLBACKEND="agg"
----------
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.show()
plt.savefig('table.png')

艺术进阶

about color and design

http://vdisk.weibo.com/u/3740738601
http://vdisk.weibo.com/u/1158082872

about guitar and music

https://musicbody.net/
https://github.com/Audiveris/audiveris

sharing site

https://imgur.com/

www.000webhost.com