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 utf8; | |
use Carp (); | |
sub ಠ_ಠ { local $Carp::CarpLevel = 1; &Carp::carp } | |
ಠ_ಠ "Srsly?"; |
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
http_proxy= curl -X POST -H "content-type: application/json" \ | |
http://localhost:8098/mapred --data @-<<\EOF | |
{"inputs":[["welcome","german"]] | |
,"query":[{"map":{"language":"perl","source":" | |
sub { | |
my ($m) = lc(shift->{values}[0]{data}) =~ /(\w*)/; | |
my @r | |
for my $i (@$m) { | |
if($i ne '') { | |
push @r, { $i => 1 }; |
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
my $kw = $r->route('/keywords') | |
->to(controller => 'stats', action => 'keywords') | |
->name('keywords'); | |
my $kwid = $kw->waypoint('/:id', id => qr/\d+/) | |
->to('action' => 'keyword_stats') | |
->name('keyword stats'); |
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 warnings; | |
use Mojo::Client; | |
my $client = Mojo::Client->new( max_redirects => 3 ); | |
my @urls = qw(http://bash.org http://autocentre.ua); |
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
<?xml version="1.0" encoding="iso-8859-1" ?> | |
<tests version="1.0"> | |
<group> | |
<item>4</item> | |
<item>2</item> | |
<item>1</item> | |
</group> | |
<group> | |
<item>4</item> |
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 warnings; | |
my $str = shift @ARGV; | |
if ($str =~ /(|\d+?)((?:(?:2[1..5][1..5]|1?\d?\d)\.){3}(?:2[1..5][1..5]|1?\d?\d))/) { | |
if ($1) { warn "Strange ip: $&" } |
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 build_tx { | |
my ($self, $user, $pass) = @_; | |
croak("Basic authorization user name can't contain ':'") | |
if $user =~ /:/; | |
# or build_tx('POST|GET|...', ...), see Mojo::Client | |
my ($tx, $cb) = $self->client->build_form_tx($url, { | |
field => 'value', | |
# ... |
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
Testing gist.vim | |
-- Updating gist with vim |
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
eeeee |
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
Lalala |
OlderNewer