Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Motsu Tabetai
// @namespace http://ikenie.com/
// @include *
// @require http://gist.github.com/raw/3242/1a7950e033a207efcfc233ae8d9939b676bdbf46
// @require http://gist.github.com/raw/34615/04333b7e307eb029462680e4f4cf961f72f4324c
// ==/UserScript==
(function() {
var DATABASE_URL = 'http://wedata.net/databases/Motsu/items.json';
@fuba
fuba / motsu_tabetai.user.js
Created December 14, 2008 19:01 — forked from youpy/motsu_tabetai.user.js
1) ignore words, 2) stringでもtitleつけた
// ==UserScript==
// @name Motsu Tabetai
// @namespace http://ikenie.com/
// @include *
// @require http://gist.github.com/raw/3242/1a7950e033a207efcfc233ae8d9939b676bdbf46
// @require http://gist.github.com/raw/34615/04333b7e307eb029462680e4f4cf961f72f4324c
// ==/UserScript==
(function() {
var DATABASE_URL = 'http://wedata.net/databases/Motsu/items.json';
@fuba
fuba / config.yaml
Created December 25, 2008 03:44
いま自分ではつかってないのでメンテナやる人がいたらてきとうにforkしてください、ダイアリーとかからも誘導しときます
- module: Filter::EntryFullText::LDRFullFeed
config:
force_upgrade: 1
alternative_siteinfo: http://utatane.appjet.net/databases/LDRFullFeed/items.json
force_alternative_siteinfo: 1
@fuba
fuba / exthtml.pl
Created December 26, 2008 09:14
exthtml.pl extracts contents specified by an xpath from web pages. Cookbook in Japanese: http://fuba.jottit.com/exthtml
#!/usr/bin/perl
use strict;
use warnings;
use Encode;
use Getopt::Long;
use URI;
use LWP::UserAgent;
use HTTP::Cookies::Guess;
@fuba
fuba / gist:49376
Created January 20, 2009 07:09
please fix
plugins:
- module: Subscription::Config
config:
feed:
- url: http://twitter.com/fuba
meta:
follow_xpath: //span[contains(@class, 'entry-content')]/a
- module: CustomFeed::Simple
sub capture_thumbnails {
my %opt = @_;
my $file = $opt{file} or die;
my $offset = $opt{offset} || 0;
my @stats = stat($file);
my $deflength = 60 * ($stats[7]/120000000);
my $un_reset = $opt{un_reset};
@fuba
fuba / Twitter.pm
Created January 27, 2009 10:53
I want to use the POST method on all methods on Net::Twitter
541 my $reqtype = ( ( $method_def->{post} ) || ( (defined $args) && $args->{post} ) ) ? "POST" : "GET";
sub text_boxing {
my %opt = @_;
my $m = $opt{message};
my $ngwords = $opt{ngwords};
return if (grep {my $ngword = $_; $m =~ /$ngword/} @$ngwords);
$m =~ s/(\@[^\s]+\s+)+//;
my @arms = qw/= ≡ - - - - -=≡ ≡=- 〜/;
push @arms, '';
sub is_my_reply {
my $text = shift;
for my $nickname (@nicknames) {
if ($text =~ s/\@$nickname//) {
return $text;
}
}
return;
@fuba
fuba / gist:64483
Created February 14, 2009 21:35
cgi script to generate directory index for perlrtmp
#!/usr/bin/perl
use utf8;
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8 uri_unescape);
use File::Slurp;
use Encode;
use constant DIR => '/Volumes/sanjou530/friio/'; # edit here