net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
This file contains 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
echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://49f8ef35.m.daocloud.io\"" | sudo tee -a /etc/default/docker | |
sudo service docker restart |
中華電信國際漫遊申請方式
##在國內
- 手機撥打免付費「*135#」於互動式選單申請
- 下載中華電信客服APP進行申請
- 已持有中華電信月租型門號之客戶,可直接登入emome網站申請服務
- 手機直撥800或市話撥0800-080-090 免付費客服專線洽詢
- 至中華電信全區直營服務中心(不含特約服務中心)申請
##在國外
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
-- check https://github.com/jkeys089/lua-resty-hmac | |
local hmac = require "resty.hmac" | |
local hmac_md5 = hmac:new("secret_key", hmac.ALGOS.MD5) | |
local ok = hmac_md5:update("1234") | |
local mac = hmac_md5:final() | |
local str = require "resty.string" | |
ngx.say("hmac_md5: ", str.to_hex(mac)) | |
enable keepalive to upstream you need to add the following lines
proxy_http_version 1.1;
proxy_set_header Connection "";
This file contains 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
11 0,12 * * * root /usr/sbin/ntpdate $(( $RANDOM % 4 )).amazon.pool.ntp.org > /dev/null && /sbin/hwclock -w |
This file contains 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
route del -net 172.16.0.0 netmask 255.240.0.0 dev eth0 |
This file contains 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
yum reinstall glibc.i686 glibc-devel.i686 compat-libstdc++-33.i686 |
This file contains 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
#!/bin/bash | |
# | |
apt-get update && apt-get install -y wget | |
apt-get install -y linux-image-generic-lts-trusty | |
wget -qO- https://get.docker.com/ | sh |