This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"io" | |
"log" | |
"net/http" | |
) | |
var broadcastMessages = make(chan []byte) |
This file contains hidden or 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 utf8; | |
use constant { | |
GITHUB_ENDPOINT => 'https://github.com/%s.keys', | |
VULTR_ENDPOINT => 'https://api.vultr.com/v1/server/list' | |
}; |
This file contains hidden or 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 Test::MockTime ':all'; | |
use Time::Piece::Plus; | |
use Test::More; | |
use YAPC; | |
subtest 'is_yet()' => sub { |
This file contains hidden or 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; | |
sub hoge { | |
return ('aaa'); | |
} | |
sub foo { | |
my @a = ('aaa'); | |
return @a; |
This file contains hidden or 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 utf8; | |
use Data::Section::Simple qw/get_data_section/; | |
use Text::Xslate; | |
use DDP; | |
my $vpass = get_data_section(); |
This file contains hidden or 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
[- o -] $ perl -MText::MeCab -MDDP -E 'my $mecab = Text::MeCab->new; my $text = "もず氏がまた撮られたがってる"; for (my $node = $mecab->parse($text); $node; $node = $node->next) { say "text: ".$node->surface; say "id: ".$node->id; say "feature :".$node->feature}' | |
text: も | |
id: 1 | |
feature :助詞,係助詞,*,*,*,*,も,モ,モ | |
text: ず | |
id: 4feature :助動詞,*,*,*,特殊・ヌ,連用ニ接続,ぬ,ズ,ズ | |
text: 氏 | |
id: 6 | |
feature :名詞,一般,*,*,*,*,氏,シ,シ | |
text: が |
This file contains hidden or 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
Script started on 2013年06月02日 02時26分17秒 | |
[- o -] $ perl -V | |
Summary of my perl5 (revision 5 version 16 subversion 3) configuration: | |
Platform: | |
osname=linux, osvers=3.6.11+, archname=armv6l-linux | |
uname='linux raspberrypi 3.6.11+ #371 preempt thu feb 7 16:31:35 gmt 2013 armv6l gnulinux ' | |
config_args='-Dprefix=/home/pi/.plenv/versions/5.16.3 -de -A'eval:scriptdir=/home/pi/.plenv/versions/5.16.3/bin'' | |
hint=recommended, useposix=true, d_sigaction=define | |
useithreads=undef, usemultiplicity=undef |
This file contains hidden or 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 utf8; | |
use Benchmark qw/cmpthese/; | |
use Test::mysqld; | |
use DBI; | |
use Sys::Ramdisk; | |
use feature qw/say/; |
This file contains hidden or 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 utf8; | |
use Benchmark qw/cmpthese/; | |
use Test::mysqld; | |
use DBI; | |
use Sys::Ramdisk; | |
use feature qw/say/; |
This file contains hidden or 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 5.016; | |
use warnings; | |
use Benchmark qw/:all/; | |
use File::Temp qw/tempfile/; | |
use Storable qw/nstore retrieve/; | |
use DateTime::Tiny; | |
my $code = sub { |