View update_chinadns.bash
if curl -f 'http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' -o /tmp/chinaip.list; then
cat /tmp/chinaip.list | grep ipv4 | grep CN | awk -F\| '{ printf("%s/%d\n", $4, 32-log($5)/log(2)) }' > /tmp/chinadns_chnroute.txt
if [[ $(wc -l </tmp/chinadns_chnroute.txt) -ge 100 ]]; then
echo '47.89.44.170/32' >> /tmp/chinadns_chnroute.txt
echo '139.162.86.215/32' >> /tmp/chinadns_chnroute.txt
cp /tmp/chinadns_chnroute.txt /etc/chinadns_chnroute.txt
else
echo 'Too few lines. File corrupted?'
fi;
else
View SS.conf
[General]
loglevel = notify
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29,223.5.5.5,114.114.115.115
# external-controller-access = PASSWORD@0.0.0.0:6155
# ipv6 = true
// REMEMBER TO CHANGE THE external-controller-access' PASSWORD
View keybase.md

Keybase proof

I hereby claim:

  • I am zengjie on github.
  • I am zengjie (https://keybase.io/zengjie) on keybase.
  • I have a public key whose fingerprint is 6DAC A97C 8986 65C5 3DAB 95DA 15F2 AD1F 5475 460C

To claim this, I am signing this object:

View ArtNetGPU.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# this is a quick implementation of http://arxiv.org/abs/1508.06576
# BUT! This is kind of dirty. Lots of hard coding. 
import numpy as np
import math
from chainer import cuda, Function, FunctionSet, gradient_check, Variable, optimizers
import chainer.functions as Fu
View datalocality.cpp
#include <list>
#include <vector>
#include <chrono>
#include <functional>
#include <iostream>
struct Position {
float x;
float y;
void update() {
View tornado-plupload.py
import tornado.web
import tornado.ioloop
import logging
import os.path
def clean_filename(filename):
i = filename.rfind(".")
if i != -1:
filename = filename[0:i] + filename[i:].lower()