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
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
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 | |
// #include <stdlib.h> | |
// #include <openssl/md5.h> | |
// #cgo LDFLAGS: -lcrypto | |
import "C" | |
import ( | |
"fmt" | |
"unsafe" | |
) |
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
// git.xwoods.org | |
{ | |
prefix: "git.xwoods.org/", | |
re: `^(?P<root>git\.xwoods\.org/(?P<p>.*))$`, | |
ping: false, | |
repo: "[email protected]:{p}.git", | |
vcs : "git", | |
}, |
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 net.wendal.quartz; | |
import org.quartz.Job; | |
import org.quartz.JobExecutionContext; | |
import org.quartz.JobExecutionException; | |
public class FuckJob implements Job { | |
@Override | |
public void execute(JobExecutionContext arg0) throws JobExecutionException { |
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
location =/subscribe { | |
send_timeout 365h; | |
content_by_lua " | |
local redis = require \"resty.redis\" | |
local red = redis:new() | |
red:connect(\"127.0.0.1\", 6379) | |
red:subscribe(ngx.var.arg_key) | |
local res, err = red:read_reply() | |
if res then | |
ngx.say(res) |
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
Map<String, List<Province>> map = (Map<String, List<Province>>) Json.fromJson(NutType.mapStr(NutType.list(Province.class)), new FileReader("city.min.js")); | |
List<Province> provinces = map.values().iterator().next(); | |
System.out.println(Json.toJson(provinces)); |
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
{ | |
"xXX": { | |
"type" : "org.nutz.ioc.meta.map.XXX", | |
"fields" : { | |
"fuck" : {"age": "28", "abc": "kkkkk"} | |
} | |
} | |
} | |
/*fuck字段的类型是Map<String,String>*/ |
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 id2path(IN) | |
local B,K,OUT,I,D=16,"0123456789ABCDEF","",0 | |
local now = 0 | |
local len = 0 | |
while IN>0 do | |
if len > 0 and math.mod(len,2) == 0 then | |
OUT="/"..OUT | |
end | |
I=I+1 | |
IN,D=math.floor(IN/B),math.mod(IN,B)+1 |
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
#!/usr/bin/python | |
''' | |
Created on 2013-4-20 | |
@author: wendal | |
''' | |
import socket, threading, time | |
def 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
package main | |
import ( | |
"log" | |
"net/http" | |
"syscall" | |
"unsafe" | |
) | |
func main() { |