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
# Haproxy的常见配置 | |
# 参考文档: | |
# http://cbonte.github.io/haproxy-dconv/1.9/configuration.html | |
# http://blog.sina.com.cn/s/blog_704836f40102w243.html | |
# http://thread.gmane.org/gmane.comp.web.haproxy/12557 | |
# https://serverfault.com/questions/678882/is-there-a-way-to-rate-limit-connections-with-haproxy-using- | |
# https://blog.codecentric.de/en/2014/12/haproxy-http-header-rate-limiting/ | |
# http://cbonte.github.io/haproxy-dconv/1.9/management.html | |
# https://www.haproxy.com/blog/websockets-load-balancing-with-haproxy/ |
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 { | |
// ssl 相关配置 ... | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 8020; |
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
input { | |
file { | |
path => "/path/to/tomcat/logs/localhost_access_log*.txt" | |
} | |
} | |
filter { | |
grok { | |
match => { | |
"message" => "%{COMBINEDAPACHELOG} %{IPORHOST:serverip} %{NUMBER:serverport} %{NUMBER:elapsed_millis} %{NOTSPACE:sessionid} %{QS:proxiedip} %{QS:loginame}" |
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
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
/** | |
* 中国居民身份证parser,支持15位,18位身份证 | |
* http://www.360doc.com/content/11/0322/21/4240950_103674335.shtml | |
* http://baike.baidu.com/view/3457576.htm | |
* Created by qianjia on 15/7/22. | |
*/ |
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
import org.apache.catalina.Context; | |
import org.apache.catalina.LifecycleException; | |
import org.apache.catalina.session.StandardManager; | |
import org.apache.catalina.startup.Tomcat; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.HttpSession; |
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
/* | |
Examples: | |
查询我引用谁 | |
SELECT * FROM TABLE(FK_UTIL.get_refering_stats('TABLE_A')); | |
查询谁引用我 | |
SELECT * FROM TABLE(FK_UTIL.get_refered_stats('TABLE_A')); | |
查询ID为的某条记录的被引用计数 |
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 | |
if [[ -z $1 || -z $2 || -z $3 || -z $4 || -z $5 || -z $6 ]]; then | |
echo 'usage: import-dpdump.sh <dba> <dba password> <user> <user password> <directory> <dump>' | |
echo 'example: import-dpdump.sh admin 123456 user 123456 dir_object user20141010.dpdmp' | |
exit | |
fi | |
dba=$1 | |
dbapsswd=$2 | |
user=$3 |
NewerOlder