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
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
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
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
http { | |
limit_conn_zone $binary_remote_addr zone=perip:10m; | |
server { | |
...... | |
location { | |
limit_conn perip 10; | |
} | |
...... | |
} | |
} |
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
export DOOZER_BOOT_URI="doozer:?ca=192.168.99.51:8046&ca=192.168.99.52:8046&ca=192.168.99.53:8046" | |
// ON 192.168.99.51 | |
nohup /var/code/go/bin/doozerd -timeout 5 -l "192.168.99.51:8046" -w false -c "dzns" > /dev/null 2>&1 & | |
// ON 192.168.99.52 | |
nohup /var/code/go/bin/doozerd -timeout 5 -l "192.168.99.52:8046" -w false -c "dzns" -a "192.168.99.51:8046" > /dev/null 2>&1 & | |
printf '' | /var/code/go/bin/doozer -a "doozer:?ca=192.168.99.51:8046" add "/ctl/cal/1" | |
// ON 192.168.99.53 | |
nohup /var/code/go/bin/doozerd -timeout 5 -l "192.168.99.53:8046" -w false -c "dzns" -a "192.168.99.51:8046" > /dev/null 2>&1 & | |
printf '' | /var/code/go/bin/doozer -a "doozer:?ca=192.168.99.51:8046" add "/ctl/cal/2" |
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
du | sort -nr | cut -f2- | xargs du -hs |
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
sh.addShard("rs0/srv-7:27019") | |
sh.addShard("rs1/srv-5:27019") | |
sh.addShard("rs2/srv-6:27019") | |
sh.enableSharding("oplog") | |
sh.enableSharding("sem_crawler") | |
sh.enableSharding("aggregate") | |
sh.enableSharding("keyword_insights") | |
sh.enableSharding('crawler') | |
sh.enableSharding('words') | |
sh.shardCollection("oplog.oplogs", {campaign_id:1}) |
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
sshfs [email protected]:/var/www /var/www -o idmap=user -o allow_other -o uid=33 -o gid=33 |
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
Ctrl+b " - split pane horizontally | |
Ctrl+b % - 将当前窗格垂直划分 | |
Ctrl+b 方向键 - 在各窗格间切换 | |
Ctrl+b,并且不要松开Ctrl,方向键 - 调整窗格大小 | |
Ctrl+b c - (c)reate 生成一个新的窗口 | |
Ctrl+b n - (n)ext 移动到下一个窗口 | |
Ctrl+b p - (p)revious 移动到前一个窗口. | |
Ctrl+b 空格键 - 采用下一个内置布局 | |
Ctrl+b q - 显示分隔窗口的编号 | |
Ctrl+b o - 跳到下一个分隔窗口 |