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 | |
=head1 Examples | |
$ tail -f access_log | perl colorize.pl | |
$ plackup app.psgi 2>&1 | perl colorize.pl | |
=cut | |
use strict; |
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
#!/bin/sh | |
TERMINAL_ID="RubyMotionBuilder" | |
PROJECT_DIR="$1" | |
OPTIONS="$2" | |
if [ "${PROJECT_DIR}" = "" ]; then | |
exit 1 | |
fi |
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
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 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 | |
# package ClassBless; | |
# # 原始的なPerlの書き方 | |
# use strict; | |
# use warnings; | |
# use utf8; | |
# use Data::Dump qw/dump/; | |
# sub new { | |
# my $class = shift; | |
# my %args = @_; |
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
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use WebService::Simple::ATND; | |
my @keywords = qw/東京 perl/; | |
my @ym = qw/201302 201303 201304/; | |
my $query = WebService::Simple::ATND->query_events(count => 30); |
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", |
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", |
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
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
# 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 " |