![ytnobody][http://ytnobody.net/impress/hachiojipm-26/img/ytnobody_char.png]
hachioji.pm #26 - ytnobody
#!/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 . |
use strict; | |
use warnings; | |
use Test::More; | |
use Plack::Builder; | |
use Plack::Test; | |
use HTTP::Request::Common; | |
my $app = sub { [200,[],['Hello, World']] }; | |
my $wrapped = builder { |
azuma@ubuntu:~/myproj$ git log | |
commit 52b0450b049f45b88b4aa4b0694ca646f16f2f12 | |
Author: ytnobody <ytnobody@gmail.com> | |
Date: Wed Aug 28 15:12:55 2013 +0900 | |
Z | |
commit 3807c7bb1b25166078f9ca269788eafd7990aabb | |
Author: ytnobody <ytnobody@gmail.com> | |
Date: Wed Aug 28 15:12:38 2013 +0900 |
#!/bin/sh | |
PROJ_DIR=$1 ; shift | |
cd $PROJ_DIR | |
git mv lib/Nephia lib/PrimalNephia | |
find ./* ./.gitignore -type f | xargs sed -i 's/Nephia/PrimalNephia/g; s/nephia-setup/primalnephia-setup/g;' | |
git add . && minil build && minil test && git add . && git commit -m 'rename' && git push |
use strict; | |
use warnings; | |
use Benchmark qw(:all); | |
use Test::Deep::NoTest; | |
use Data::Compare; | |
{ | |
package Data::Compare::Deparse; | |
use B::Deparse; | |
my $deparser = B::Deparse->new(); |
tutum_container_uuid () { | |
service_name=$1 | |
tutum service inspect $(tutum service ps | awk '$1=="'$service_name'"{print($2);}') | | |
awk ' | |
/"containers": \[/, /\]/ { | |
if ($0 ~ /\/api\/v1\/container\//) { | |
split($1, flagment, "/"); | |
print(substr(flagment[5],1,8)); | |
} | |
} |
![ytnobody][http://ytnobody.net/impress/hachiojipm-26/img/ytnobody_char.png]
hachioji.pm #26 - ytnobody
#!/bin/sh | |
# | |
# rbenvsetup http://is.gd/rbenvsetup | |
# Tue May 28 11:03:00 JST 2013 v0.01 by ytnobody | |
# | |
RBENV_REPO=git://github.com/sstephenson/rbenv.git | |
RBENV_ROOT=$HOME/.rbenv | |
PROF_FILE=$HOME/.bash_profile |
#!/usr/bin/env lua | |
i = 20 | |
f = loadstring("if (i == 20) then return true else return nil end") | |
if ( f() ) then | |
print "ok" | |
else | |
print "ng" | |
end |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use AnyEvent; | |
use AnyEvent::Twitter::Stream; | |
use AnyEvent::IRC::Client; | |
use Encode; | |
use Net::Twitter::Lite; | |
use Text::MeCab; |