VERSION: 3.5.2
LAST_UPDATE_TIME: 2017-4-19
镜像下载: http://mirrors.ustc.edu.cn/
split
分割文件
libvirt documentation: https://libvirt.org/docs/libvirt-appdev-guide-python/en-US/html/index.html
centos: https://coreos.com/os/docs/latest/booting-with-libvirt.html
1. 新建文件
# /etc/systemd/system/rc-local.service
=================================
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
===============================
2. 激活服务
$ sudo systemctl enable rc-local.service
3. 新建rc.local,并给执行权限
$ sudo chmod +x /etc/rc.local
*如果原来存在的/etc/rc.local 检查是否有执行权限,但是不生效,检查是否有执行权限,注意权限给/etc/rc.d/rc.local,/etc/rc.local只是其软链接*
vim不用退出就可以保存需要root权限的文件
:w !sudo tee %
删除包含特定字符的行
g/PATTERN/d
N,M 代表行数或者g表示全局,下同
删除不包含指定字符的行
v/PATTERN/d
N,M!/PATTERN/d
检测主机端口是否打开
nmap IP -p PORT
or
nc -v IP PORT
%load_ext autoreload
%autoreload 2
查看指定文件修改历史
git log --pretty=oneline FILENAME
`git config --global https.proxy https://IP:PORT
git config --global http.proxy http://IP:PORT`
or
`git config --global https.proxy="socks5://IP:PORT"
git config --global http.proxy="socks5://IP:PORT"`
python进阶 http://docs.pythontab.com/interpy/
http://fanchunke.me/Python/Python%E4%B8%AD%E7%9A%84%E5%B1%9E%E6%80%A7%E8%AE%BF%E9%97%AE%E4%B8%8E%E6%8F%8F%E8%BF%B0%E7%AC%A6/
只定义__get__
则为非数据描述符,同时定义__get__
和__set__
才是数据描述符。
优先级
data descriptor > instance dictionary > non-data descriptor > __getattr__
- descriptors are invoked by the getattribute() method
- overriding getattribute() prevents automatic descriptor calls
- getattribute() is only available with new style classes and objects
- object.getattribute() and type.getattribute() make different calls to get().
- data descriptors always override instance dictionaries.
- non-data descriptors may be overridden by instance dictionaries.
property(fget=None, fset=None, fdel=None, doc=None) -> property attribute
server A: tar -zcvf - NAME | pv |nc SERVERB PORT
server B: nc -l 0.0.0.0 PORT | tar -zxvf -
加上pv可以显示速度
- addfinalizer
- usefixtures 对fixtures function无效
-
getmembers
-
getmodulename
- bn
- bp
- Linux
umask, find, 数据块(0.5k), cmin(文件属性), mmin(内容), locate, updatedb, which, whereis, man, whatis, help, passwd, useradd, who(tty本地 ), w
http://blog.jobbole.com/21351/
ipython
- postcss
- postcss-pxtorem