AceSheep 发布的文章
Supervisor安装与配置 | Linux/Unix进程管理工具
Supervisor(http://supervisord.org/)是用Python开发的一个client/server服务,是Linux/Unix系统下的一个进程管理工具,不支持Windows系统。它可以很方便的监听、启动、停止、重启一个或多个进程。用Supervisor管理的进程,当一个进程意外被杀死,supervisort监听到进程死后,会自动将它重新拉起,很方便的做到进程自动恢复的功能,不再需要自己写shell脚本来控制。
因为Supervisor是Python开发的,安装前先检查一下系统否安装了Python2.4以上版本。下面以CentOS7,Python2.7版本环境下,介绍Supervisor的安装与配置步聚:
安装supervisor
$ yum -y install python-setuptools $ easy_install supervisor
mktorrent Win下命令行制作种子
工具下载:
GitHub : q3aql/mktorrent-win
version 1.1
Creating a torrent
- To make a .torrent file using command line, execute this command:
mktorrent -v -p -a http://tracker.url -o filename.torrent folder_name
-v is for verbose -p is for private, as in not DTH or PeerExchange -a is for tracker url follows -o is for output file name follows .
- Important! The command needs to be all in one line, and quotes must
be used around the folder name if it contains spaces. - For example, if I wanted to make a torrent for What.cd from the data
in the "VA – Summer Trance 2009" directory I already have on my
server at ~/torrents/completed/VA - Summer Trance 2009, you would
navigate to the parent directory to make your torrent. Type to
navigate to it:
Note: The disks must be written with the format
/cygdrive/<letter>/. For example,
C:is
/cygdrive/c/.
Apache 伪静态设置
Apache2.2
DocumentRoot "/var/www/example.com/public" <Directory "/var/www/example.com/public"> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </Directory>
Apache2.4
Apache 文档
DocumentRoot "/var/www/example.com/public" <Directory "/var/www/example.com/public"> RewriteEngine On RewriteBase "/" RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] </Directory>
CentOS 7 编译 OpenCC (Open Chinese Convert)
GitHub: BYVoid/OpenCC
Emmm...一键安装~
yum install gcc-c++ cmake doxygen libnet-devel doxygen --version 1.8.5 wget https://github.com/BYVoid/OpenCC/archive/ver.1.0.5.tar.gz tar zxf ver.1.0.5.tar.gz cd OpenCC-ver.1.0.5/ make make install ln -s /usr/lib/libopencc.so.2 /usr/lib64/libopencc.so.2
非root 安装ncurses
编译安装ncurses-5.6
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz tar zxf ncurses-5.6.tar.gz ./configure -prefix=$HOME/screen -with-shared -without-debug --enable-widec make && make install