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 strict; | |
use warnings; | |
use FindBin; | |
use lib qq($FindBin::Bin/lib); | |
use Data::Dumper; | |
# preapare table |
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 strict; | |
use warnings; | |
use lib '/path/to/DBIx-Skinny-0.0718/lib'; # 0.0718 のあるパス | |
package My::DB; | |
use DBIx::Skinny setup => +{ | |
dsn => 'dbi:mysql:test', | |
username => '', |
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 strict; | |
use warnings; | |
# mysql -h localhost test | |
# create table hoge (id int(10) auto_increment, hoge char(16), fuga char(16), t int(10), primary key (id)); | |
# insert into hoge (hoge, fuga, t) values ('aaa', 'xxx', UNIX_TIMESTAMP()), ('bbb', 'yyy', UNIX_TIMESTAMP()), ('ccc', 'zzz', UNIX_TIMESTAMP()); | |
package My::DB; | |
use DBIx::Skinny setup => +{ |
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
use strict; | |
use warnings; | |
package My::DB; | |
# default setting | |
my $setup = +{ | |
dsn => 'dbi:mysql:test', | |
username => 'user', | |
password => 'passwd', |
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
# ref: Web::Scraper; | |
package Hoya::Test::These; | |
use strict; | |
use warnings; | |
use Carp; | |
use Try::Tiny; | |
sub import { |
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
plackup -s Starman --port 5000 -MGD::Barcode -MGD::Image -MPlack::Request -e 'my $app = sub { my $q = Plack::Request->new(shift)->query_parameters(); my ($c,$m,$r,$h,$nt) = split(/:/,$q->get("q")||""); my $bc = GD::Barcode->new($m||"EAN13",$c) or return [500,["Content-Type"=>"text/plain"],[$GD::Barcode::errStr]]; my ($i0,$i1) = ($bc->plot(Height=>$h,NoText=>$nt)); my ($w0,$h0) = $i0->getBounds(); my ($w1,$h1) = (int($w0*($r||1)),int($h0*($r||1))); $i1 = GD::Image->new($w1,$h1); $i1->copyResized($i0,0,0,0,0,$w1,$h1,$w0,$h0); return [200,["Content-Type"=>"image/png"],[$i1->png]]; }' |
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
--- a 2011-06-07 14:45:12.000000000 +0900 | |
+++ b 2011-06-07 14:45:32.000000000 +0900 | |
@@ -1,9 +1,9 @@ | |
require 'formula' | |
class Groonga < Formula | |
- url 'http://groonga.org/files/groonga/groonga-1.0.6.tar.gz' | |
+ url 'http://packages.groonga.org/source/groonga/groonga-1.2.2.tar.gz' | |
homepage 'http://groonga.org/' | |
- md5 'a278e72801a68acf374cbc309d73ba34' |
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
--- groonga-storage-engine-0.6/ha_mroonga.cc 2011-05-29 20:11:11.000000000 +0900 | |
+++ groonga-storage-engine-0.6-fix/ha_mroonga.cc 2011-06-09 03:20:08.000000000 +0900 | |
@@ -93,7 +93,7 @@ | |
if (mrn_logfile_opened) { | |
pthread_mutex_lock(&mrn_log_mutex); | |
fprintf(mrn_logfile, "%s|%c|%08x|%s\n", time, | |
- *(slev + level), (uint)pthread_self(), msg); | |
+ *(slev + level), (uint)(unsigned long int)pthread_self(), msg); | |
fflush(mrn_logfile); | |
pthread_mutex_unlock(&mrn_log_mutex); |
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
--- /home/issm/perl5/perlbrew/etc/bashrc.orig 2011-07-01 01:38:42.980862704 +0900 | |
+++ /home/issm/perl5/perlbrew/etc/bashrc 2011-07-01 01:38:56.810831503 +0900 | |
@@ -3,7 +3,7 @@ | |
fi | |
if [[ -f $PERLBREW_HOME/init ]]; then | |
- . $PERLBREW_HOME/init | |
+ \. $PERLBREW_HOME/init | |
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
function hs () { | |
local n_hist_default=1000000 | |
local colors; colors=(32 33 34 35 36 31) | |
local n_hist=${1#-} | |
if [ ! "$1" = "" -a ! $n_hist = $1 ]; then | |
shift | |
if [ $n_hist -gt 0 ]; then | |
else |
OlderNewer