Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name AutoPagerize 'show everything by me' on Tumblr
// @namespace http://d.hatena.ne.jp/tily/
// @include http://www.tumblr.com/show/everything/by/me
// @include http://www.tumblr.com/show/everything/by/me/*
// ==/UserScript==
var rewriteNextLink = function(doc) {
var a = Minibuffer.$X('id("pagination")/a[last()]', doc)[0]
a.href = a.href.replace(
/dashboard\/(\d+)\/\d+/,
@tily
tily / gist:133515
Created June 21, 2009 13:56
output minibuffer pin list as html file
// ==UserScript==
// @name OutputPinListCommand
// @namespace http://d.hatena.ne.jp/tily/
// @include *
// ==/UserScript==
// TODO: handle relative links
(function(){
if(!window.Minibuffer) return
function output_as_html(title, urls) {
@tily
tily / make_zozo_search_better.user.js
Created June 22, 2009 01:19
make zozo search better
// ==UserScript==
// @name make ZOZO search better
// @namespace http://d.hatena.ne.jp/tily/
// @include http://zozo.jp/_search/*
// ==/UserScript==
(function(){
// apply to document
modify_items(document)
// add style
// ==UserScript==
// @name test
// @namespace http://www.example.com
// @description test
// @include *
// ==/UserScript==
if(!Minibuffer) return
$X = Minibuffer.$X
@tily
tily / gist:133761
Created June 22, 2009 01:39
simple launcher on Windows (umcomplete)
#!ruby
require 'optparse'
def main
keyword = ''
OptionParser.new do |opt|
opt.on('-s', '--search KEYWORD', String) {|v| keyword = v}
opt.parse!
end
@tily
tily / simple_twitter.user.js
Created June 22, 2009 14:20 — forked from hitode909/simple_twitter.user.js
make twitter statuses nonsense
// ==UserScript==
// @name nonsensial twitter
// @namespace http://www.hatena.ne.jp/tily/
// @description make posts nonsense.
// @include http://twitter.com/*
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
(function(){
$('li.status:lt(40)').each(function(){
@tily
tily / make_ldrize_stumble.rb
Created June 22, 2009 15:44
generate HTML to make ldrize cursor stumble (not worked)
#!ruby
# make_ldrize_stumble.rb
require 'erb'
puts ERB.new(DATA.read, nil, '-').result(binding)
__END__
<html>
<head><title>Make LDRize Stumble</title></head>
<body>
<% 1.upto(1000) do |num| -%>
<div class="section hentry" style="position: absolute; left:<%= rand(1000) %>px; top:<%= rand(1000) %>px;">test</div>
@tily
tily / gist:248284
Created December 3, 2009 16:17
configuration file of twitter / domoraen
database:
adapter: sqlite3
database: domoraen.db
timeout: 5000
site_info:
- url: 'http://ja.wikipedia.org/wiki/%E3%83%89%E3%83%A9%E3%81%88%E3%82%82%E3%82%93%E3%81%AE%E9%81%93%E5%85%B7%E4%B8%80%E8%A6%A7'
exp: '//div[@id="bodyContent"]/ul[position()>1]/li'
mecab:
dicpath: '/var/lib/mecab/dic/ipadic-utf8/'
speak:
@tily
tily / browse
Created December 12, 2009 15:40
simple CUI browser with Nokogiri
#!/usr/bin/env ruby
# browse : browser web sites by xpath or css expression
require 'cgi'
require 'open-uri'
require 'rubygems'
require 'nokogiri'
config = YAML.load(DATA.read)
command = ARGV.shift
siteinfo = config['command'][command] || config['command'][config['shortcut'][command]]
@tily
tily / delete_hatena_diary_entries.rb
Created December 29, 2009 16:13
delete hatena diary entries interactively
require 'rubygems'
require 'highline'
require 'atomutil'
username = HighLine.new.ask('username: ')
password = HighLine.new.ask('password: ') {|q| q.echo = '*' }
auth = Atompub::Auth::Wsse.new :username => username, :password => password
client = Atompub::Client.new :auth => auth
uri_base = "http://d.hatena.ne.jp/#{username}/atom/blog?page="