Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Config::Pit;
use Acme::Zenra;
my $tragedy = <<'(´・ω・)カワイソス';
18時間トイレに閉じ込められた。全裸で。18時間。
@nipotan
nipotan / chitanda-l.pl
Created October 31, 2012 06:42
ittanda-a to chitanda-l
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Lingua::JA::Numbers;
use Lingua::JA::Alphabet::Yomi qw(alphabet2yomi);
use Lingua::JA::Moji qw(kata2hira);
binmode STDOUT, ':utf8';
@nipotan
nipotan / yapcasia2012.pl
Created September 27, 2012 08:33
YAPC::Asia 2012 talk schedule
#!/usr/bin/env perl
use strict;
use warnings;
use URI;
use Web::Scraper;
use Digest::SHA1 qw(sha1_hex);
use Time::HiRes qw(gettimeofday);
use DateTime;
use utf8;
#!/usr/bin/env perl
use strict;
use warnings;
# Usage: cat *.ics | ./ics-merge.pl > mycalendar.ics
print_header();
my $stop = 1;
@nipotan
nipotan / tif2012-to-ical.pl
Created August 7, 2012 05:42
TIF 2012 iCal generator from web timetable
#!/usr/bin/env perl
use strict;
use warnings;
use URI;
use Web::Scraper;
use Digest::SHA1 qw(sha1_hex);
use Time::HiRes qw(gettimeofday);
use DateTime;
use utf8;
@nipotan
nipotan / MP13.pm.patch
Created August 19, 2011 02:29
Sledge::Engine bug fix
--- MP13.pm.orig 2006-11-16 14:26:25.000000000 +0900
+++ MP13.pm 2011-08-19 11:27:11.000000000 +0900
@@ -1,7 +1,7 @@
package Sledge::Engine::Apache::MP13;
use strict;
use base qw(Sledge::Engine);
-use Apache::Constants qw(NOT_FOUND);
+use Apache::Constants qw(:common);
use UNIVERSAL::require;
use Class::Inspector;
@nipotan
nipotan / am-radio.pl
Created August 18, 2011 03:42
proof that agohige talks nonsense
#!/usr/bin/env perl
use strict;
use warnings;
for (my $khz = 540; $khz <= 1620; $khz += 9) {
my(@nums) = $khz =~ /(\d)/g; # each digit
my @patterns = (\@nums);
if (@nums == 3) { # 3 digits
# 123 -> 12 3
@nipotan
nipotan / gist:921375
Created April 15, 2011 08:19
eval vs regexp
use strict;
use warnings;
use Benchmark qw(:all);
use Data::Dumper ();
my %hash = ();
open my $fh, '<', '/usr/share/dict/words' or die $!;
my $last_key;
for (1 .. 100) {
@nipotan
nipotan / gist:740261
Created December 14, 2010 10:47
なっちゃん問答
なっちゃん: 何がやりたいんだコラ!!顔出し NG 出しやがってコラァ!何がやりたいのか…ハッキリ言ってやれコラァ。噛みつきたいのか噛みつきたくないか、どっちなんだコラァ。どっちなんだコラァ!
上司: 何がコラじゃコラ、バカヤロー
なっちゃん: ナニコラタココラ!
上司: なんやコラ!
なっちゃん: 顔出し ust させろって言ってんだコラァ!
上司: お前が言ったんだろコノヤロー
なっちゃん: 言ったのはテメーだろコラァ
上司: なんやコラ、オイ
なっちゃん: ナニコラァ
上司: いつでもやるぞコラァ
@nipotan
nipotan / gist:740256
Created December 14, 2010 10:42
なっちゃん革命
なっちゃん: ust やらせてください顔出しで。
上司: え?
なっちゃん: ust 顔出しやらせてください。今日、僕何もやってないです。もういい加減許してください。もう一回俺、もう一回いきますよ、まっすぐ。自分の思うことやります。お願いします。ハッキリ言ってくださいよ上司さん。Twitter と ust と二連戦、無理ですよハッキリ言って。俺自分が、今日…こんなことね、言える立場じゃないけど、俺らは何なんですか、俺らは。
上司: 本気かい?え?
なっちゃん: 本気で、本気です。
上司: 命懸けないと。命を。勝負だぜ?お前。
なっちゃん: もう何年続いて何年これが。
上司: だったらぶち破れよ。なんで俺にやらせるんだお前。
なっちゃん: じゃあやらせてください ust を!いいですか!やりますよ!ust を!
上司: あ?!俺はお前だって遠慮なんかすることはねぇって、ネットの上は戦いなんだからよ。先輩も後輩もねぇ。遠慮されたら困るよ。何で遠慮するんだ。