This file contains hidden or 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
use strict; | |
use warnings; | |
use File::Tail::Multi; | |
use Data::Dumper; | |
my $ft = File::Tail::Multi->new( | |
OutputPrefix => "f", | |
Files => [ "/home/leejj/*.pl" ], | |
Function => sub { | |
my $line = shift; |
This file contains hidden or 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
use strict; | |
use warnings; | |
use Web::Scraper; | |
use URI; | |
use LWP::Simple; | |
my $content = scraper { | |
process 'div[id="Wa_talktalk_main1_pnBlogIt"]', | |
"data" => scraper { | |
process 'a', 'url[]' => '@href'; |
This file contains hidden or 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
use strict; | |
use warnings; | |
use Config::Pit; | |
use WWW::Mechanize; | |
my $config = pit_get('www.naver.com', require => { | |
url => "your url on example", | |
username => "your username on example", | |
password => "your password on example", | |
}); |
This file contains hidden or 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 Config::Pit; | |
use WWW::Mechanize; | |
use Web::Scraper; | |
use XML::Feed; | |
use DateTime; | |
use DateTime::Format::MySQL; | |
use Cache::File; |
This file contains hidden or 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
// inspired by Instapaper Bookmarklet | |
var title,d=document,l=d.location,href=l.href; | |
if (/www\.aladdin\.co\.kr\/shop\/wproduct\.aspx/.test(l)) { | |
href.match(/ISBN=(.+)$/); | |
var isbn = RegExp.$1; | |
if (isbn) { | |
i = document.createElement('iframe'); | |
i.setAttribute('name', 'dl2'); |
This file contains hidden or 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 title,d=document,l=d.location,href=l.href; | |
if (/www\.aladdin\.co\.kr\/shop\/wproduct\.aspx/.test(l)) { | |
// Aladdin | |
href.match(/ISBN=(.+)$/i); | |
var isbn = RegExp.$1; | |
update_item(isbn); | |
} | |
else if (/www\.yes24\.com\/24\/goods/.test(l)) { | |
// Yes24 |
This file contains hidden or 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
package Morris::Plugin::Relay; | |
use Moose; | |
use AnyEvent::MP qw(snd); | |
use AnyEvent::MP::Global qw(grp_mon); | |
use namespace::clean -except => qw(meta); | |
use Encode (); | |
extends 'Morris::Plugin'; | |
has from => ( |
This file contains hidden or 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 | |
# Usage: twit2irc.pl irc.example.com 6667 nickname '#channel1' '#channel2' '#channel3' | |
# made by Anti-Mac a.k.a @aer0 | |
use strict; | |
use warnings; | |
use Encode qw/encode decode/; | |
use String::IRC; | |
use AnyEvent::IRC::Client; | |
use AnyEvent::Twitter::Stream; |
OlderNewer