Skip to content

Instantly share code, notes, and snippets.

*~
/local/
/perl
/prove
/plackup
/Makefile.setupenv
/cin
/config/perl/libs.txt
/config/
/modules/
- "../../modules/json-functions-xs" tests
- "../../modules/json-ps" tests
- "../../modules/web-encodings" tests build
- "../../modules/web-url" tests build
- "../../modules/web-dom" tests build
- "../../modules/web-css" tests build
- "../../modules/web-markup" tests build
- "../../modules/web-useragent-functions" tests lwp anyeventsocks oauth wsse cli testws curl
- "../../modules/wanage" tests build datetime mp
- "../../modules/temma" tests
...
{
"volumesFrom": [],
"portMappings": [],
"command": [],
"environment": [
{
"name": "apikey",
"value": "XXX"
}
# -*- Makefile -*-
CARTON = local/carton/bin/carton
CARTON_LIB = local/carton/lib/perl5
PERL = perl
CPANM = $(PERL) local/carton/cpanm
CPANM_ = $(CPANM) --notest --verbose -l local/carton --reinstall
CPANM_PATH = local/carton
PERL_PATH = local/dummy/path/to/perl
SSH = ssh
require Parse::Netstat;
my $timer; $timer = AnyEvent->timer(
interval => 0.6,
cb => sub {
my $netstat;
AnyEvent::Util::run_cmd(
'LANG=C netstat --inet --inet6 -n -p -l',
'>' => \$netstat,
'2>' => \(my $dummy),
@wakaba
wakaba / bin-hoge.pl
Created June 25, 2012 02:02
Perl script template
#!/usr/bin/perl
use strict;
BEGIN {
my $file_name = __FILE__;
$file_name =~ s{[^/\\]+$}{};
$file_name ||= '.';
$file_name .= '/../config/perl/libs.txt';
open my $file, '<', $file_name or die "$0: $file_name: $!";
unshift @INC, split /:/, scalar <$file>;
}

NAME

screenlist - List of screens

INSTALL

Add following lines to ~/.bashrc:

perl ~/screenlist/add.pl
alias s="perl ~/screenlist/run.pl"
use Test::More tests => 2;
push @Class1::ISA, qw(Base1 Base2);
sub Base2::hoge { 0 }
{
local *Base1::hoge = sub { 1 };
ok +Class1->hoge;
}
@wakaba
wakaba / Makefile
Created August 6, 2012 06:57
Maintaining GitHub repository mirrors
# ------ Configuration files ------
config-all: config-cron
config-cron:
mkdir -p local/config/cron.d
cd config/cron.d.src && find -type f | \
xargs -l1 -i% -- sh -c "cat % | sed 's/@@ROOT@@/$(subst /,\\/,$(abspath .))/g' > ../../local/config/cron.d/%"
# ------ Sync operations ------
*~
/deps/
/local/
/perl
/prove
/plackup
/Makefile.setupenv
/cin
/config/perl/libs.txt