Skip to content

Instantly share code, notes, and snippets.

@kits
kits / podview.pl
Created October 5, 2010 23:29
POD Viewer
#!/usr/bin/env perl
### PodV start ###
package PodV;
use strict;
use warnings;
no warnings 'redefine';
use Encode qw(decode FB_HTMLCREF);
use Pod::Perldoc;
@kits
kits / gist:668933
Created November 9, 2010 10:18
extract "fatpacked" module in cpanm.
#!perl
use strict;
use warnings;
use PadWalker qw(peek_sub);
require 'path/to/cpanm';
my $extract_to = 'lib';
my $fatpacked = peek_sub($INC[0])->{'%fatpacked'};
@kits
kits / gist:670759
Created November 10, 2010 11:58
perl-5.12.2 t/op/mkdir fails (in LANG=ja)
t/op/magic.....................................................ok
t/op/method....................................................ok
t/op/mkdir.....................................................# Failed at op/mkdir.t line 20
# got 'ファイルが存在します。'
# expected /(?i-xsm:cannot move|exist|denied|unknown)/
# Failed at op/mkdir.t line 24
# got 'ファイルもディレクトリもありません。'
# expected /(?i-xsm:cannot find|such|exist|not found|not a directory|unknown)/
FAILED at test 3
t/op/my........................................................ok
@kits
kits / myperlbrew.patch
Created November 10, 2010 13:39
myperlbrew.patch (use a favorite mirror site, instead of search.cpan.org)
*** ./perlbrew 2010-11-05 08:56:08.156250000 +0900
--- perl5/perlbrew/bin/perlbrew 2010-11-10 22:33:48.046875000 +0900
***************
*** 1116,1125 ****
unless ($dist_git_describe) {
my $mirror = $self->conf->{mirror};
my $header = $mirror ? { 'Cookie' => "cpan=$mirror->{url}" } : undef;
! my $html = $self->_http_get("http://search.cpan.org/dist/$dist", undef, $header);
! ($dist_path, $dist_tarball) =
@kits
kits / mycpanm
Created November 12, 2010 21:43
mycpanm (use 02packages.details.txt.gz, instead of cpanmetadb)
#!/usr/bin/env perl
use strict;
use File::Spec;
load_cpanm();
*App::cpanminus::script::search_module = sub {
my ($self, $module) = @_;
my $PKGS = '02packages.details.txt.gz';
@kits
kits / AquesTalk.pm
Created December 6, 2010 08:49
AquesTalk.pm - use AquesTalk library with perl.
package AquesTalk;
use Any::Moose;
use Win32::API;
use Encode ();
our $VERSION = '0.02';
# error messages
@kits
kits / pod2html_2.pl
Created February 1, 2011 05:19
pod2html の日本語ヘッダへのアンカーをWikipedia風に変更
#!/usr/bin/env perl
# pod2html の日本語ヘッダへのアンカーをWikipedia風に変更。
# 使い方は pod2html と同じ。
use strict;
use warnings;
use Pod::Html;
{
@kits
kits / screensaverblocker.js
Created June 24, 2011 08:31
screen saver blocker
var WshShell = WScript.CreateObject("WScript.Shell");
while (1) {
var intButton = WshShell.Popup(
"Quit?", 60, "Blocker", 0 + 32);
if (intButton == 1)
break;
else
WScript.Sleep(100);
@kits
kits / ExcelColConv.pl
Created November 4, 2011 07:51
Excel列名変換
#!perl
# Excel列名 ←→ 数値 変換
# http://d.hatena.ne.jp/JunichiIto/20111102/1320253815
use strict;
use warnings;
my %abc2num;
for (1 .. 26) {
@kits
kits / clean_google_links.user.js
Last active September 27, 2015 22:38
clean google links