Skip to content

Instantly share code, notes, and snippets.

View mick's full-sized avatar

Mick Thompson mick

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
gifsicle process.gif -e
convert process.gif.* -format "jpg" %03d.jpg
ffmpeg -f image2 -pattern_type glob -i "*.jpg" -r 25 output.mov
@mick
mick / README.md
Created February 17, 2013 03:31 — forked from mbostock/.block

This choropleth encodes unemployment rates from 2008 with a quantize scale ranging from 0 to 15%. A threshold scale is a useful alternative for coloring arbitrary ranges.

@mick
mick / geos-config
Created June 20, 2012 04:10
geos config
#!/bin/sh
prefix=/app/.geo/geos
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
usage()
{
cat <<EOF
Usage: geos-config [OPTIONS]
Options:
@mick
mick / gist:2221357
Created March 27, 2012 23:16
subscription with bounds
<iq type='set'
from='admin@talkback.im'
to='geo.talkback.im'
id='sub1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscribe
node='test'
jid='admin@talkback.im'/>
<options node='test' jid='admin@talkback.im'>
<x xmlns='jabber:x:data' type='submit'>
@mick
mick / steps.js
Created March 27, 2012 22:46
spark like steps for a given array
var list = [1,45,23,45,65,6,2];
var steps = 6;
var packed_list = [];
var min=0, max=0;
for(l in list){
if(min > list[l])
min = list[l];
@mick
mick / gist:1218084
Created September 14, 2011 23:17
slide gists
{
"_id": "_design/gc-utils",
"_rev": "2-bd8fcdf5509cb9cc99560a39f0c642f0",
"vendor": {
"clustering": {
"KNNCluster": "/**\n * kNN-based Clustering\n */\n(function() {\n\tvar cluster = this.cluster = {};\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = cluster;\n\t}\n\t\n\t//TODO\n})();",
"ProximityCluster": "/**\n * Proximity based clustering\n */\n(function() {\n\n var proxcluster = this.proxcluster = {};\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = proxcluster;\n\t}\n\n var gju = require('vendor/geojson-js-utils/geojson-utils');\n\n proxcluster.PointCluster = function(threshold){\n this.clusters = [];\n this.points = [];\n this.distanceThreshold = threshold;\n\n };\n \n proxcluster.PointCluster.prototype.addToClosestCluster = function(point) {\n var distance = 40000; // Some large number\n var clusterToAddTo = null;\n var pos = point.geometry;\n
@mick
mick / gist:1189405
Created September 2, 2011 18:28 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Web Developer at occipital.com
Favorite Python project: graphite
Favorite Conference: OSCON.
Python Experience Level: Advanced. 5yr+