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
| 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 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 Mojo::Client; | |
| my $client = Mojo::Client->new( max_redirects => 3 ); | |
| my @urls = qw(http://bash.org http://autocentre.ua); |
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
| <?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 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; | |
| 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 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
| 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 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
| Testing gist.vim | |
| -- Updating gist with vim |
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
| Lalala |
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
| eeeee |
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
| mojolicious generate app prof | |
| cd prof | |
| perl -MDevel::NYTProf script/prof get / | |
| nytprofhtml |
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 Lighter; | |
| use strict; | |
| use warnings; | |
| use base 'Mojo::Base'; | |
| #use Mojolicious::Commands; | |
| use Mojolicious::Plugins; | |
| use MojoX::Dispatcher::Routes; |
OlderNewer