This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -mtime +5 -exec rm -rf {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base62(base64(sha512(hexstr(md5(encrypt_key+encrypt_salt))+site_id+site_salt)))[0:len] | |
// base64 -> base62 | |
// 'i' -> "ii" | |
// '+' -> "ip" | |
// '/' -> "is" | |
// '=' -> "ie" | |
其中encrypt_key是用户输入的加密口令, base62是为了去掉特殊字符. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To achieve this you create a file, i.e.: | |
/etc/apt/preferences.d/percona | |
and put this inside: | |
Package: * | |
Pin: release l=percona | |
Pin-Priority: 700 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET GLOBAL LOG_WARNINGS = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
通过ls /etc/init.d/以及ls /etc/rc?.d来查看当前的初始化服务。 | |
update-rc.d -f mysqld remove命令将mysqld从启动项里删除 | |
debian:/etc/init.d# cat ifup #ifup 命令 | |
#!/bin/bash | |
ifup eth0 | |
debian:/etc/init.d# chmod a+x ifup #添加可执行权限 | |
debian:/etc/init.d# update-rc.d ifup defaults #添加启动项目 | |
首先采用rcconf 管理 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# status bar | |
set-option -g status-utf8 on | |
set-window-option -g mode-mouse on | |
#set-window-option -g mouse-resize-pane on | |
#set-window-option -g mouse-select-pane on | |
#set-window-option -g mouse-select-window on | |
set -g status-interval 1 | |
set -g status-justify centre # center align window list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://mirrors.ustc.edu.cn/fedora/epel/5/i386/epel-release-5-4.noarch.rpm | |
rpm -ivh epel-release-5-4.noarch.rpm | |
yum -y -q install boost141-devel | |
ln -s /usr/include/boost141/boost/ /usr/include/boost | |
export LDFLAGS="-L/usr/lib64/boost141" | |
export LD_LIBRARY_PATH=/usr/lib64/boost141:$LD_LIBRARY_PATH | |
yum -y -q install e2fsprogs-devel e2fsprogs | |
yum -y -q install gcc44 gcc44-c++ | |
export CC="gcc44" | |
export CXX="g++44" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo npm install -g phantomjs | |
sudo yum install bitmap-fonts bitmap-fonts-cjk liberation-fonts | |
cd /usr/share/fonts | |
sudo mkfontscale | |
sudo mkfontdir | |
sudo fc-cache -fv | |
sudo /usr/sbin/chkfontpath -a /usr/share/fonts/default/truetype/ | |
sudo /etc/init.d/xfs reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION "plproxy"."get_cluster_config"(IN cluster_name text, OUT "key" text, OUT val text) RETURNS SETOF "record" | |
AS $BODY$ | |
begin | |
key := 'statement_timeout'; | |
val := 60; | |
return next; | |
return; | |
end; $BODY$ | |
LANGUAGE plpgsql |