Skip to content

Instantly share code, notes, and snippets.

View ggoodale's full-sized avatar

Grant Goodale ggoodale

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1FMMeHCKbDRe5nzTY76GKFRodXwQMUZ7Gu https://explorer.blockstack.org/address/1FMMeHCKbDRe5nzTY76GKFRodXwQMUZ7Gu
@ggoodale
ggoodale / gist:11202799
Created April 23, 2014 04:32
keybase.io proof
### Keybase proof
I hereby claim:
* I am ggoodale on github.
* I am ggoodale (https://keybase.io/ggoodale) on keybase.
* I have a public key whose fingerprint is BF94 6518 5F1F 2739 9BAB 6486 0EE9 D077 694B 3830
To claim this, I am signing this object:
@ggoodale
ggoodale / .plan
Created April 8, 2014 23:43
.plan
Oh, man. This internet thing is going to be sweet.
function silencing_stderr() {
$* 2>/dev/null
}
function branch_names() {
git br | awk '{print $1}' | grep -v '*' | xargs
}
function most_recent_commit() {
git log . | grep "Date: " | cut -c 9- | head -1
{"version":"0.2.3","result":"success","id":"4ceb70e61934e04f7ab991c2","shortlink":"2QqGyiMX","overall_score":169627,"lives":154,"played_words":[{"word":"SH","score":5,"bonuses":[],"coords":[{"x":1052,"y":-2010},{"x":1053,"y":-2010}]},{"word":"HONORED","score":72,"bonuses":["dw"],"coords":[{"x":1053,"y":-2010},{"x":1053,"y":-2011},{"x":1053,"y":-2012},{"x":1053,"y":-2013},{"x":1053,"y":-2014},{"x":1053,"y":-2015},{"x":1053,"y":-2016}]},{"word":"NET","score":3,"bonuses":[],"coords":[{"x":1061,"y":-1997},{"x":1061,"y":-1998},{"x":1061,"y":-1999}]},{"word":"SAW","score":12,"bonuses":["dw"],"coords":[{"x":1057,"y":-2022},{"x":1058,"y":-2022},{"x":1059,"y":-2022}]},{"word":"MEW","score":8,"bonuses":[],"coords":[{"x":1059,"y":-2020},{"x":1059,"y":-2021},{"x":1059,"y":-2022}]}],"assigned_letters":["V","O","S","R","I","A","L"],"state":"InProgress","leaderboard_name":"S P A Z I N","extendable_tiles":[{"x":1059,"y":-2020,"letter":"M","wildcard":false},{"x":1059,"y":-2021,"letter":"E","wildcard":false},{"x":1059,"y":-202
@ggoodale
ggoodale / Telephone.js
Created November 8, 2010 01:18
3rd example for Deploy 2010
var net = require('net'),
_ = require('./underscore-min')._;
var connections = {};
var selectReceiver = function(sender) {
var eligibleReceivers = _.select(connections, function(conn) {
return (conn !== sender && !conn.gameData);
});
return eligibleReceivers[Math.floor(Math.random() * eligibleReceivers.length)];
@ggoodale
ggoodale / Chat.js
Created November 8, 2010 01:16
Example #1 from Deploy 2010
var net = require('net'), _ = require('./underscore-min')._;
// Our active connections
var connections = {};
var server = net.createServer(function(sock) {
sock.setTimeout(0);
sock.setEncoding("utf8");
connections[sock.remotePort] = sock; // Store a reference to the new client
@ggoodale
ggoodale / SingingChat.js
Created November 8, 2010 01:08
Node.js example #2 From Deploy 2010
var net = require('net'), fs = require('fs'), _ = require('./underscore-min')._;
// Our active connections
var connections = {};
var doc = fs.readFileSync('lyrics.txt', 'utf8').split(" ");
var word = 0;
var intervalId = null;
var sing = function() {
if ((word >= doc.length || _.size(connections) == 0) && intervalId != null) {
> db.tiles.find({ position: { $within: { $box: [ [ 1466, -2128 ], [ 1506, -2088 ] ] } } }).explain()
{
"cursor" : "GeoBrowse-box",
"nscanned" : 341,
"nscannedObjects" : 341,
"n" : 341,
"millis" : 725,
"indexBounds" : {
}
> db.tiles.find({ position: { $within: { $box: [ [ 1466, -2128 ], [ 1506, -2088 ] ] } } }).explain()
{
"cursor" : "GeoBrowse-box",
"nscanned" : 341,
"nscannedObjects" : 341,
"n" : 341,
"millis" : 657,
"indexBounds" : {
}