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 PDF::API2; | |
use Data::Dumper; | |
my $home= '/Users/user'; | |
my $pdf = PDF::API2->open("$home/Desktop/rireki.pdf"); |
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 Sledge::Session::Memcached; | |
BEGIN { | |
no warnings; | |
*Sledge::Session::Memcached::_delete_me = sub { | |
my $self = shift; | |
my $ok = $self->{_dbh}->delete($self->{_sid}); | |
unless ($ok) { | |
warn 'delete command fails'; | |
} | |
$ok; |
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 PPI; | |
use File::PackageIndexer; | |
use IO::All; | |
use Graph::Easy; | |
use Encode; | |
my $dir = shift; |
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 Test::Base::SubTest; | |
run_is input => 'expected'; | |
done_testing; | |
__DATA__ | |
### subtest11 |
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 Getopt::Long qw/ :config no_ignore_case /; | |
use Cwd qw/getcwd/; | |
use IPC::Run qw/ timeout /; | |
my %OPT; | |
my $GIT = ( eval { require File::Which; } ) ? File::Which::which('git') : 'git'; | |
my $CWD = getcwd(); |
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 5.014; | |
use XML::Simple; | |
use utf8; | |
use Data::Dumper; | |
binmode STDIN, ":encoding(utf8)"; | |
binmode STDOUT, ":encoding(utf8)"; | |
#$ mysqldump -uroot --no-data --xml db_name > db.xml | |
#$ mysqldump_xml_to_html.pl db.xml > db.html |
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
<?php | |
function make_random_picker ($item_list,$weight_list) { | |
$total_weight = array_sum($weight_list); | |
$weighted_array = array_combine($item_list,$weight_list); | |
arsort($weighted_array); | |
return function () use (&$total_weight, &$weighted_array) { | |
$p = 0; | |
$r = mt_rand(1,$total_weight); |
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 5.010; | |
use strict; | |
use warnings; | |
use Net::Twitter; | |
use URI::Find; | |
use Web::Scraper; | |
use LWP::UserAgent; | |
use YAML; |
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 utf8; | |
use File::Basename; | |
for my $argv (@ARGV){ | |
my $file_name = basename($argv,'.txt'); | |
open my $fh_in, "<:encoding(shiftjis)", $argv or die "$argv : $!"; |
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"; | |
var FuncFlatten = function () { | |
var codeList = [].slice.apply(arguments); | |
return { | |
add: function () { | |
[].push.apply( codeList, [].slice.apply(arguments) ); | |
}, | |
run: function () { | |
var runner = new FuncFlattenRunner(); |
OlderNewer