Skip to content

Instantly share code, notes, and snippets.

@whym
whym / en
Created February 5, 2009 15:36
h1. What is Tombloo?
Tombloo is a Firefox extension for posting photographs, memo, bookmarks and quotes into more than twenty web-services including Tumblr, twitter, FriendFeed and more. <br/>
!http://github.com/to/tombloo/tree/master%2Fdocuments%2Fsummary_600.png?raw=true!
You may get frightended by the large number of these services, but don't worry, you only need to remember one simple concept: <br/>
Single interface to all the actions you want to do with the stuffs on the web. <br/>
You can use exactly the same user interface to write a memo, capture a web page and send it to a photo sharing service. <br/>
@whym
whym / gisty.rb
Created May 8, 2009 02:17
post にエラートラップ追加
require 'pathname'
require 'net/http'
require 'open-uri'
require 'rubygems'
require 'nokogiri'
class Gisty
VERSION = '0.0.11'
GIST_URL = 'http://gist.github.com/'
GISTY_URL = 'http://github.com/swdyh/gisty/tree/master'
;; Navigational shortcut keys for twit.el
;; Type "n" to go to the next post.
;; Type "p" to go to the previous post.
;;
;; You might want to change the key assignment below,
;; because it overwrites the default settings of twit.el
(setq twit-key-list
'((" ". scroll-up)
([backspace]. scroll-down)
@whym
whym / all.rb
Created May 13, 2009 03:07
narray patch
require "narray"
T = (RUBY_VERSION<"1.8.0") ? Time : Process
RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
ruby_narray = system( "#{RUBY} dummy.rb" )
python_numeric = system( "python dummy.py numeric" )
python_numarray = system( "python dummy.py numarray" )
python_numpy = system( "python dummy.py numpy" )
octave = system( "octave -qf dummy.m" )
(defun my-change-log-extract (regexp)
"Extract the entries that matches to the regexp in change-log-mode"
(interactive "sregexp: ")
(goto-char (point-max))
(do ((expression "^[0-9]\\{4\\}-[0-1][0-9]-[0-3][0-9]")
(pos (point) (point))
(list nil (cons
(cons
(match-string 0)
(buffer-substring (match-beginning 0) pos)) list)))
;; Add below to ~/.wl and 'reply-date will be a candidate for wl-summary-sort
(defun wl-summary-overview-entity-compare-by-reply-date (a b)
"Compare entity X and Y by latest date of replies."
(flet ((string-max2
(x y)
(cond ((string< x y) y)
('t x)))
(elmo-entity-to-number
(x)
(elt (cdr x) 0))
@whym
whym / README.rst
Created August 20, 2009 14:14
Minibuffer command for tagging multiple posts on Tumblr. Type 'p' to mark/unmark a post, type 'g' to tag. インストールはこちらで http://userscripts.org/scripts/show/56547
@whym
whym / tombloo-amazon20090816.js
Created August 23, 2009 01:18
Tombloo script. Workaround for amazon api changes
addAround(Tombloo.Service.extractors.Amazon, 'extract', function(proceed, args){
var ctx = args[0];
var self = Tombloo.Service.extractors.Amazon;
var asin = self.getAsin(ctx);
return succeed().addCallback(function(){
var creators = $x('//title/text()');
creators = creators.substr(0, creators.lastIndexOf(':'));
creators = creators.substr(creators.lastIndexOf(':') + 1).trim();
return {
@whym
whym / tombloo-googledocs.js
Created August 31, 2009 09:59
Post to Google Docs. Right-click on a link -> Choose Share - Link - Target -> Choose GoogleDocs
models.register({
name : 'GoogleDocs',
ICON : 'http://docs.google.com/favicon.ico',
check : function(ps){
return ps.type == 'link' && !ps.file;
},
getAuthCookie : function(){
return getCookieString('www.google.com', 'secid').split('=').pop();
},
// Chat upload
// format sample
// http://utatane.tumblr.com/post/118386131/private-chat-format-test
(function(){
Tombloo.Service.extractors.register([
{ // Chat extractor
name : 'Chat',
ICON : models.Twitter.ICON,
TARGET_BACKGROUND : '#888',