blog

记一些杂技(持续更新)

sslocal -s IP -p PORT -l LOCAL_PORT -k PASSWORD -m 加密方式

~/.npmrc里添加下面这行

如果是用的 cnpm,需要添加到~/.cnpmrc

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
# 安装包时指定源
npm install -gd package --registry=http://registry.npm.taobao.org
# 设置全局npm源码
npm config set registry http://registry.npm.taobao.org
.schema tab_name
sudo apt-get install chromium-browser
sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install
sudo apt-get install alien
sudo alien xxx.rpm
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-minimize-window true
dd if=ISOFILE of=/dev/sdX

UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-8: ordinal not in range(128)

docker run -it --name python -e PYTHONIOENCODING=utf-8 -e LANG=en_US.utf8 -e LANGUAGE=en_US.utf8 -e LANG_ALL=en_US.utf8 -e LC_ALL=en_US.utf8 centos /bin/bash

或者进入容器执行以下指令设置字符集

export PYTHONIOENCODING=utf-8
export LANG=en_US.utf8
export LANGUAGE=en_US.utf8
export LANG_ALL=en_US.utf8
export LC_ALL=en_US.utf8
# .bashrc
PS1='\[\033[01;34m\]\w\[\033[00m\]\$ '
# .bashrc
export http_proxy=http://IP:PORT
export https_proxy=http://IP:PORT
# .netrc 
machine IP
  login Username
  password Token
pip install -U $(pip freeze | awk '{split($0, a, "=="); print a[1]}')