This file contains 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
# This is a shell archive. Save it in a file, remove anything before | |
# this line, and then unpack it by entering "sh file". Note, it may | |
# create directories; files and directories will be owned by you and | |
# have default permissions. | |
# | |
# This archive contains: | |
# | |
# make_test.log | |
# Makefile | |
# files/patch-Makefile.PL |
This file contains 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/local/bin/perl | |
use Modern::Perl; | |
use Data::Section::Simple qw(get_data_section); | |
use File::Temp; | |
my $langs = get_data_section; | |
for my $lang (sort keys %$langs) { | |
my $code = $langs->{$lang}; |
This file contains 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/local/bin/perl | |
use Modern::Perl; | |
use HTML::TreeBuilder::LibXML; | |
use JSON; | |
use LWP::UserAgent; | |
use URI; | |
use URI::QueryParam; | |
use YAML::Syck; |
This file contains 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 rlib; | |
use MyApp::Container qw(container); | |
use Modern::Perl; | |
use Sereal qw(encode_sereal); | |
my $id = 1234; | |
my $rs1 = container('schema')->resultset('Item')->search( |
This file contains 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
https://fengmk2.github.io/blog/2011/fibonacci/nodejs-python-php-ruby-lua.html | |
% which python2.7 | |
/opt/local/bin/python2.7 | |
% python2.7 -V | |
Python 2.7.11 | |
% time python2.7 fib.py | |
102334155 | |
python2.7 fib.py 61.28s user 0.34s system 98% cpu 1:02.31 total |
This file contains 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 Modern::Perl; | |
use Data::Dumper; | |
use Data::Section::Simple qw(get_data_section); | |
use File::Temp; | |
use Text::Outdent qw(outdent); | |
my $sections = get_data_section; |
This file contains 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 Modern::Perl; | |
use Benchmark qw(:all) ; | |
use Data::Dumper; | |
use DateTimeX::Web; | |
use DateTime::Span; | |
use Date::Manip::Date; | |
use Date::Manip::Recur; | |
use Date::Calc qw(:all); |
This file contains 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
@@ try_datetime.pl | |
#!/usr/bin/env perl | |
use Modern::Perl; | |
use DateTimeX::Web; | |
# http://www.houseabsolute.com/presentations/a-date-with-perl/#33 | |
{ | |
my $dt = DateTimeX::Web->new->strptime('%Y-%m-%d', '2009-02-01'); # 2009-02-01 |
This file contains 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
探したけどうまいものが見付からないので、メモ。。。 | |
@@ ~/.zprofile | |
if [ -z "$TMUX" -a -n "$SSH_AUTH_SOCK" ]; then | |
file=`echo $SSH_TTY | sed -e 's/\//_/g'` | |
abs="$HOME/.ssh/$file" | |
echo "export SSH_AUTH_SOCK=\"$SSH_AUTH_SOCK\"; export SSH_CONNECTION=\"$SSH_CONNECTION\"" > $abs | |
#echo "wrote $abs" | |
fi |
This file contains 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
gmirrorで片肺なったのに新調したHDDを足してsyncしても次のエラーで落ちる。 | |
May 4 22:46:35 lian kernel: GEOM_MIRROR: Request failed (error=5). ada2p3[READ(offset=1869273890816, length=131072)] | |
% bc -le "1869273890816 / 512" | |
3650925568.00000000000000000000 | |
% bc -le "131072 / 512" | |
256.00000000000000000000 | |
% dd if=/dev/ada2p3 of=/dev/null iseek=3650925568 count=256 | |
(コンソールにエラー CAM status: ATA Status Error ) |
NewerOlder