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
/* jQueryで、ウェブブラウザの画面全体をグレーに覆う | |
モーダルスクリーンを表示します。 | |
var s = new ModalScreen; // オブジェクト作成 | |
s.show(); // モーダルスクリーンに切り替え | |
s.hide(); // モーダルからモードレスに戻す | |
*/ | |
var ModalScreen = function() { | |
this.div = $("<div>").css({ | |
position : "absolute", | |
background: "rgba(64, 64, 64, 0.9)", |
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/perl | |
# ストレージの利用率とかに使える単純円グラフのCSS Spliteを生成します。 | |
# 出来上がりはごちら http://labo.dtpwiki.jp/pi/pi.png | |
use strict; | |
use warnings; | |
use File::Spec; | |
use FindBin; | |
use Image::Magick; |
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
LANG=C grep -r -e `echo 'ピーチ'|iconv -tcp932`./ |
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
helper commify => sub { | |
my ($self, $string) = @_; | |
1 while $string =~ s/^(-?\d+)(\d{3})/$1,$2/; | |
$string; | |
}; |
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/perl | |
use strict; | |
use warnings; | |
use LWP::UserAgent; | |
my $url = 'https://www.verisign.co.jp/'; | |
my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } ) or die $!; | |
my $res = $ua->head( $url ) or die $!; |
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/perl | |
# Value-Domain.comで契約済みのドメインリストを取得します。 | |
# | |
use strict; | |
use warnings; | |
use utf8; | |
use Data::Dumper; | |
use File::Spec; |
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/perl | |
use strict; | |
use warnings; | |
use CGI; | |
use File::Spec; | |
use FindBin; # mod_perl環境じゃない場合 | |
#use FindBin::Real; # mod_perlなど | |
use HTML::Template; | |
use Time::Piece; |
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/perl | |
use strict; | |
use warnings; | |
# HTTP Status codes from HTTP/Status.pm, to avoid loading package | |
# that may or may not exist. We only need those >=400, but all | |
# are included for potential future use. | |
my %StatusCode = ( | |
100 => 'Continue', | |
101 => 'Switching Protocols', |
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/perl | |
# Citrix XenServer 5.6/6.02用の xe xx-list 系の出力の簡易パーサ | |
# | |
# XenServerじゃないXenのばあい、xeコマンドではなくxmコマンド | |
# なのでテストしていないけれども、__DATA__以降の書式が | |
# 同じなら使えると思います。 | |
use 5.8.8; # XenServer 5.6/6.2のDom-0に入るSystem Perlは 5.8.8 | |
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
// オリジナルは、http://www.iwashi.org/archives/2540 | |
(function(){ | |
var start = new Date().getTime(); | |
documents.add( DocumentColorSpace.RGB, 3370, 2284 ); | |
var mColor = new RGBColor(); | |
for ( var b = 0; b < 16; b++ ) { | |
mColor.red = b * 14; | |
mColor.green = b * 12; |