Skip to content

Instantly share code, notes, and snippets.

View jbt's full-sized avatar

James Taylor jbt

View GitHub Profile
@jbt
jbt / gist:2273631
Created April 1, 2012 08:43
I made a cool thing
(function(g){g("f_\";:\x1f\\[.|nAyH|v\x26gs+}h#9SITu4RHpu6;a@F<Ghn+Z5^@\x1feG$'j)h'gW$ht!'7DTz'\\AwgO-4RHp$@\x26e}=mnlEZ}hHbf~3PIEk?d2I`^u bYJFl@RNWHC:;)AKl\\3Ifr[$9RSHiKB{`JK@a\x1f>`!CPluSOuI5N^*H_yx5d?/0%F?P5SO])?x\x26@4u[yu\"Tgyzo/57ZM~;1YXh|.J`\"n<[}|(DM?h \x1fb+;CPU3Kl(MTyvf3^1i\x7fJc\x266XU!*>?4UcS89.Oh 0r+>F^z+,!B'(~>Tx ^5T?/(akgpa1h_(<-,_n*H>fVf?'0E)WSdseac+CGln_}K\x26k40,R\x26U_*A_#j\x1fXg uU<,%^~[2Nd\x26pcz-F 6Dz7-U5Mer!#'(?r[.>Re 6YR#1R^l')?XA*HwRM[w0H`cdYzz^<Tu|2IQ(Giv1:Gy\x26ear Yg\"$^rN@%<FZ%L}HR7^POF\x7f?^prdRplzb4X.dYp u {0oiL*c;Q.xmv(:wZ",22,97,31,492,"",g)})(function(a,b,c,d,e,f,g){for(;e--;)f+=String.fromCharCode(((a.charCodeAt(e)+e-d)*b)%c+d);eval(f)})
@jbt
jbt / gist:1805044
Created February 11, 2012 23:28
Here's something cool
var a=function(){function m(a){this.v=a;this.K=new n(a,100*e.d,100*e.c);this.la=[u[0]*v,u[1]*v];this.ja=new o(q,e);this.m=new w(0.6,0.01);this.n=new x;document.addEventListener("mousedown",this.pa.bind(this));document.addEventListener("mousemove",this.qa.bind(this));document.addEventListener("mouseup",this.ra.bind(this))}function l(a,b){this.a=a;this.p=b;this.axis=[[1,0],[0,1]];this.margin=1.0E-7}function w(a,b){this.N=a;this.P=b;this.i=[]}function r(a){a=a||{};this.a=a.a||[1,1];this.dir=
a.dir||[0.15,0];this.z=a.z||128;this.g=a.g||1}function x(){this.h=[];this.w=[];this.H=1500}function s(a,b,c){a instanceof Array?(this.a=a,this.l=[a[0],a[1]],this.g=b||1,this.o=c||[0,0],this.b=[0,0]):(this.a=a.a||[0,0],this.l=a.l||[0,0],this.g=a.g||1,this.o=a.o||[0,0],this.b=a.b||[0,0]);this.ua=new y(0.01);this.r=new z(this.a,0.25*q);this.u()}function z(a,b){this.a=a;this.margin=b}function n(a,b,c){this.v=a;a.style.width=b+"px";a.style.height=c+"px";this.d=b;this.c=c;a=this.canvas=document.createElement("canvas");
a.width=b;a
@jbt
jbt / formatDate.js
Created September 27, 2011 19:20
JavaScript implementation of PHP's date formatting
/*
* JavaScript implementation of PHP date formatting.
* Author: JT <jt@gosquared.com>
*
* Usage: formatDate('Y M d H:i:s', dateObject)
* or formatDate('Y M d H:i:s') to use current time
*
* This function is free for you to use however you please. Use it or
* modify it however you like. All I ask is that you don't just pass
* it off as your own. I hope it's useful!