Skip to content

Instantly share code, notes, and snippets.

@garyhodgson
garyhodgson / ubiquity_tiddlywiki.js
Created October 16, 2008 20:08
A Ubiquity Command to interact with a TiddlyWiki
/**
* Ubiquity Command to interact with a TiddlyWiki
*
* contact@garyhodgson.com
*/
var TiddlyUbiquity = {};
TiddlyUbiquity.SETUP_WARNING = "Warning: You must supply the URL of your TiddlyWiki. Please use tiddlywiki-setup.";
TiddlyUbiquity.NO_URL_MSG = "No TiddlyWiki URL found. Please use tiddlywiki-setup.";
var asd = function(){
d = new Date();
CmdUtils.log(d.getTime());
return ['asd1','asd2','asd'+d.getTime()];
}
/* This is a template command */
CmdUtils.CreateCommand({
name: "example",
icon: "http://example.com/example.png",
@garyhodgson
garyhodgson / ubiquity-amazon-local.js
Created October 26, 2008 22:21
Ubiquity command to perform a 'Blended' search in Amazon Germany, UK, USA, Japan or Canada.
/**
* Ubiquity command to perform a 'Blended' search in Amazon Germany, UK, USA, Japan or Canada.
*/
/**
* Core Type Extension
* Now returns the index of the suggestion array as the data element
*/
function ModNounType(name, expectedWords) {this._init(name, expectedWords);};
var F = function() {};
@garyhodgson
garyhodgson / ubiquity-ebookshare.js
Created October 26, 2008 22:41
Ubiquity Command to search ebookshare.net
/**
* Ubiquity Command to search <a href="http://ebookshare.net">ebookshare.net</a>
*/
CmdUtils.makeSearchCommand({
name: "ebookshare",
author: {
name: "Gary Hodgson",
homepage : "http://www.garyhodgson.com/",
email : "contact@garyhodgson.com"},
url: "http://ebookshare.net/plus/query.php?keyword={QUERY}&searchtype=title&GO=GO",
@garyhodgson
garyhodgson / ubiquity-bitly.js
Created October 27, 2008 14:14
Ubiquity Command that uses bit.ly to shorten urls
/**
* Command to shorten URLs using bit.ly
*
* Copied from http://mskadu.googlepages.com/bitly
*/
CmdUtils.CreateCommand({
name: "bitly",
takes: {"url to shorten": noun_arb_text},
icon: "http://bit.ly/static/images/favicon.png",
description: "Replaces the selected URL with a shortened version from <a href=\"http://bit.ly/go\">Bit.ly</a><br/>And copies it to your clipboard for further use",
@garyhodgson
garyhodgson / ubiquity-torrent.js
Created October 30, 2008 08:27
Ubiquity commands to search mininova.org or thepiratebay.org
/**
* Ubiquity commands to search mininova.org or thepiratebay.org
*/
var TorrentUbiquity = {};
TorrentUbiquity.MCM = {
'ANIME' : '1',
'BOOKS' : '2',
'GAMES' : '3',
'MOVIES' : '4',
'MUSIC' : '5',
/* This is a template command */
CmdUtils.CreateCommand({
name: "example",
icon: "http://example.com/example.png",
homepage: "http://example.com/",
author: { name: "Your Name", email: "you@example.com"},
license: "GPL",
description: "A short description of your command",
help: "how to use your command",
takes: {"input": noun_arb_text},
@garyhodgson
garyhodgson / ubiquity-oracle.js
Created November 12, 2008 20:30
Ubiquity command to search Oracle documentation
/**
* Ubiquity command to search Oracle documentation
*/
CmdUtils.CreateCommand({
name: "oracle",
author: {
name: "Gary Hodgson",
homepage: "http://www.garyhodgson.com/",
email: "contact@garyhodgson.com"
},
@garyhodgson
garyhodgson / ubiquity-google.js
Created November 12, 2008 20:32
Ubiquity commands to search and bookmark with Google Bookmarks
/**
* Ubiquity commands to search and bookmark with Google Bookmarks
*/
CmdUtils.CreateCommand({
name: "bookmark",
description: "Bookmarks the current site using Google Bookmarks",
author: {
name: "Gary Hodgson",
homepage: "http://www.garyhodgson.com/",
email: "contact@garyhodgson.com"
@garyhodgson
garyhodgson / ubiquity-rtm.js
Created November 12, 2008 20:34
Ubiquity command to add a task to RTM, using a bookmarklet
/**
* Ubiquity command to add a task to RTM, using a bookmarklet
*/
CmdUtils.CreateCommand({
name: "rtm-bookmarklet",
author: {
name: "Gary Hodgson",
homepage : "http://www.garyhodgson.com/ubiquity/rtm-bookmarklet.html",
email : "contact@garyhodgson.com"
},