Skip to content

Instantly share code, notes, and snippets.

View onejgordon's full-sized avatar

Jeremy Gordon onejgordon

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@onejgordon
onejgordon / fit_activity_types.json
Created March 27, 2017 13:11
Google Fit Activity Types (JSON)
# Pulled from https://developers.google.com/fit/rest/v1/reference/activity-types on March 27, 2017
{
"9": "Aerobics",
"10": "Badminton",
"11": "Baseball",
"12": "Basketball",
"13": "Biathlon",
"1": "Biking",
"14": "Handbiking",
@onejgordon
onejgordon / x
Created May 13, 2009 20:47
Lookup Japanese words (romaji) in English using Jim Breen's JDIC
CmdUtils.CreateCommand({
name: "je",
icon: "http://www.csse.monash.edu.au/~jwb/favicon.ico",
author: { name: "Jeremy Gordon", email: "onejgordon@gmail.com"},
description: "Lookup Japanese words (romaji) in English using Jim Breen's JDIC",
takes: {"lookup": noun_arb_text},
preview: function( pblock, eword) {
var turl = "http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1MDJ" + eword.text;
CmdUtils.previewGet(pblock,turl,null,function(data){
output = "";
@onejgordon
onejgordon / x
Created May 13, 2009 20:41
Lookup English words in Japanese using Jim Breen's JDIC
CmdUtils.CreateCommand({
name: "ej",
icon: "http://www.csse.monash.edu.au/~jwb/favicon.ico",
takes: {"lookup": noun_arb_text},
preview: function( pblock, eword) {
var turl = "http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?1MDP" + eword.text;
CmdUtils.previewGet(pblock,turl,null,function(data){
output = "";
result = jQuery(data).find("label");
nResults = result.size();
@onejgordon
onejgordon / x
Created February 26, 2009 09:44
Lookup lyrics through lyrics.astraweb.com
var noun_type_song_lookup = {
_name: "song",
suggest: function suggest( text, html, callback ) {
var url = "http://search.lyrics.astraweb.com/";
var suggestions = [CmdUtils.makeSugg(text)];
jQuery.get(url, {word: text}, function(data) {
results = jQuery(data).find("b > a");
for ( i = 0; i < results.length && i < 9; i++ ) {
result = results.get(i);
@onejgordon
onejgordon / x
Created February 24, 2009 19:05
firefox-ubiquity command for San Francisco nextmuni arrivals
noun_type_sfbus = new CmdUtils.NounType( "SFBus", ["F","J","KT","L","M","N","S","1","1AX","1BX","2","3","4","5","6","7","9","9AX","9BX","9X","10","12","14","14L","14X","16AX","16BX","17","18","19","20","21","22","23","24","26","27","28","28L","29","30","30X","31","31AX","31BX","33","35","36","37","38","38AX","38BX","38L","39","41","43","44","45","47","48","49","52","53","54","56","66","67","71","71L","74","76","80X","81X","82X","88","89","90","91","108","K OWL","L OWL","M OWL","N OWL","T OWL","59","60","61"]);
CmdUtils.CreateCommand({
name: "muni",
icon: "http://www.nextmuni.com/favicon.ico",
homepage: "http://www.jeremyrgordon.com/2009/02/nextmuni-for-ubiquity.html",
author: { name: "Jeremy Gordon", email: "onejgordon@gmail.com"},
description: "Lookup muni arrivals from nextmuni.com",
help: "Input line number and partial matches for cross streets, eg. 'muni 1 at Div and Cal'. Currently matches capitalized street names.",
takes: {"line": noun_type_sfbus},