Skip to content

Instantly share code, notes, and snippets.

View chenzhihao's full-sized avatar

Zhihao Chen chenzhihao

View GitHub Profile
function onRequest(request, response) {
var pathName = url.parse(request.url).pathname;
handler[pathName];
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}
function onRequest(request, response) {
var pathName = url.parse(request.url).pathname;
handler[pathName];
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}
@chenzhihao
chenzhihao / gist:5982544
Created July 12, 2013 07:20
kill process quickly
ps -ef|grep node|grep -v grep|awk {'print $2'}|xargs kill -9