Skip to content

Instantly share code, notes, and snippets.

View enjalot's full-sized avatar

Ian Johnson enjalot

View GitHub Profile
@dnprock
dnprock / vida_d3.js
Created October 23, 2013 23:37
vida.io script attach to d3 components, call vida_d3.attach and detach.
var orig_appendChild = Element.prototype.appendChild;
var inspect_rect = null;
vida_d3 = {
getCallStack: function() {
var fn = arguments.callee;
var callstack = []
while ( (fn = fn.caller) ) {
callstack.push(fn.toString())
}
@dopiaza
dopiaza / slackpost
Created September 5, 2013 12:33
Post a message to a Slack channel
#!/bin/bash
# Usage: slackpost <token> <channel> <message>
# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
slackhost=PUT_YOUR_HOST_HERE
token=$1
uniform sampler2D texture;
uniform float scale, aspect, time;
uniform mat3 transform;
varying vec2 v_texcoord;
#define PI 3.141592653589793
#define PI_2 1.570796326794897
vec2 tc_offset[9];
@enjalot
enjalot / timing.py
Created March 7, 2011 11:31
A timing decorator class using a coroutine for the fun of it
import time
class Timing(object):
def __init__(self):
self.timings = {}
self.col = self.__collector()
self.col.next() #coroutine syntax
def __collector(self):
while True: