Skip to content

Instantly share code, notes, and snippets.

Tim Channell tcql

  • Washington, DC
Block or report user

Report or block tcql

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tcql /
Last active Sep 1, 2017
OSM Road coverage compared to CIA World Factbook. Measurements in Miles
View gist:fbaf9f408474e7d57bcc
41:6 error cellHeight is defined but never used no-unused-vars
99:11 error i is already declared in the upper scope no-shadow
40:6 error addEdgesResult is defined but never used no-unused-vars
65:19 error Don't make functions within a loop no-loop-func
77:11 error x is already defined no-redeclare
98:31 error c is already declared in the upper scope no-shadow
117:4 error sizeResult is defined but never used no-unused-vars
View gist:1e42ba0d9d040e9177c5
172:6 error unrecognizedError is defined but never used no-unused-vars
64:1 error Missing semicolon semi
110:59 error done is defined but never used no-unused-vars
121:1 error Missing semicolon semi
View gist:391759d0551639ae0a31
$driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME);


try {
    // SERIALIZABLE transactions fail if multiple of them
    // even try to touch the same rows at the same time
    if ($driver == "pgsql") {
        $isolation = $this->pdo->prepare(
View gist:6653542


Download and unzip... wherever you feel like: Phaser Project


In whatever folder you unzipped into:

npm install
View gist:6632200
git clone
cd phaser-coffeescript
# The branch i'm testing on. The phaser dependency
# Is pointing at a fork I made of phaser (tchannel/phaser)
# Where i setup the sourcemap and build tasks
git checkout origin/test-phaser-sourcemap
npm install
tcql / gist:6366841
Last active Dec 21, 2015
first Leaflet layer! Still could use some cleanup and whatnot, but It works pretty well.
View gist:6366841
class L.PolyCircle extends L.Path
polyOptions: {}
nodes: 16
initialize: (center, radius, options)->
L.setOptions @,options
tcql / gist:1856724
Created Feb 18, 2012
FizzBuzz, in Grin
View gist:1856724
}}}}}}}}}}$*$[>}~-$]<[$>\>_}}}}}${{*$<<%&[(Fizz Buzz)){{]}[>$<\>>_}}}}}$<<%&[(Buzz)){{]}[>$<\>>_}}}$<<%&[(Fizz)){{]}[>:)<_]]]<]
tcql / gist:1806486
Created Feb 12, 2012
Making CoffeeScript more Haskell-y
View gist:1806486
## The more functional way
head = (x) -> ((z,zs...) -> z) x...
tail = (x) -> ((z,zs...) -> zs) x...
last = (x) -> ((zs...,z) -> z) x...
init = (x) -> ((zs...,z) -> zs) x...
## OR, the more coffee-scripty way:
headCS = (xs) -> xs[0]
tailCS = (xs) -> xs[1..xs.length]
initCS = (xs) -> xs[0...xs.length-1]
View haskellpowerset.hs
Calling powerset with a list
will return a list of all combinations of elements in the list. Example:
powerset [1,2,3]
returns : [[1,2,3],[1,2],[1,3],[1],[2,3],[2],[3],[]]
import Control.Monad
You can’t perform that action at this time.