I hereby claim:
- I am glenjamin on github.
- I am glenjamin (https://keybase.io/glenjamin) on keybase.
- I have a public key whose fingerprint is 11CE C764 0EDC 4B60 AB04 5CE4 263A CDF5 874C 2733
To claim this, I am signing this object:
/*eslint-env browser*/ | |
/** | |
* Cribbed from: | |
* github.com/facebook/react/blob/master/src/addons/ReactRAFBatchingStrategy.js | |
* github.com/petehunt/react-raf-batching/blob/master/ReactRAFBatching.js | |
*/ | |
var ReactUpdates = require('react/lib/ReactUpdates'); | |
var ReactRAFBatchingStrategy = { |
function cd() { | |
# Aliases | |
alias cd='' | |
alias exit='' | |
# Variables | |
NONE='\033[00m' | |
RED='\033[01;31m' | |
SLEEP=`which sleep` | |
SEQ=`which seq` |
I hereby claim:
To claim this, I am signing this object:
.vagrant/ |
// The single letter variables are designed to be invisible | |
// Yes, there are a few global variables: t, s and expect | |
// The system under test has no globals, so I can't conflict! | |
var h = require('../spec-helper.js'); | |
var command = require('../../lib/command-round-init.js'); | |
describe('Command: round-init', function() { | |
beforeEach(function() { |
var mysql = require('mysql'); | |
var pool = mysql.createPool('mysql://localhost'); | |
inTransaction(pool, function(db, next) { | |
db.query("DELETE * FROM stuff", function(err) { | |
if (err) return next(err); | |
db.query("INSERT INTO stuff VALUES (1,2,3)", function(err) { | |
return next(err); |
<?php | |
public function providerGetEventId() { | |
return array( | |
'wrong way around' => array( | |
'Premier League', | |
array('id' => 5,'name' => 'Hull', 'shortname' => 'HUL'), | |
array('id' => 6,'name' => 'Manchester City', 'shortname' => 'MNC'), | |
null | |
), | |
'different event type' => array( |
var _ = require('underscore'); | |
/** | |
* functional zip() for JS objects | |
* | |
* Skips keys not present in both sides | |
* | |
* @param a left object | |
* @param b right object | |
* @param f(key, aval, bval) iterator |
# List processes via pgrep, then prompt to pkill | |
pgk() { | |
[ -z "$*" ] && echo 'Usage: pgk <pattern>' && return 1 | |
pgrep -fl $* | |
[ "$?" = "1" ] && echo 'No processes match' && return 1 | |
echo 'Hit [Enter] to pkill, [Ctrl+C] to abort' | |
read && pkill -f $* | |
} |
(ns water | |
(require [clojure.string :as s])) | |
(defn right-reductions [f l] | |
"just like (reductions) but form the right" | |
(reverse (reductions f (reverse l)))) | |
(defn transpose [m] | |
"Transpose a list of lists" | |
(apply mapv vector m)) |