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 common::sense; | |
use Furl; | |
use Web::Query; | |
use HTML::TagParser; | |
use Data::Dump qw/dump/; | |
use Term::ANSIColor qw(:constants); | |
die "Usage: perl yapc2013.pl [keyword]" unless $ARGV[0]; |
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
" ___ ___ ___ ___ | |
" |\__\ /\ \ /\ \ /\ \ | |
" | | | / \ \ / \ \ / \ \ | |
" | | | / /\ \ \ / /\ \ \ / /\ \ \ | |
" | |__|__ / \~\ \ \ / \~\ \ \ / / \ \ \ | |
" / \__\ / /\ \ \ \__\ / /\ \ \ \__\ / /__/ \ \__\ | |
" / /~~/~ \/__\ \/ / / \/__\ \/ / / \ \ \ \/__/ | |
" / / / \ / / \ / / \ \ \ | |
" \/__/ / / / \/__/ \ \ \ | |
" / / / \ \__\ |
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 utf8; | |
use Encode; | |
use feature 'say'; | |
use Web::Query; | |
use Time::Piece; | |
# 以下のページをパースしてメニューだけ表示する |
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
$ wget --no-check-certificate https://github.com/fluent/fluentd/archive/master.tar.gz | |
$ tar xpvf master | |
$ rm master | |
$ ls | |
fluentd-master |
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 utf8; | |
use Benchmark 'cmpthese'; | |
use Data::Riak; | |
use Data::Riak::Fast; | |
use Net::Riak; |
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
# source: http://d.hatena.ne.jp/umezo/20100508/1273332857 | |
local COMMAND="" | |
local COMMAND_TIME="" | |
precmd() { | |
if [ "$COMMAND_TIME" -ne "0" ] ; then | |
local d=`date +%s` | |
d=`expr $d - $COMMAND_TIME` | |
if [ "$d" -ge "30" ] ; then | |
COMMAND="$COMMAND " |
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
curl https://gist.github.com/valvallow/5202862/raw/c21cb0fd0149fbdb9d1c7e0f606fb1408e827060/batz.dat | perl -pe 's{ }{ }g;s{(\d)}{\e[4\1m \e[0m}g;' | |
curl https://gist.github.com/valvallow/5202862/raw/8943ab5199f78b8b62ef490bcdb2f6ed52cf91f1/galuf.dat | perl -pe 's{ }{ }g;s{(\d)}{\e[4\1m \e[0m}g;' | |
curl https://gist.github.com/valvallow/5202862/raw/8a3ec94561fec0bd075549d9a7f6bedec1d27fa6/kuromadousi.dat | perl -pe 's{ }{ }g;s{(\d)}{\e[4\1m \e[0m}g;' | |
curl https://gist.github.com/valvallow/5202862/raw/a16101f89d9f3c24bb6442a6dfa5e4135c5a3c0b/siromadousi.dat | perl -pe 's{ }{ }g;s{(\d)}{\e[4\1m \e[0m}g;' | |
curl https://gist.github.com/ywatase/5319618/raw/f3aadad2efff5274a1b6e36cdac5090973d9c5e5/akamadousi.dat | perl -pe 's{ }{ }g;s{(\d)}{\e[4\1m \e[0m}g;' | |
curl https://gist.github.com/ywatase/5319618/raw/13c94fc67f7656b2cd63d6c2a59bf593e0b3de5b/knight.dat | perl -pe 's{ }{ }g;s{(\d)}{\e[4\1m \e[0m}g;' |
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
_plenv() { | |
# cmdsという変数を定義 | |
local -a cmds | |
# カーソルが現在何番目のコマンドを入力しようとしてるのかがCURRENTに入ってる | |
# すでにplenvと打っているはずなので補完は2コマンド目から | |
# 3番目以降のコマンドを入力しようとしているときにはelseへ行く | |
if (( CURRENT == 2 ));then | |
compadd init rehash exec which version help global local install list versions list_modules install_cpanm available migrate_modules |
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 Text::Xslate; | |
use Devel::KYTProf; | |
use Data::Section::Simple; | |
Devel::KYTProf->add_prof( | |
"Text::Xslate", | |
"render", |