Skip to content

Instantly share code, notes, and snippets.

View guyht's full-sized avatar

Guy Halford-Thompson guyht

View GitHub Profile
@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;
@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){
NAME: mrwooster_entry_arrow
TAGS: entry no_monster_gen
ORIENT: float
MAP
xxxxxxxxxxxxx
xxxxxx.xxxxxx
xxxxx...xxxxx
xxxx.....xxxx
xxx.......xxx
xx.........xx
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
@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'
@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 / 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);