Skip to content

Instantly share code, notes, and snippets.

@abi
abi / TweetingWithHookpress.py
Created August 4, 2009 14:56
Tweet your new blogposts on Wordpress with Web Hooks/Hookpress
# Python 2.5.2 powered by GAE
#
# Like a typical App Engine environment with req and resp objects.
# Make HTTP requests with: fetch (see App Engine documentation)
#
USERNAME = "username"
PASSWORD = "password"
STATUS = "[infinity symbol goes here] " + req.get("post_title") + " " + req.get("post_url")
//TODO: force this to be re-evaluated all the time
//if(CmdUtils.getDocument().location.href.indexOf("https://bespin.mozilla.com/") == 0){
var bespin = {cmd : {commands : {}}};
bespin.cmd.commands.add = function(obj){
var cmd = {};
var roles = ["object", "goal", "source", "location", "time"];
var ubiqArgs = [];
CmdUtils.makeSearchCommand({
name: "alpha",
synonyms: ["wolframalpha"],
url: "http://www.wolframalpha.com/input/?i={QUERY}",
icon: "http://www16.wolframalpha.com/images/favicon.ico",
description: "Searches Wolfram|Alpha. Previews coming as soon as Wolfram|Alpha releases its API."
});
@abi
abi / x
Created February 12, 2009 17:01
function getBookmarklets(callback) {
var bookmarklets = {};
var Ci = Components.interfaces;
var Cc = Components.classes;
var bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"]
.getService(Ci.nsINavBookmarksService);
var history = Cc["@mozilla.org/browser/nav-history-service;1"]
@abi
abi / x
Created February 4, 2009 03:39
/* This is a template command */
CmdUtils.CreateCommand({
name: "hide-lazybar",
homepage: "http://foyrek.com/",
author: { name: "Abimanyu", email: "[email protected]"},
license: "GPL",
description: "Hides the LazyBar",
execute: function(input) {