Skip to content

Instantly share code, notes, and snippets.

View tsing's full-sized avatar
🦀

Jesse Wang tsing

🦀
View GitHub Profile
var posix = require('posix'),
sys = require('sys'),
http = require('http');
http.createServer(function (req, res) {
checkBalanceFile(req, res);
}).listen(8000);
function checkBalanceFile(req, res) {
var promise = posix.stat("balance");
@tsing
tsing / ed2kHash.py
Created May 28, 2012 15:00 — forked from fcicq/ed2kHash.py
ed2kHash class for python
# by fcicq (fcicq at fcicq dot net) @ 2012.5.12, Released under GPLv2
import hashlib
from cStringIO import StringIO
class ed2kHash():
CHUNK_SIZE = 9728000
BLOCK_SIZE = 65536
chunkmd4_list = ''
chunkmd4 = None
chunkpos = 0
@tsing
tsing / hack.sh
Created July 9, 2012 13:36 — forked from DAddYE/hack.sh
OSX For Hackers
#!/bin/sh
##
# This is a script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run in interactive mode with:
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)"
#
# or run it without prompt questions:
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, 127.0.0.1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10
loglevel = notify
[Proxy]
Proxy = https,prx.example.com,443,username,password
USProxy = https,prx-us.example.com,443,username,password
UKProxy = https,prx-uk.example.com,443,username,password