Skip to content

Instantly share code, notes, and snippets.

View guyht's full-sized avatar

Guy Halford-Thompson guyht

View GitHub Profile
@guyht
guyht / echoHttpRequest.js
Last active August 29, 2015 14:19 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
@guyht
guyht / d3 Example
Last active August 29, 2015 14:06
D3 SelectAll example
data = [1, 3, 8, 10, 15];
d3.select("body").selectAll("p")
.data(data)
.enter()
.append("p")
.text(function(d){return d;});
@guyht
guyht / gist:c09c6fd66309e365154f
Created April 30, 2014 23:00
Jade template for pkrsess
case hand.gametype.limit
when 'nl'
- var lim = 'No Limit'
case hand.gametype.flavour
when 'holdem'
- var flav = 'Holdem'
case hand.session.buyincurrency
when 'USD'
NAME: mrwooster_cathedral_st_pauls
WEIGHT: 50000
PLACE: Temple
TAGS: no_rotate, no_hmirror
ORIENT: encompass
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx...B.B...xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx...........xxxxxxxxxxxxxxxxxxx
NAME: mrwooster_entry_arrow
TAGS: entry no_monster_gen
ORIENT: float
MAP
xxxxxxxxxxxxx
xxxxxx.xxxxxx
xxxxx...xxxxx
xxxx.....xxxx
xxx.......xxx
xx.........xx
@guyht
guyht / vpn-start
Created June 13, 2012 19:52
VPN SMS control
var sys = require('sys'),
smsified = require('smsified'),
http = require('http'),
spawn = require('child_process').spawn;
var sms = new SMSified('USERNAME', 'PASSWORD');
var server = http.createServer(function(req, res) {
req.addListener('data', function(data){
@guyht
guyht / gist:1684328
Created January 26, 2012 18:48
Twitter Bot in NodeJS
/*
* Load external modules and init variables
*/
var twitter = require('ntwitter'),
http = require('http'),
bitly = require('bitly'),
b = new bitly('USER', 'API_KEY'),
tweeted = {},
load_time = Math.round(new Date().getTime() / 1000),
score_threshold = 100;
Incident Identifier: A2EAC453-F4AC-4240-B364-D4E29EEBCDAD
CrashReporter Key: d80c282094567ce2b4a19bbc8aae0e3697976995
Hardware Model: iPhone3,1
Process: [APP_NAME [1037]
Path: /var/mobile/Applications/71A84C67-8919-42FC-B3B2-55EAA143D757/[APP_NAME.app/[APP_NAME
Identifier: [APP_NAME
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
@guyht
guyht / 1.js
Created December 30, 2011 19:35
Giki - Realtime, asynchronous JavaScript parser and code highlighter
<div id="bbcode_div"></div>
<textarea id="bbcode_ta" cols="20" rows="5"></textarea></pre>
function init() {
document.parser = new Worker('https://raw.github.com/guyht/Giki/master/lib/gworker.js');
document.parser.onerror = function(event){
throw new Error(event.message + " (" + event.filename + ":" + event.lineno + ")");
};
document.parser.onmessage = function(event) {
document.getElementById('wiki_div').innerHTML = event.data;
};
document.parser.postMessage(document.getElementById('wiki_textarea').value);
}