Skip to content

Instantly share code, notes, and snippets.

@tmcw
tmcw / disconnect.rb
Created July 22, 2011 04:06
bulk-export run data from Garmin Connect
#!/usr/bin/env ruby
## disconnect
# ./disconnect.rb -u yourusername
#
# This is a command-line utility for the bulk-downloading of run data from
# the connect.garmin.com web application, which has lackluster export
# capabilities.
#
@medmunds
medmunds / knockout-jquery-ui-widget.js
Created March 27, 2011 17:35
Knockout binding for jQuery.ui.widget
// knockout-jquery-ui-widget.js
// Copyright (c) 2011, Planapple, Inc.
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
//
// Knockout binding for jQuery UI widgets
//
// Examples:
// <input type="submit" value="OK" data-bind='jqueryui: "button"' />
//
// Attaches a jQuery UI button widget to this button, with default options.
javascript:(function(d,g,r,o,l,x,y,u,z,t,a,b,n,m,s,i,f){n=d.createElement("pre");n.setAttribute("style","z-index:100;font-weight:bold;position:absolute;left:0px;top:0px;background:black;color:white");s=new Array(o+1).join(" ");for(i=0;i<l;i++)n.appendChild(m=r[i]=d.createTextNode(s)),n.appendChild(d.createTextNode("\n"));function p(x,y,c,_){if(x>=0)with(r[y])nodeValue=nodeValue.substring(0,x)+c+nodeValue.substring(x+c.length)}function h(){t.push({x:0,y:8,s:"Python",c:0,m:function(){with(this)x+=c>40?-3:1,y+=c>40?1:0,c++;return this.c<40||this.x>3&&this.y<l}})}a=x,b=y,f=0,setInterval(function(i,j,k,e){Math.random()>.97?h():0;for(i=0;++i<4;)p(0,l-i,s);p(x,y," ");for(i=0;i<3;++i)for(k=g[i].length,j=0;j<o;j+=k)p(j,l-i-1,o-j<k?g[i].substr(f,o-j):g[i].substr(f,k)+g[i].substr(0,f));f=(--f+k)%k;for(i=u.length;--i>=0;)with(u[i])p(x--,y," "),x>0?p(x,y,"-"):u.splice(i,1);x=a,y=b,p(x,y,"<?php");for(i=t.length;--i>=0;)e=t[i],p(e.x,e.y,s.substr(0,e.s.length)),e.m()?p(e.x,e.y,e.s):t.splice(i,1)},50);d.onkeydown=function
@riaf
riaf / .gitignore
Created September 28, 2010 04:03
Lightning Template
cache