Skip to content

Instantly share code, notes, and snippets.

CmdUtils.makeSearchCommand({
name: "python",
url: "http://docs.python.org/search.html?q={QUERY}",
icon: "http://docs.python.org/_static/py.png",
homepage: "http://twitter.com/ziru",
author: { name: "Ziru"},
license: "MPL",
description: "Searches docs.python.org for your words."
});
@ziru
ziru / Ubiquity.Multi.Status.Services.Updater
Created September 9, 2009 08:18
同时更新多个微博状态服务(Twitter/新浪微博/网易微博)
const TWEET_MAXLEN = 140;
const TWEET_SHORT_URL_MAX_LENGTH = 17;
const URL_SHORTENER_API = 'http://api.bit.ly/shorten?version=2.0.1&format=text&login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f52f629d2d71bf07&longUrl=';
var MultiStatusServicesUpdater = {
registeredServices: [
{ selector: '#TWITTER', method: 'updateTwitter' },
// { selector: '#KAIXIN', method: 'updateKaixin' },
{ selector: '#SINA', method: 'updateSina' },
// { selector: '#QQ', method: 'updateQQ' },
@ziru
ziru / x
Created March 22, 2009 06:45
CmdUtils.CreateCommand({
name: "my.tweet",
preview: "Insert your latest tweet as a signature.",
execute: function(){
var userId = 'YOUR TWITTER ID';
var twitterQueryUrl = 'http://twitter.com/statuses/user_timeline/' + userId + '.json?count=5';
jQuery.get(twitterQueryUrl, null, function(data) {
if (!data) return;
var latestStatus;
for (var i = 0; i < data.length; i++) {