⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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/sh | |
service nginx stop # or whatever your webserver is | |
/home/soft/letsencrypt.client/letsencrypt-auto renew -nvv --standalone > /var/log/letsencrypt/renew.log 2>&1 | |
LE_STATUS=$? | |
service nginx start # or whatever your webserver is | |
if [ "$LE_STATUS" != 0 ]; then | |
echo Automated renewal failed: | |
cat /var/log/letsencrypt/renew.log | |
exit 1 | |
fi |
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
[General] | |
#我的注释都是 # 开头,所以如果你用 vim,直接 :g/^#/d 就可以一次性清除所有注释 | |
#开头这段skip包含以下几个目的:1,私网IP跳过,提高内网性能;2,苹果的一些服务跳过,比如公共热点wifi要先测试captive.apple.com。可解决很多内网的 TCP毛病,例如 kodi remote软件无法遥控 | |
skip-proxy = 10.0.0.0/8,169.254/16,172.16.0.0/12,192.168.0.0/16,224.0.0.0/4, localhost, *.local,api.smoot.apple.com,configuration.apple.com,xp.apple.com,smp-device-content.apple.com,guzzoni.apple.com,captive.apple.com,*.ess.apple.com,*.push.apple.com,*.push-apple.com.akadns.net | |
#下面这一段则是完全跳过 Surge,最重要的一个是让 UDP包可以传输,解决很多内网毛病,例如DLNA,NFS或者btsync等组播类/UDP类应用 | |
bypass-tun = 10.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0/4, 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 5 |
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
http { | |
... | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 60; | |
gzip on; |
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
server{ | |
listen 443 ssl http2; | |
server_name www.qianduan.net;// youdomain.com | |
ssl on; | |
keepalive_timeout 300; | |
charset utf-8; | |
ssl_certificate /path/to/youdomian.crt; |
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
server { | |
listen 80; | |
server_name qianduan.net www.qianduan.net; | |
//don't want to use https://qianduan.net, so, derect any http url to https. | |
return 301 https://www.qianduan.net$request_uri; | |
} |
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
#Wed Feb 11 15:27:20 GMT+08:00 2015 | |
setting_froceUseQProxy=false | |
setting_forceUseSystemWebview=false |
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
log_format snake.isux.us '$remote_addr - $remote_user [$time_local] $request' | |
'$status $body_bytes_sent $http_referer' | |
'$http_user_agent $http_x_forwarded_for'; | |
upstream snake.isux.us{ | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
server_name snake.isux.us; |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>只是文字的水平和垂直居中</title> | |
<style> | |
html,body{width: 100%;height: 100%;margin: 0;padding: 0} | |
body{background-color: green;display: table;} | |
p{line-height: 1.6;text-align: center;padding: 0;margin: 0;display: table-cell;vertical-align: middle;} | |
</style> |