This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Google Search - Add direct links | |
// @namespace http://github.com/whym | |
// @include http://www.google.tld/search?* | |
// @version 0.01 | |
// @description Add direct links in Google search result | |
// ==/UserScript== | |
// based on http://userscripts.org/scripts/show/57679 by blooo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
# -*- encoding: utf-8 -*- | |
# DNS log converter from Microsoft DNS to namebench | |
# INPUT: | |
# 20091029 11:49:01 848 PACKET 02728D00 UDP Rcv 133.11.34.152 053d Q [0001 D NOERROR] A (6)images(8)slashdot(2)jp(0) | |
# OUTPUT: | |
# domain://images.slashdot.jp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -rtime -e'd=(Time.parse(ARGV.join(%q{ }))-Time.now).to_i; sign=d/d.abs<0?%q{-}:%q{}; d=d.abs; s,m,h=[60,60].map{|x| r=d%x; d=(d-r)/x; r}+[d]; puts sprintf %q!%s%d:%02d:%02d!, sign,h,m,s' # "2010-01-15T23:59 EST" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var now = new Date(); | |
var last_nyd = new Date(now.getFullYear(), 0, 1); | |
var next_nyd = new Date(now.getFullYear() + 1, 0, 1); | |
var rate = (now - last_nyd) / (next_nyd - last_nyd); | |
var beginning_of_today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); | |
var one_day = 1000 * 60 * 60 * 24; | |
var pdate = new Date(beginning_of_today.getTime() + rate * one_day); | |
var hours = pdate.getHours(); | |
var ampm = hours > 12 ? "PM" : "AM"; | |
hours = hours > 12 ? hours - 12 : hours; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name love on tumblr | |
// @namespace http://www.tumblr.com/ | |
// @description love current post on tumblr dsbd with 'Shift + l'key. if won't work, pray on tumblr! | |
// @include http://www.tumblr.com/dashboard* | |
// @include http://www.tumblr.com/show/* | |
// @include http://www.tumblr.com/tagged/* | |
// @version 0.0.2 | |
// ==/UserScript== | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'open-uri' | |
require 'optparse' | |
OPT = Struct. | |
new(:auto, :wait). | |
new(false, 0.3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain(java.sun.com) { | |
body { | |
font-family: "Arial", sans-serif; | |
} | |
p, dd, table { | |
max-width: 55em; | |
} | |
p { |