Skip to content

Instantly share code, notes, and snippets.

View nqounet's full-sized avatar

Nobutaka WAKABAYASHI nqounet

View GitHub Profile
FROM perl:5.26.1
RUN useradd -m -s /bin/bash appuser \
&& cpanm Carmel --notest
USER appuser
RUN mkdir -p /home/appuser/webapp
WORKDIR /home/appuser/webapp
COPY --chown=appuser:appuser webapp/cpanfile .
@nqounet
nqounet / roulette.pl
Created February 16, 2019 19:24
Perl入学式 2018 in東京 秋開講 第1回 ピザ会でのお題
#!/usr/bin/env perl
use utf8;
use strict;
use warnings;
use feature 'say';
use open qw/:encoding(utf8) :std/;
use Data::Printer {deparse => 1, caller_info => 1};
# Perl入学式 2018 in東京 秋開講 第1回 ピザ会でのお題
#
@nqounet
nqounet / web-query.pl
Created January 28, 2017 02:32
#Perl鍋 #14(2017-01-26)
#!/usr/bin/env perl
use utf8;
use v5.16;
use strict;
use warnings;
use feature 'say';
use Data::Printer {deparse => 1, caller_info => 1};
use Web::Query;
use Text::Shirasu;
@nqounet
nqounet / IncomingWebHooks.pm
Created June 11, 2015 12:42
Slack::IncomingWebHooks
package Slack::IncomingWebHooks;
use utf8;
use Moo;
use HTTP::Tiny;
use JSON::MaybeXS qw(JSON);
has url => (is => 'ro');
has channel => (is => 'ro');
has username => (is => 'ro');
package Mojolicious::Plugin::JSON_XS;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::JSON::XS;
sub register {
no warnings 'redefine';
*Mojo::JSON::new = sub {
shift;
Mojo::Base::new('Mojo::JSON::XS', @_);
};
@nqounet
nqounet / chomp.pl
Created April 26, 2012 05:28
chompの効果は途中の改行にもありますか?
#!/usr/bin/env perl
use utf8;
use strict;
use warnings;
use feature qw(say);
binmode STDIN, ":encoding(UTF-8)"; # 標準入力
binmode STDOUT, ":utf8"; # 標準出力
binmode STDERR, ":utf8"; # 標準エラー出力
@nqounet
nqounet / mojo-markdown2impress.pl
Created April 14, 2012 06:24
markdown2impress goes Mojolicious::Lite
#!/usr/bin/env perl
use utf8;
use Mojolicious::Lite;
use Mojo::ByteStream qw(b);
use Path::Class qw(file);
use Text::Markdown qw( markdown );
use List::Util qw(min max);
app->secret(b(__FILE__)->sha1_sum);
@nqounet
nqounet / perl-entrance03-01.pl
Created March 19, 2012 10:35
perlop sample code
#!/usr/bin/env perl
use utf8;
use strict;
use warnings;
binmode STDIN, ":utf8";
binmode STDOUT, ":utf8";
print "値1を入力してください>>>";
chomp( my $x = <STDIN> );