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 | |
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 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
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
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 | |
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 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 | |
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 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 common::sense; | |
sub D($) { | |
for (scalar reverse shift) { | |
s/(\d{3})(?=\d)/$1 /g; | |
return scalar reverse; | |
} | |
} |
NewerOlder