This file contains hidden or 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
javascript: | |
(function(u,lr) { | |
lr = confirm('Left?') 'left' : 'right'; | |
u = location.href.replace(new RegExp('http://twitter.com/([^/]+)/.*'), '$1'); | |
alert( | |
'<div class="twitter_timeline">' | |
+ '<a href="' + location.href + '" target="_blank">' | |
+ '<img src="http://api.dan.co.jp/twicon/' + u + '/normal" class="' + lr + '" />' | |
+ '</a>' | |
+ '<p class="' + lr + '">' + u + ': ' + document.getElementsByClassName('entry-content')[0].innerHTML + '</p>' |
This file contains hidden or 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
# die | |
use Test::More; | |
close STDERR; | |
subtest 'foo' => sub { | |
ok 1; | |
done_testing; | |
}; | |
done_testing; |
This file contains hidden or 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 Plack::Builder; | |
use Plack::Response; | |
use Plack::Request; | |
use HTTP::Cookies; | |
use LWP::UserAgent; | |
use DBI; | |
my $conf = do 'conf.pl'; |
This file contains hidden or 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
t/010_internals/018_deps_file2.t ........... Xslate: failed to stat C:\Documents and Settings\xai\.cpanm\work\1273814710.2236\Text-Xslate-0.1014 emplate\myapp\base.tx (ignored): No such file or directory at t/010_internals/018_deps_file2.t line 50 | |
t/010_internals/018_deps_file2.t ........... 1/? # Failed test 'modified(1)' | |
# at t/010_internals/018_deps_file2.t line 50. | |
# got: 'HEAD | |
# D-BEFORE | |
# Hello, Foo world! | |
# D-AFTER | |
# FOOT | |
# ' |
This file contains hidden or 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 File::Find; | |
use Win32::Unicode; | |
use Benchmark qw/cmpthese timethese/; | |
cmpthese timethese 0, +{ | |
find => sub { | |
find sub {}, 'lib'; |
This file contains hidden or 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
C:\>cpanm -V | |
cpanm (App::cpanminus) version 0.9935 | |
C:\>cpanm CGI | |
Fetching http://cpan.hexten.net/authors/id/L/LD/LDS/CGI.pm-3.49.tar.gz ... OK | |
Configuring CGI.pm-3.49 ... | |
C:\> |
This file contains hidden or 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 5.010; | |
use Encode; | |
use Devel::Peek; | |
my $str = decode_utf8 'ほげ'; | |
{ | |
use utf8; |
This file contains hidden or 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
#!perl | |
use strict; | |
use warnings; | |
use Encode qw/find_encoding encode_utf8 decode_utf8/; | |
use Term::Encoding qw(term_encoding); | |
use AnyEvent::Impl::Perl; | |
use AnyEvent; | |
use Coro; | |
use Coro::Handle; |
This file contains hidden or 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
[10-04-06 17:19:01] % history -n 1 | awk {'print $1'} | sort | uniq -c | sort -k1 -rn | head | |
2093 vi | |
1742 ll | |
1644 cd | |
738 svn | |
470 la | |
307 perl | |
305 sudo | |
304 exit | |
267 prove |
This file contains hidden or 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
function pm-version { | |
local arg; | |
local module_path; | |
for arg in $@; do | |
module_path=`perldoc -l $arg 2>&1`; | |
if [ ! -e "$module_path" ]; then | |
echo "$arg not found" | |
break | |
fi | |
perl -MExtUtils::MakeMaker -e ' |