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 utf8; | |
use strict; | |
use lib '../../lib'; | |
use common; | |
use util; | |
use Net::Twitter; | |
use Storable qw(nstore retrieve); |
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 utf8; | |
use strict; | |
BEGIN { | |
open STDERR, '>>', '../log/****.log'; | |
$SIG{'__WARN__'} = sub { CORE::warn sprintf "[%s] %s", scalar localtime, @_ }; | |
}; | |
use lib '/path/my/lib'; |
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 utf8; | |
use strict; | |
use lib '../../lib'; | |
use common; | |
my $LOG = '/var/log/proftpd.log'; | |
my $TMP = '/tmp/***/proftpd.tmp'; unlink $TMP if @ARGV; | |
my $M = {May => 5, Jun => 6, Jul => 7, Aug => 8, Sep => 9, Oct => 10, Nov => 11, Dec => 12, Jan => 1, Feb => 2, Mar => 3, Apr => 4}; |
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
perl -MLWP::UserAgent -e'print LWP::UserAgent->new(max_redirect => 0, timeout => 5)->get($_)->header("location")' 'http://ff.im/2OEON' | |
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 warn($msg) { fwrite(STDERR, substr($msg, -1) == "\n" ? $msg : $msg.' at '.__FILE__.' line '.__LINE__.".\n"); } |
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 utf8; | |
use strict; | |
use lib '../../lib'; | |
use common; | |
use XML::Feed; | |
use Storable qw(nstore retrieve); | |
use Data::Dumper; |
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 utf8; | |
use lib '../../lib'; | |
use common; | |
use POE qw(Component::Client::HTTP); | |
use HTTP::Request::Common qw(GET); | |
use Data::Dumper; |
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
sub ucfirst($) { | |
return join ' ', map { CORE::ucfirst } split / /, lc shift; | |
} |
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
use strict; | |
use utf8; | |
use JSON; | |
use Encode (); | |
use AnyEvent::HTTPD; | |
use AnyEvent::Twitter::Stream; | |
use constant L => 30; |
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 POE qw(Component::Server::SimpleHTTP XS::Queue::Array Loop::IO_Poll); | |
POE::Component::Server::SimpleHTTP->new(ALIAS => 'HTTPD', PORT => 8010, HANDLERS => [{ DIR => '/', SESSION => 'MANAGER', EVENT => 'req' }]); | |
POE::Session->create(inline_states => { | |
_start => sub { $_[KERNEL]->alias_set('MANAGER') }, | |
req => sub { | |
for ($_[ARG1]) { | |
$_->code(200); |
OlderNewer