I hereby claim:
- I am diegok on github.
- I am diegok (https://keybase.io/diegok) on keybase.
- I have a public key whose fingerprint is 7DF4 25CF F890 59DF 80E3 5F60 0480 2176 2A4E A430
To claim this, I am signing this object:
| use feature ':5.10'; | |
| use lib './lib'; | |
| use Term::ANSIColor; | |
| $_REPL->load_plugin($_) for qw( | |
| History Colors | |
| FancyPrompt Refresh | |
| Interrupt OutputCache | |
| DDC Nopaste | |
| PPI |
| var Promise = require('promise'), | |
| ua = require('request'), | |
| cheerio = require('cheerio'); | |
| function http_get(url) { | |
| return new Promise(function(resolve, reject) { | |
| ua(url, function (err, res, body) { | |
| if (err) { reject(err) } | |
| else { | |
| resolve({ |
| #!/usr/bin/env perl | |
| use Mojolicious::Lite; | |
| my $backend = Mojo::URL->new('https://soysuper.com'); | |
| any '/' => \&proxy; | |
| any '/*path' => \&proxy; | |
| sub proxy { | |
| my $c = shift; |
I hereby claim:
To claim this, I am signing this object:
| package Company::Task::Example; | |
| # ABSTRACT: Example task class using moose | |
| sub perform { | |
| my $job = shift; | |
| Company::Task::Example::Run->new( job => $job, %{$job->args->[0]} )->run; | |
| } | |
| package Company::Task::Example:Run; | |
| use Moose; |
| #!/usr/bin/env perl | |
| use strict; | |
| use Resque; | |
| use Company::Config; | |
| use Getopt::Long::Descriptive; | |
| require UNIVERSAL::require; | |
| my $opt = getopt(); | |
| $_->require for @{$opt->module||[]}; |
| #!/usr/bin/env perl | |
| use v5.10; | |
| use Mojo::DOM; | |
| my $dom = Mojo::DOM->new('<p id="my:id"></p><p id="my.id"></p>'); | |
| say $dom->at('#my\:id') ? 'Ok with :' : 'Broken with :'; | |
| say $dom->at('#my\.id') ? 'Ok with .' : 'Broken with .'; |
| # Reimplement "url_for" helper | |
| my $mojo_url_for = *Mojolicious::Controller::url_for{CODE}; | |
| my $i18n_url_for = sub { | |
| my $self = shift; | |
| my $url = $self->$mojo_url_for(@_); | |
| # Absolute URL | |
| return $url if $url->is_abs; |
| sub rebuild_hot { | |
| my $ns = shift; | |
| my $new_index = 'ss_' . time; | |
| say "New index will be '$new_index'" if $c->opt->verbose; | |
| my $old_index = eval { my $cur_index = (keys %{$ns->alias->aliased_to} )[0] }; | |
| warn $@ if $@; | |
| $ns->index($new_index)->create; |
| #!/usr/bin/env perl | |
| use strict; | |
| use v5.10; | |
| use Class::Load qw(load_class); | |
| #use Mojo::UserAgent; # works when pre-loading | |
| if ( my $pid = fork() ) { | |
| waitpid( $pid, 0 ); | |
| say "Forked child($pid) exited with status $?"; | |
| } |