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/env perl -s | |
use strict; | |
use warnings; | |
use Config::Pit; | |
use WWW::Pixiv::Download; | |
use Email::MIME::CreateHTML; | |
use Email::MIME::CreateHTML::Resolver::CustomUA; | |
use Email::Send; | |
use Email::Send::Gmail; |
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/env perl | |
use strict; | |
use warnings; | |
use WWW::Pixiv::Download; | |
use Config::Pit qw(pit_get); | |
use Parallel::ForkManager; | |
use Path::Class; | |
use Clone; | |
my $illust_id = '17373419'; |
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/env perl | |
use strict; | |
use warnings; | |
use WWW::Pixiv::Download; | |
use Config::Pit qw(pit_get); | |
use JSON qw(decode_json); | |
my $home = 'http://www.pixiv.net'; | |
my $stacc = "${home}/stacc/"; | |
my $json_url = "${home}/stacc/my/home/all/all/js?tt=%%STACC_TOKEN%%"; |
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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use MIME::Base64; | |
use LWP::UserAgent; | |
my $message = "カリー化してみたよ。"; | |
my $username = 'your username'; |
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/env perl | |
use strict; | |
use warnings; | |
use HTTP::Cookies::Safari; | |
use WWW::Pixiv::Download; | |
my $illust_id = shift || die qq(! failed: "illust_id" not found.\n); | |
my $cookie_jar = HTTP::Cookies::Safari->new; | |
$cookie_jar->load( "$ENV{HOME}/Library/Cookies/Cookies.plist" ); |
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
var f1, // カリー化っぽく | |
f2, // new 演算子を使ってオブジェクトを作る | |
f3, // オブジェクトを返す関数を作って | |
f4; // Number.prototypeを使う | |
f1 = function () { | |
var add = function (a) { | |
return function (b) { | |
return _add(a, b); | |
}; |
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
var t1, add; | |
t1 = function () { | |
var Hold = function (_num) { | |
this.num = _num; | |
this.add = function (num2) { | |
return toNumber(this.num) + toNumber(num2); | |
}; | |
}; |
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
// new 演算子を使って複数のオブジェクトを作った場合、 | |
// 同一のオブジェクトをプロトタイプオブジェクトにもつため、 | |
// プロトタイプオブジェクトのプロパティをいじった場合、 | |
// 他のオブジェクトのプロパティも変わる危険性がある | |
// 逆に言うと、ここの設計を間違わなければ、無駄に同じようなオブジェクトを | |
// つくらないでいい | |
function Person (name) { | |
this.name = name || 'unknown'; | |
} |
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
function test (a) { | |
console.log(a === false); | |
} | |
function test_near (a) { | |
console.log(a == false); | |
} | |
var arry = [ false, true, null, undefined, '', 0, '0' ]; |
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
this.QUERY = new Query; | |
// var client = {}; | |
// | |
// /* client.A と client.B は非同期 */ | |
// client.A = client.A || new XMLHttpClient; | |
// client.B = client.B || new XMLHttpClient; | |
// | |
// /* | |
// pushしたリクエストは、pushした順番に処理。 | |
// 1つのリクエストを処理を完了するまで、次のリクエストは待っている |
OlderNewer