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 | |
BEGIN { $ENV{MOJO_MAX_MESSAGE_SIZE} = 50 * 1024 * 1024; } | |
use Mojolicious::Lite; | |
my $conf = { path => 'data/uploads/', ext => qr/\.(?i:mp3|wav|wma|ogg)$/ }; | |
post '/uploadify/check' => sub { | |
my $self = shift; | |
my $param = $self->req->params->to_hash; |
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
dev tap | |
proto tcp | |
remote vpn01d.root.yandex.net 1194 | |
remote vpn01e.root.yandex.net 1194 | |
remote vpn01h.root.yandex.net 1194 | |
remote-random | |
resolv-retry infinite |
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 5.12.0; | |
use Mojo::UserAgent; | |
use Compress::Zlib; | |
my $ua = Mojo::UserAgent->new; | |
$ua->on( start => sub { | |
my ( $ua, $tx ) = @_; |
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 common::sense; | |
use ojo; | |
die "Usage: $0 <podcast url>" unless @ARGV; | |
b(g( shift )->dom->find("enclosure[url]")->each(sub { | |
local $_ = shift->attrs->{url}; | |
say if /\.mp3$/; | |
})); |
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 common::sense; | |
sub D($) { | |
for (scalar reverse shift) { | |
s/(\d{3})(?=\d)/$1 /g; | |
return scalar reverse; | |
} | |
} |
NewerOlder