Skip to content

Instantly share code, notes, and snippets.

END {
use B::TerseSize;
use Devel::Symdump;
my $stab = Devel::Symdump->rnew("main");
my %size;
for my $package ("main", $stab->packages) {
my($subs, $opcount, $opsize) = B::TerseSize::package_size($package);
$size{$package} = $opsize;
}
#!/usr/bin/env perl
# Time-stamp: <2009-03-10 16:30:14 JST, hirose31>
use strict;
use warnings;
use B::TerseSize;
use Devel::Symdump;
sub summary_size() {
use strict;
use warnings;
use URI::Escape 'uri_escape';
use LWP::UserAgent;
use JSON 'decode_json';
use Term::ReadLine;
my $ua = LWP::UserAgent->new(agent => "Dan the shell");
&main;exit;
Debugger entered--Lisp error: (wrong-type-argument stringp (:error (error connection-failed "deleted
" :host "api.dan.co.jp" :service 80) :error (error connection-failed "failed with code 111
" :host "api.dan.co.jp" :service 80)))
message((:error (error connection-failed "deleted\n" :host "api.dan.co.jp" :service 80) :error (error connection-failed "failed with code 111\n" :host "api.dan.co.jp" :service 80)))
(if status (message status) (let (...) (with-temp-buffer ... ... ...)))
(lambda (status) (url-mark-buffer-as-dead (current-buffer)) (if status (message status) (let ... ...)))((:error (error connection-failed "deleted\n" :host "api.dan.co.jp" :service 80) :error (error connection-failed "failed with code 111\n" :host "api.dan.co.jp" :service 80)))
apply((lambda (status) (url-mark-buffer-as-dead (current-buffer)) (if status (message status) (let ... ...))) (:error (error connection-failed "deleted\n" :host "api.dan.co.jp" :service 80) :error (error connection-failed "failed with code 111\n" :host
#!/bin/sh
# Time-stamp: <2009-03-12 16:52:49 JST, hirose31>
_color_() {
color=$1; shift
echo -e "\e[${color}${@}\e[0m"
}
fg_black() { _color_ "30m" $@; }
fg_BLACK() { _color_ "30;1m" $@; }
* s/@!/$@/g following eval
* support shell mode command like "{on,with} ... do command" and
"task {on,with} ...".
* added test code for shell mode command
diff --git a/lib/Archer.pm b/lib/Archer.pm
index 91cb3c8..2c3e5a7 100644
--- a/lib/Archer.pm
+++ b/lib/Archer.pm
# -*- mode: sh -*-
shopt -s extglob progcomp
## commandのあとにファイルをとるタイプ
_command_file() {
local cur prev
local commands="$1"
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
@hirose31
hirose31 / check-dns-ans.pl
Created March 26, 2009 05:05
check-dns-ans.pl
#!/usr/bin/env perl
# Time-stamp: <2008-01-13 23:16:29 JST, hirose>
use strict;
use warnings;
use Data::Dumper;
use IO::File;
STDOUT->autoflush(1);
STDERR->autoflush(1);
@hirose31
hirose31 / gist.pl
Created March 26, 2009 06:04 — forked from typester/gist.pl
gistit
#!/usr/bin/env perl
sub usage {
my $mesg = shift;
(my $prog = $0) =~ s!.+/!!;
print "[Error] $mesg\n" if $mesg;
print <<EOUSAGE;
[usage]
$prog [-p|-s] file1 file2 ... : submit specified files.
syussya
shiro!