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 5.12.0; | |
use warnings; | |
use utf8; | |
use AnyEvent; | |
use AnyEvent::IRC::Client; | |
use Encode; | |
my @server_info = ( | |
'irc.example.com', | |
6667, |
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 MetaCPAN::API; | |
use Pod::Usage; | |
use LWP::UserAgent; | |
my ($module) = @ARGV; | |
pod2usage() unless $module; |
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 5.12.0; | |
use warnings; | |
use utf8; | |
use File::Spec; | |
use File::Basename; | |
use PDF::API2::Koromo; | |
use Time::Piece; | |
use Encode; | |
my $basedir = File::Spec->catdir( dirname(__FILE__) ); |
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 Amon2::Plugin::Model; | |
use strict; | |
use warnings; | |
use Module::Find; | |
use Try::Tiny; | |
our $VERSION = '0.01'; | |
sub init { | |
my ($class, $context_class, $config) = @_; |
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
### Furl::HTTP::connect_ssl をオーバライドする | |
package Furl::HTTP; | |
use IO::Socket::SSL; | |
{ | |
no warnings 'redefine'; | |
no strict 'refs'; | |
*Furl::HTTP::connect_ssl = sub { | |
my ($self, $host, $port, $timeout_at) = @_; | |
_requires('IO/Socket/SSL.pm', 'SSL'); |
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
#!/bin/bash | |
source $HOME/perl5/perlbrew/etc/bashrc | |
cat <(httpstatus {query}) |
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 5.10.0; | |
use warnings; | |
use utf8; | |
use Plack::Request; | |
use Encode; | |
use GD::Barcode::QRcode; | |
use Try::Tiny; | |
my $app = sub { | |
my $env = shift; |
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 5.12.0; | |
use warnings; | |
use Getopt::Long; | |
use Data::Section::Simple qw/get_data_section/; | |
use Time::HiRes (); | |
my %opts = ( n => 10 ); | |
GetOptions( 'n=i' => \$opts{n} ); | |
sub foo { |
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
diff --git a/app.psgi b/app.psgi | |
index d2ba7ef..23b090d 100644 | |
--- a/app.psgi | |
+++ b/app.psgi | |
@@ -10,9 +10,14 @@ my $root_dir = File::Basename::dirname(__FILE__); | |
my $app = HRForecast::Web->psgi($root_dir); | |
builder { | |
enable 'ReverseProxy'; | |
- enable 'Static', | |
- path => qr!^/(?:(?:css|js|images)/|favicon\.ico$)!, |
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
#!/bin/bash | |
BASEDIR=$(cd $(dirname $0)/.. && pwd) | |
exec perl -I$BASEDIR/lib $BASEDIR/script/make_schema.pl $@ |