Skip to content

Instantly share code, notes, and snippets.

View daqing's full-sized avatar

David Zhang daqing

View GitHub Profile
@mike-zhang
mike-zhang / udpProxy.go
Created October 8, 2012 15:58
Implementation of a UDP proxy in Golang
// Implementation of a UDP proxy
package main
import (
"flag"
"fmt"
"log"
"net"
"os"
@daqing
daqing / nginx-rabel.conf
Created February 12, 2012 03:18
Nginx + Rabel 默认配置文件
upstream thin {
server 127.0.0.1:3000;
}
#server {
# listen 80;
# server_name example.com;
# rewrite ^(.*)$ http://www.example.com$1 permanent;
#}
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@jersub
jersub / 60-lxc.conf
Created May 7, 2011 11:18 — forked from pklaus/create-lxc-container.sh
Automates the steps to set up LXC containers with virtualized environments on Ubuntu Linux
net.ipv4.ip_forward=1
net.ipv4.conf.eth0.proxy_arp=1
@daqing
daqing / meta.rb
Created May 6, 2011 02:07
Ruby Meta Programming Explained
class Class
def where
"in class Class"
end
end
person = Class.new
puts "person.where: #{person.where}" # => "in class Class"
class << person
@onewland
onewland / cron-test.js
Created November 18, 2009 03:19
simple cron API for node.js
var cron = require('./cron'), sys = require('sys');
cron.Every((2).seconds(), function() { sys.puts('Working!'); });