Skip to content

Instantly share code, notes, and snippets.

@jadonk
jadonk / x
Created January 18, 2009 20:56
function addSearch (options)
{
options.author = { name: "Jason Kridner", email: "jkridner@gmail.com"};
options.license = "GPL";
options.arguments = [ { role: 'object', nountype: 'noun_arb_text', label: 'search term'} ];
options.previewDelay = 10;
options.execute = function (directObject, modifiers)
{
var postData = this.search(directObject).postData;
Utils.openUrlInBrowser(this.url, postData);
@jadonk
jadonk / x
Created January 18, 2009 21:07 — forked from szupie/x
CmdUtils.CreateCommand({
name: "s2",
icon: "http://www.hasbrotoyshop.com/favicon.ico",
searchURL: "http://www.hasbro.com/games/adult-games/scrabble/home.cfm?page=Dictionary/dict",
description: "Searches Hasbro's Scrabble dictionary for words that use your letters.",
takes: {"keywords": noun_arb_text},
modifiers: {"in": noun_arb_text },
execute: function(keywords, modifiers) {
var query = this.buildQuery(keywords,modifiers);
@jadonk
jadonk / x
Created January 18, 2009 21:34
CmdUtils.CreateCommand({
name: "scrabble-dictionary",
icon: "http://www.hasbrotoyshop.com/favicon.ico",
homepage: "http://www.hasbro.com/games/adult-games/scrabble/home.cfm?page=home",
author: { name: "Jason Kridner", email: "jkridner@gmail.com"},
license: "GPL",
description: "Looks up letters in the Scrabble dictionary",
help: "provide letters to perform lookup",
takes: {"search term": noun_arb_text},
execute: function (directObject, modifiers)
@jadonk
jadonk / x
Created January 19, 2009 06:56
CmdUtils.makeSearchCommand(
{
name: "debian-search-contents",
author: { name: "Jason Kridner", email: "jkridner@gmail.com"},
license: "GPL",
description: "Search Debian archive for which package contains a given file",
url: "http://packages.debian.org/search?suite=default&section=all&arch=any&searchon=contents&keywords={QUERY}"
});
@jadonk
jadonk / x
Created January 20, 2009 01:35
CmdUtils.makeSearchCommand(
{
name: "angstrom-search-package",
author: { name: "Jason Kridner", email: "jkridner@gmail.com"},
license: "GPL",
description: "Search the Angstrom Distribution for which packages",
url: "http://www.angstrom-distribution.org/repo/?pkgsearch={QUERY}"
});
@jadonk
jadonk / x
Created September 4, 2009 01:34
CmdUtils.makeSearchCommand(
{
name: "follow-on-twitter",
author: { name: "Jason Kridner", email: "ubiquity@hangerhead.com"},
license: "GPL",
description: "Search Twitter for a person with this name",
url: "http://twitter.com/search/users?q={QUERY}&category=people&source=find_on_twitter"
});
#!/usr/bin/env node
var sys = require('sys');
sys.puts('Hello World!');
These are the labs for the University of Texas BeagleBoard Open Source Design Challenge training (www.ti.com/beagleboardchallenge).
@jadonk
jadonk / peg-game.js
Created January 24, 2011 19:47
Explore techniques in JavaScript to solve a peg game
#!/usr/bin/env node
var sys = require("sys");
var console = {};
console.log = sys.print;
// c
// 3 4
// 9 0 a
// 8 2 1 5
// e 7 b 6 d
var jumps =
@jadonk
jadonk / play_movie.pl
Created February 28, 2011 23:17
Timeout reading a Linux input event
#!/usr/bin/perl
$ENV{'DISPLAY'} = ":0.0";
system("xhost +");
#system("totem --quit");
#system("nice -n -5 totem --fullscreen /home/root/playlist.xml &");
$cmdline_start = "nice -n -5 mplayer /home/root/*.mov &";
system($cmdline_start);
open(FILE, "/dev/input/event0");
binmode(FILE);