Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kyanny's full-sized avatar

Kensuke Nagae kyanny

View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use DateTime;
use DateTime::Format::Japanese;
use Perl6::Say;
my $fmt = DateTime::Format::Japanese->new;
my $dt = DateTime->today(time_zone => 'local');
my $str = $fmt->format_ymd($dt);
#!/usr/bin/env gosh
(use srfi-19)
;(time-utc->date (make-time time-utc 0 0) 0)
(define (main args)
(let ((second 0)
(nanosecond 0)
(tz-offset 0))
(display (date->string (time-utc->date (make-time time-utc second nanosecond) tz-offset) "~1 ~3"))))
@kyanny
kyanny / content_extract.pl
Created May 19, 2009 15:15
content_extract.pl Example of HTML::ExtractContent
#!/usr/bin/perl
use strict;
use warnings;
use HTML::ExtractContent;
use Encode;
use Encode::Detect;
use Perl6::Say;
use Getopt::Long;
use Pod::Usage;
my $help;
@kyanny
kyanny / summarize_extract.pl
Created May 19, 2009 15:16
summarize_extract.pl Example of Lingua::JA::Summarize
#!/usr/bin/perl
use strict;
use warnings;
use Lingua::JA::Summarize::Extract;
use Perl6::Say;
use Getopt::Long;
use Pod::Usage;
my $help;
GetOptions(
'help' => ¥$help,
#!/usr/bin/env perl
use strict;
use warnings;
use Lingua::JA::Summarize;
use Perl6::Say;
use Encode;
my $in = do { local $/; <>; };
my $s = Lingua::JA::Summarize->new({
charset => 'utf8',
#!/usr/bin/env perl
use strict;
use warnings;
use Text::MeCab;
use Algorithm::MarkovChain;
use Perl6::Say;
use Data::Dumper;
open my $in, '<', shift or die $!;
my $text = do { local $/; <$in>; };
#!/usr/bin/env perl
use strict;
use warnings;
use HTML::Parser;
use Data::Dumper;
my $p = HTML::Parser->new(
api_version => 3,
start_h => [\&start, 'self, tagname, attr, text'],
end_h => [\&end, 'self, tagname, attr, text'],
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
my $pattern = shift @ARGV;
my $help;
GetOptions(
'help' => \$help,
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::UserAgent;
use XML::Simple;
use URI;
use Perl6::Say;
use Data::Dumper;
use YAML;
// ==UserScript==
// @name livedoor wiki new page name auto fill-in
// @namespace http://d.hatena.ne.jp/a666666/
// @include http://cms.wiki.livedoor.com/wiki/add?wiki_id=17071
// ==/UserScript==
(function(){
document.getElementById('name').value = new Date();
})();