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 replace_ritsboy | |
// @namespace jp.hakobe.gm | |
// @include http://twitter.com/.* | |
// ==/UserScript== | |
var nodes = document.getElementsByClassName('status-body'); | |
for (var i in nodes) { | |
var node = nodes[i].childNodes[1].childNodes[1].firstChild; |
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
// bbeta のお気に入りから自分がブックマークしてるエントリを消す | |
var list = Ten.Selector.getElementsBySelector('ul#bookmarked_user li'); | |
for (var i = 0; i < list.length; i++) { | |
var elem = list[i]; | |
var mine = Ten.Selector.getElementsBySelector('ul.comment li.mine', elem); | |
if (mine) { elem.style.display = 'none' } | |
} |
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
pbpaste | perl -p -e 's/&/&/g; s/</</g; s/>/>/g; s/\"/"/g' |
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 perl | |
use strict; | |
use warnings; | |
use File::Modified; | |
use Perl6::Say; | |
my ($command, @files) = @ARGV; | |
my $watcher = File::Modified->new( | |
method => 'mtime', |
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 hamnize | |
// @namespace jp.hakobe.gm | |
// @include http://bacolicio.us/* | |
// ==/UserScript== | |
var overlay = document.getElementById('overlay'); | |
overlay.style.top = '8%'; | |
overlay.style.left = '10%'; | |
overlay.firstChild.src = 'http://img.f.hatena.ne.jp/images/fotolife/h/hakobe932/20081222/20081222165715_original.png' |
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
configatron.set_default('plugins.group.groups', {}) | |
module Termtter::Client | |
if public_storage[:log] | |
add_help 'group,g GROUPNAME', 'Filter by group members' | |
add_command /^(?:group|g)\s+(\w+)/ do |m, t| | |
group_name = m[1].to_sym | |
group = configatron.plugins.group.groups[group_name] | |
statuses = group ? public_storage[:log].select { |s| |
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
require 'open-uri' | |
require 'pathname' | |
require 'tmpdir' | |
configatron.plugins.quicklook.set_default(:quicklook_tmpdir, "#{Dir.tmpdir}/termtter-quicklook-tmpdir") | |
tmpdir = Pathname.new(configatron.plugins.quicklook.quicklook_tmpdir) | |
tmpdir.mkdir unless tmpdir.exist? | |
def quicklook(url) | |
tmpdir = Pathname.new(configatron.plugins.quicklook.quicklook_tmpdir) |
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
use strict; | |
use warnings; | |
use Parse::RecDescent; | |
use Perl6::Say; | |
use YAML (); | |
use Test::More qw(no_plan); | |
sub p { | |
say YAML::Dump @_; | |
} |
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
# vim:set fileencoding=utf-8 | |
# | |
# this script is for Ruby 1.9.1 | |
# | |
class Count | |
def initialize(start = 0) | |
n = start | |
@f = Fiber.new do | |
loop do |
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
def count(start = 0): | |
n = start | |
while 1: | |
yield n | |
n += 1 | |
def fib(): | |
n = 0 | |
m = 1 | |
yield n |