Skip to content

Instantly share code, notes, and snippets.

View rafkhan's full-sized avatar
😳
im ok

Rafael Khan rafkhan

😳
im ok
View GitHub Profile
var _ = require('lodash'); // XXX THIS DEPENDENCY IS ADDED BY US
/**
* sifter.js
* Copyright (c) 2013 Brian Reavis & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
carolyn can't use gist
@rafkhan
rafkhan / conf.js
Last active August 29, 2015 14:11
New Admin API
{
backups: {
storage: ['s3', 'fs'],
mongo: {
target: {
uri: 'mongo:// ...',
collections: ['collection1', 'collection2']
},
var process = function(f) {
var gen = f();
var nextVal = function(lastVal) {
var itr = gen.next(lastVal);
if(itr.done) { return; }
itr.value.then(nextVal);
};
var Q = require('q');
function getTheAnswerAsync() {
return Q.when(42);
}
function getTheQuestionAsync(answer) {
if (answer===42) {
return Q.when('What do you get if you multiply six by nine?');
} else {
'use strict';
var _ = require('lodash');
var http = require('http');
var director = require('director');
var koast = {};
var routeMap = {};
koast.methods = {
@rafkhan
rafkhan / fuck.sh
Created February 14, 2014 02:32
...fuck
mv www/node_modules www/.node_modules
$@
mv www/.node_modules www/node_modules
3 in the morning
Writing a stupid haiku
So I pass English
12 words per haiku
200 for the assignment
So 16 haikus
[{
id: "abcdef1234567890",
name: "Cute Little Coffee Shop",
phone: "(416) - 123 - 4567",
website: "http://cutelittlecoffeeshop.com",
location: {
lat: 10,
lng: 10,
address: "123 Main Street"
},
package main;
import (
"net"
"fmt"
"bufio"
)
var (
inboundQueue = make(chan net.Conn);