I hereby claim:
- I am tlhunter on github.
- I am tlhunter (https://keybase.io/tlhunter) on keybase.
- I have a public key whose fingerprint is 34FA 158E 563B CEF7 816E DB79 3B71 1C30 7DA2 4AA1
To claim this, I am signing this object:
app.get('/health', function(req, res){ | |
res.send({ | |
pid: process.pid, | |
memory: process.memoryUsage(), | |
uptime: process.uptime(), | |
connections: server.connections | |
}); | |
}); |
<?php | |
class MyCoolClass { | |
/** | |
* @var $data array How does one specify this array needs a 'subelement' key? | |
*/ | |
public function performAction($data) { | |
echo $data['requiredkey']; | |
} | |
} |
var readline = require('readline').createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
// CARD CLASS | |
var Card = function(face, suite) { | |
if (this.faces.indexOf(face) == -1) { | |
throw new Error("Invalid Face: " + face); |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env node | |
var amqp = require('amqplib'); | |
var exchange_name = 'pubsub'; | |
amqp.connect('amqp://localhost').then(function(conn) { | |
process.once('SIGINT', function() { conn.close(); }); | |
return conn.createChannel().then(function(channel) { |
# http://wiki.nginx.org/Install#Official_Debian.2FUbuntu_packages | |
$ sudo apt-get upgrade | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following packages will be upgraded: | |
nginx | |
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
Need to get 477 kB of archives. |
#EXTM3U | |
#EXTINF:-1,Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM] | |
http://uwstream1.somafm.com:80 | |
#EXTINF:-1,Dub Step Beyond: Dubstep, Dub and Deep Bass. May damage speakers at high volume. [SomaFM] | |
http://somafm.com/dubstep.pls | |
#EXTINF:-1,Def Con Radio: SomaFM's special mix for Def Con [SomaFM] | |
http://somafm.com/defcon.pls | |
#EXTINF:-1,The Trip: Progressive house / trance. Tip top tunes. (Formerly Tag's Trance Trip) [SomaFM] | |
http://somafm.com/thetrip.pls | |
#EXTINF:-1,Suburbs of Goa [SomaFM] |
var level_result = createLevel(12, {data: true}); | |
console.log(level_result); | |
function createLevel(user_id, level_data) { | |
var user = getUser(user_id); | |
var can_create = canCreate(user); | |
if (!can_create) { | |
return null; | |
} |
var print = typeof print === 'function' ? print : console.log.bind(console); | |
function X() { | |
} | |
X.prototype.dispatch = function (obj) { | |
this[obj.type](obj); | |
}; | |
var DEGREE = 20; |
#!/usr/bin/env node | |
/** | |
* Flips each item in a spritesheet horizontally, maintaining position | |
* @author Thomas Hunter II <me@thomashunter.name> | |
* | |
* 1) Execute `npm install lwip async` | |
* 2) Delete the following conditional in the lwip node_module: | |
* https://github.com/EyalAr/lwip/blob/1138482318e79ee6c69706b544ed5d6ffe11391c/lib/ImagePrototypeInit.js#L467 | |
*/ |