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
| import javax.net.ssl.SSLSocket; | |
| import javax.net.ssl.SSLSocketFactory; | |
| import java.io.*; | |
| /** Establish a SSL connection to a host and port, writes a byte and | |
| * prints the response. See | |
| * http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
| */ | |
| public class SSLPoke { | |
| public static void main(String[] args) { |
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
| # Example usage with several configuration sets as in multiple connections durations and threads. | |
| # You may go take the rest of the day off while this will run ;) | |
| for duration in 10s 1m 10m 1h | |
| do | |
| for connections in 100 200 300 400 500 600 | |
| do | |
| for thread in 1 2 3 4 5 | |
| do | |
| wrk -d$duration -c$connections -t$thread -s wrk-script.lua http://localhost:4001/beacon/0001/demo-load-test/test/web |
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
| {"0.15388708864338696":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEywWiPIt/xn6y9RmhhJ2u29WhuNE3mxct\r\nmBPun89q3vI2bsDDXT6yc8QBslPaE3XWXkr7N1ykXrwgjpVfAAkVBs3/AAAACDxn\r\naXRodWI+wv8AAACNBBATCAA//wAAAAWCVs6wWv8AAAACiwn/AAAACZDcNlEK8wxb\r\nef8AAAAFlQgJCgv/AAAAA5YBAv8AAAACmwP/AAAAAp4BAAA+XwD+LqIXxuH0i4Wo\r\nPstbZGTGrcvuKKqaXdd6JhCRhnO+u5wBAITxX5G9VZU6p3Pybw1y0e5h4jkieDND\r\nrT7ItECBfTbuzv8AAABWBAAAAAASCCqGSM49AwEHAgMElSBHEyqPc7+b+quUZmMN\r\nNd21FQoyt2BVfwgH7FRttkwgDg0/Rp8hv9Ym+D0qCV/7qfcZX0exkutY9eG0iXz4\r\nFQMBCAfC/wAAAG0EGBMIAB//AAAABYJWzrBa/wAAAAmQ3DZRCvMMW3n/AAAAApsM\r\nAAA49AEAydCVMjqGeAfzETbZv5dtZ+LoSQopNAYjSG5Gekc2biQA+wf6XQe8j1vt\r\n0Myv/BNzCpqHSlBUAwTicWrqKYJ+PBB7\r\n=q6fo\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"} |
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
| // 批量删除广播 | |
| (function(){ | |
| var list = $$('#talkList>li'); | |
| var count = list.length | |
| console.log('list length', count); | |
| var t = 0 | |
| var idx = 0 | |
| list.forEach(function(i){ | |
| setTimeout(function() { | |
| console.log("delete id", i.id, 'idx:', idx++); |
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
| #!/bin/bash | |
| # @author yinheli | |
| workdir=$(cd $(dirname $0); pwd) | |
| cd $workdir | |
| wan_ip="104.224.129.180" | |
| wan_port="1988" | |
| dns_port="53" | |
| ignore_list="ignore.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
| // zip_file | |
| package main | |
| import ( | |
| "archive/zip" | |
| "os" | |
| "io" | |
| ) | |
| func main() { |
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 --no-check-certificate \ | |
| -O server-jre-7u80-linux-x64.tar.gz \ | |
| --header "Cookie: oraclelicense=a" \ | |
| http://download.oracle.com/otn-pub/java/jdk/7u80-b15/server-jre-7u80-linux-x64.tar.gz |
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
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "net" | |
| "os" | |
| "strings" |
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
| package main | |
| import ( | |
| "log" | |
| "bufio" | |
| "time" | |
| "os" | |
| "fmt" | |
| "io" | |
| "net" |
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
| import javax.imageio.ImageIO; | |
| import java.awt.*; | |
| import java.awt.image.BufferedImage; | |
| import java.io.File; | |
| /** | |
| * @author yinheli | |
| */ | |
| public class T { |