Skip to content

Instantly share code, notes, and snippets.

View ytnobody's full-sized avatar
♨️
470

ytnobody / satoshi azuma ytnobody

♨️
470
View GitHub Profile
@ytnobody
ytnobody / hoge.dat
Created January 30, 2011 05:19
hogefuga
time-2710.000000検知率=100
time-3310.000000検知率=100
time-3910.000000検知率=100
time-4510.000000検知率=100
@ytnobody
ytnobody / hoge.pl
Created January 30, 2011 05:38
hogehoge
use warnings;
use strict;
my $file = 'file.dat';
my $data = {};
open my $fh, '<', $file or die "Couldn't open file";
while ( my $line = <$fh> ) {
$line =~ s/(\r\n|\n)$//;
my ( $key, $val ) = $line =~ /^(.+)=(.+)$/;
@ytnobody
ytnobody / README.pod
Last active December 24, 2015 10:43
dtinstall - daemontools installer script

NAME

dtinstall - daemontools install script

VERSION

0.76.3

GET STARTED

@ytnobody
ytnobody / README.pod
Created February 17, 2011 10:32
Kariu - jquery based window system

NAME

Kariu - javascript window system

SYNOPSIS

win = new Kariu.create( { width: 250, height: 150 } );
win.html = '<p>my name is ytnobody.</p>';
win.show( 300, 100 );
Kariu.destroy( win.id );
@ytnobody
ytnobody / README.pod
Created February 18, 2011 06:50
jcue - javascript job-queueing engine

NAME

jcue - javascript job-queueing engine

SYNOPSIS

// create a new jcue object with 
jcue.clock = 100;

// put job-queue to jcue
@ytnobody
ytnobody / README.pod
Created February 18, 2011 09:29
jiku - javascript timer management object

NAME

jiku - javascript timer management object

SYNOPSIS

// slates setTimeout
var x = new jiku.timer( 'Timeout', 5000, [ 'mytag', 'test', 'link' ], function(){ ... } );

// slates setInterval
@ytnobody
ytnobody / langtags.pl
Created March 31, 2011 01:51
Example for using "I18N::LangTags"
#!/usr/bin/env perl
$| = 1;
use warnings;
use strict;
use Data::Dumper;
use I18N::LangTags qw/ :ALL /;
use I18N::LangTags::List;
use strict;
my @a = (1,2,3,4,5,6,7,8,9);
my @b = (5,2,9,3);
my @x = grep {
my $_1 = $_;
my $r = grep {$_ eq $_1} @b;
$r == 0;
} @a;
@ytnobody
ytnobody / lwp_basicauth_getparam.pl
Created May 16, 2012 05:58
LWP::UserAgentを使ってBasic認証+GETパラメータつきのリクエストを発行するサンプル
#
# LWP::UserAgentを使ってBasic認証+GETパラメータつきのリクエストを発行するサンプル
#
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use URI;
# URIオブジェクト作成
@ytnobody
ytnobody / foo.pl
Created June 15, 2012 08:03
ハッシュに配列を入れておいてその配列からJOIN
use strict;
my %hash = (
hoge => [ 1, 2, 3, 4 ],
fuga => [ 3, 4, 6, 8, 2 ],
piyo => [ 4, 6, 9, 2 ],
);
print join ', ', map { join ': ', @{$hash{$_}} } keys %hash;