Skip to content

Instantly share code, notes, and snippets.

Avatar
♨️
470

ytnobody / satoshi azuma ytnobody

♨️
470
View GitHub Profile
@ytnobody
ytnobody / azure_func.pl
Last active Feb 18, 2017
Azure Function向けのヘルパーライブラリもどきスニペット
View azure_func.pl
use strict;
use warnings;
use utf8;
use JSON::PP;
use Encode;
### タイムゾーン定義 / Azure Functionsでは必須。
BEGIN {
$ENV{TZ} = "JST-9";
};
@ytnobody
ytnobody / connpass_search_sum.pl
Last active Feb 14, 2017
【THE書き捨て】connpassから特定のキーワードで検索した結果を、月ごとのイベント数として出力するスクリプト
View connpass_search_sum.pl
use strict;
use warnings;
use JSON;
use LWP::UserAgent;
use URI;
use utf8;
my $keyword = 'Serverless';
my $baseurl = "https://connpass.com/api/v1/event/";
@ytnobody
ytnobody / cpanfile
Created Dec 22, 2016
Perl入学式 Advent Calendar 2016 第23日目 「Perlで替え歌エンジンをつくる」
View cpanfile
requires 'JSON';
requires 'LWP::UserAgent';
requires 'LWP::Protocol::https';
@ytnobody
ytnobody / plenv_install_5.20.3_on_windows_subsystem_on_linux.txt
Created Nov 3, 2016
plenv install 5.20.3 failed on windows subsystem on linux
View plenv_install_5.20.3_on_windows_subsystem_on_linux.txt
Installing 5.20.3 as 5.20.3
/usr/bin/perl -- /home/ytnobody/.plenv/plugins/perl-build/bin/perl-build --symlink-devel-executables --build-dir /home/ytnobody/.plenv/build/1478189183.32125/ --tarball-dir /home/ytnobody/.plenv/cache/ -Dusedevel 5.20.3 /home/ytnobody/.plenv/versions/5.20.3
Use the previously fetched perl-5.20.3.tar.gz
Configuring perl '5.20.3'
rm -f config.sh Policy.sh
Auto-guessed '5.20.3'
patching Configure
File Configure is read-only; trying to patch anyway
sh Configure -Dprefix=/home/ytnobody/.plenv/versions/5.20.3 -de -Dusedevel -A'eval:scriptdir=/home/ytnobody/.plenv/versions/5.20.3/bin'
View markdowntest.md

test

  • foo
  • bar
  1. hoge
  2. fuga
@ytnobody
ytnobody / env-export
Created Jan 23, 2014
export env args
View env-export
#!/usr/bin/env perl
use strict;
use warnings;
my $dir = $ARGV[0] || 'env';
mkdir $dir unless -d $dir;
my @data = `env`;
chdir $dir;
for my $entry (@data) {
@ytnobody
ytnobody / README.pod
Last active Dec 24, 2015
dtinstall - daemontools installer script
View README.pod

NAME

dtinstall - daemontools install script

VERSION

0.76.3

GET STARTED

View bench_router.pl
use strict;
use Benchmark qw(:all);
use Router::Simple;
use Dispatcher::Small;
use Data::Dumper;
my $rs = Router::Simple->new;
$rs->connect('/user/:id' => {action => 'user'});
my $ds = Dispatcher::Small->new(
View nephia_bench.pl
#!/usr/bin/env perl
use strict;
use warnings;
use lib qw(BitterMilk/lib SugarMilk/lib HornyMilk/lib);
use Benchmark qw(:all);
use BitterMilk;
use SugarMilk;
use HornyMilk::Web;
use Data::Dumper;
View nephia_migrate.sh
#!/bin/sh
PROJ_DIR=$1 ; shift
git clone git@github.com:ytnobody/$PROJ_DIR.git
cd $PROJ_DIR
git mv lib/Voson lib/Nephia
find ./* ./.gitignore -type f | xargs sed -i 's/Voson/Nephia/g; s/voson-setup/nephia-setup/g;'
git add . && minil build && minil test && git add . && git commit -m 'rename' && git push
cpanm .