Skip to content

Instantly share code, notes, and snippets.

@jackyyf
jackyyf / fetch.py
Created January 19, 2015 19:33
Gist by paste.py @ 2015-01-20 03:33:37.188661
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Author: Yifu Yu <[email protected]>
from tornado.httpclient import *
from tornado.ioloop import *
import re
import os.path
import sys
@jackyyf
jackyyf / load-balance.diff
Last active August 29, 2015 14:14
Gist by paste.py @ 2015-01-29 16:01:25.577710
diff --git a/cmd/shadowsocks-local/local.go b/cmd/shadowsocks-local/local.go
index 78d0995..089196c 100644
--- a/cmd/shadowsocks-local/local.go
+++ b/cmd/shadowsocks-local/local.go
@@ -5,7 +5,7 @@ import (
"errors"
"flag"
"fmt"
- ss "github.com/shadowsocks/shadowsocks-go/shadowsocks"
+ ss "shadowsocks"
@jackyyf
jackyyf / <stdin>
Created February 24, 2015 05:21
Gist by paste.py @ 2015-02-24 13:21:50.635819
root@ss-proxy-entrance:/dev# mtr 23.94.244.243 --report -c 20
HOST: ss-proxy-entrance Loss% Snt Last Avg Best Wrst StDev
1.|-- 209.85.249.36 0.0% 20 127.4 123.9 120.1 129.0 2.8
2.|-- 209.85.249.36 0.0% 20 120.2 121.7 119.9 148.8 6.4
3.|-- 209.85.249.36 0.0% 20 119.9 121.2 119.9 137.5 3.8
4.|-- 209.85.249.36 0.0% 20 121.1 120.4 119.9 121.1 0.4
5.|-- 209.85.249.36 0.0% 20 120.1 120.4 119.8 121.1 0.3
6.|-- 209.85.249.36 0.0% 20 120.8 120.4 119.9 120.8 0.3
7.|-- 209.85.249.36 0.0% 20 120.0 120.4 119.9 120.9 0.3
8.|-- 209.85.249.36 0.0% 20 120.0 120.5 120.0 121.4 0.3
@jackyyf
jackyyf / <stdin>
Created March 12, 2015 05:13
Gist by paste.py @ 2015-03-12 13:12:24.251793
Start: Thu Mar 12 13:12:23 2015
HOST: Eve-PC Loss% Snt Last Avg Best Wrst StDev
1.|-- 175.186.104.1 0.0% 50 2.2 8.4 1.8 93.9 19.6
2.|-- 10.250.1.29 0.0% 50 2.7 2.8 1.3 24.6 3.7
3.|-- 10.6.0.253 0.0% 50 1.6 3.4 1.3 42.3 6.1
4.|-- 140.207.196.1 2.0% 50 5.0 3.1 1.5 10.6 2.3
5.|-- 211.95.77.29 0.0% 50 4.8 11.3 4.4 48.5 8.6
6.|-- 140.207.207.197 0.0% 50 3.4 4.1 2.5 17.3 2.5
7.|-- 139.226.194.182 0.0% 50 5.0 5.6 3.1 17.0 3.1
8.|-- 139.226.201.85 64.0% 50 9.2 5.6 2.9 11.1 2.2
@jackyyf
jackyyf / <stdin>
Created March 12, 2015 05:15
Gist by paste.py @ 2015-03-12 13:15:35.497960
HOST: orzserver.org Loss% Snt Last Avg Best Wrst StDev
1.|-- 192.187.110.105 0.0% 50 0.6 1.3 0.5 6.8 1.4
2.|-- 192.187.107.125 0.0% 50 0.2 0.2 0.2 0.5 0.0
3.|-- lag-2.edge-a.oak1.mci.us. 0.0% 50 9.8 2.1 0.4 10.9 3.5
4.|-- 10ge1-3.core1.mci2.he.net 0.0% 50 1.8 5.0 0.4 10.9 3.5
5.|-- 10ge3-1.core1.mci3.he.net 0.0% 50 8.1 3.3 0.4 11.1 4.2
6.|-- 10ge15-4.core1.den1.he.ne 0.0% 50 18.5 15.0 10.8 23.2 5.0
7.|-- 10ge14-5.core1.lax2.he.ne 0.0% 50 38.8 43.1 36.8 49.0 3.6
8.|-- tpg-internet-pty-ltd.10gi 0.0% 50 224.7 223.6 221.7 2
@jackyyf
jackyyf / <stdin>
Created March 12, 2015 05:17
Gist by paste.py @ 2015-03-12 13:17:37.167483
HOST: public Loss% Snt Last Avg Best Wrst StDev
1.|-- host.colocrossing.com 0.0% 50 0.0 0.0 0.0 0.1 0.0
2.|-- 10ge-1.8.2.14.0.la1.coloc 0.0% 50 0.5 1.4 0.4 4.0 1.1
3.|-- 69.31.114.169 0.0% 50 0.2 1.3 0.2 36.1 5.1
4.|-- ae6-69.lax20.ip4.gtt.net 0.0% 50 0.5 0.9 0.4 3.0 0.7
5.|-- xe-10-2-0.nyc39.ip4.gtt.n 0.0% 50 70.7 71.6 69.8 93.1 3.8
6.|-- ae10-69.cr1-nyc3.ip4.gtt. 0.0% 50 70.8 71.0 69.9 73.7 1.0
7.|-- as20473.ae7.ar1.nyc3.us.a 0.0% 50 67.1 70.2 67.1 81.0 3.6
8.|-- ethernet1-2-2-c7-2-b2-1.p 0.0% 50 70.1 66.2 65.7 70.4 1.0
9.|-- 64.237.58.51.reliableserv 0.0% 50 66.9 67.2 66.9 70.3 0.7
@jackyyf
jackyyf / <stdin>
Created March 12, 2015 05:19
Gist by paste.py @ 2015-03-12 13:18:37.307496
HOST: lastorder.eve.moe Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.9.5.49 0.0% 50 1.3 2.4 1.2 51.3 7.1
2.|-- 10ge-2.8.5.14.0.la1.coloc 0.0% 50 0.8 1.5 0.8 6.3 1.1
3.|-- xe-5-3-0.er1.lax112.us.ab 0.0% 50 4.1 1.8 0.4 32.2 5.5
4.|-- ae16.cr1.lax112.us.zip.za 2.0% 50 0.8 1.9 0.7 28.7 4.6
5.|-- ae9.mpr1.lax12.us.zip.zay 4.0% 50 0.8 0.8 0.5 2.9 0.4
6.|-- zayo-ntt.lax12.us.zip.zay 0.0% 50 1.1 1.4 1.0 4.0 0.6
7.|-- ae-6.r21.lsanca03.us.bb.g 26.0% 50 1.0 8.0 0.9 49.9 12.3
8.|-- et-0-0-0.r22.asbnva02.us. 0.0% 50 61.8 62.3 61.6 77.2 2.2
9.|-- ae-8.r23.nycmny01.us.bb.g 32.0% 50 71.2 73.0 70.5 104.3 6.2
@jackyyf
jackyyf / <stdin>
Created March 12, 2015 05:21
Gist by paste.py @ 2015-03-12 13:21:11.738603
HOST: misaka.eve.moe Loss% Snt Last Avg Best Wrst StDev
1.|-- 10.8.14.105 0.0% 50 1.3 1.3 1.1 1.5 0.1
2.|-- 10ge-1.04-c86.buf1.colocr 0.0% 50 0.9 1.0 0.6 4.9 0.6
3.|-- host.colocrossing.com 0.0% 50 0.5 3.3 0.4 36.5 8.8
4.|-- 207.86.156.45 0.0% 50 0.7 3.4 0.6 35.2 7.6
5.|-- 216.156.1.126.ptr.us.xo.n 0.0% 50 49.8 51.8 49.6 74.2 5.7
6.|-- 216.156.0.253.ptr.us.xo.n 0.0% 50 51.9 51.5 49.7 53.5 1.2
7.|-- 207.88.12.28.ptr.us.xo.ne 0.0% 50 49.6 53.1 49.4 83.0 9.8
8.|-- 207.88.12.175.ptr.us.xo.n 0.0% 50 52.4 52.2 49.4 88.4 6.7
9.|-- 207.88.12.89.ptr.us.xo.ne 0.0% 50 51.6 51.8 49.6 65.1 2.2
@jackyyf
jackyyf / fuck.py
Created March 16, 2015 14:56
Gist by paste.py @ 2015-03-16 22:56:36.717214
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Author: Yifu Yu <[email protected]>
import math
import re
import sys
deg2rad = lambda deg : deg / 180.0 * math.pi
@jackyyf
jackyyf / bili.conf
Created March 28, 2015 01:58
Gist by paste.py @ 2015-03-28 09:58:19.416756
server {
listen 80;
server_name interface.bilibili.com;
root /usr/share/nginx/html;
index index.html index.htm;
resolver 114.114.114.114;