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 | |
package A; | |
use Mojo::Base -base; | |
use 5.020; | |
use feature qw(signatures); | |
has [qw(a b)]; | |
sub new { |
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
--> Working on Exporter::Tiny | |
Fetching https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/Exporter-Tiny-0.042.tar.gz ... OK | |
Configuring Exporter-Tiny-0.042 ... OK | |
Building Exporter-Tiny-0.042 ... OK | |
Successfully installed Exporter-Tiny-0.042 | |
Building List-MoreUtils-0.413 ... OK | |
Successfully installed List-MoreUtils-0.413 | |
Building CSS-Sass-v3.3.0 ... OK | |
Successfully installed CSS-Sass-v3.3.0 | |
4 distributions installed |
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
stefan@deskws:/tmp/convos$ git pull | |
Updating bbb9f29..ccfa6be | |
Fast-forward | |
script/convos | 42 ++++++++++++++++++++++++++++++------------ | |
1 file changed, 30 insertions(+), 12 deletions(-) | |
stefan@deskws:/tmp/convos$ ./script/convos | |
--- |
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
use 5.022; | |
use lib 'lib'; | |
use B; | |
say B->new->render('a.txt'); | |
package A; | |
use Mojo::Base -base; | |
use Mojo::Loader 'data_section'; |
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 Mojo::Sendgrid; | |
use Mojo::Base 'Mojo::EventEmitter'; | |
use Mojo::Sendgrid::Mail; | |
has config => sub { {} }; | |
has apikey => sub { $ENV{SENDGRID_APIKEY} || shift->config->{apikey} or die "config apikey missing" }; | |
has apiurl => sub { $ENV{SENDGRID_APIURL} || shift->config->{apiurl} || 'https://api.sendgrid.com/api/mail.send.json' }; | |
sub mail { Mojo::Sendgrid::Mail->new(sendgrid => shift, @_) } |
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
$ for i in $(seq 1 5); do echo "$i - $(date)"; perl sortbench.pl; done | |
1 - Mon Mar 28 22:18:24 CDT 2016 | |
timethis for 10: 11 wallclock secs (10.42 usr + 0.02 sys = 10.44 CPU) @ 35.63/s (n=372) | |
timethis for 10: 11 wallclock secs (10.56 usr + 0.00 sys = 10.56 CPU) @ 34.94/s (n=369) | |
2 - Mon Mar 28 22:18:49 CDT 2016 | |
timethis for 10: 10 wallclock secs (10.33 usr + 0.04 sys = 10.37 CPU) @ 35.58/s (n=369) | |
timethis for 10: 11 wallclock secs (10.67 usr + 0.01 sys = 10.68 CPU) @ 34.55/s (n=369) | |
3 - Mon Mar 28 22:19:13 CDT 2016 | |
timethis for 10: 11 wallclock secs (10.58 usr + 0.02 sys = 10.60 CPU) @ 35.47/s (n=376) | |
timethis for 10: 11 wallclock secs (10.57 usr + 0.01 sys = 10.58 CPU) @ 34.59/s (n=366) |
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
14252 ? S 0:00 /home/ubuntu/workspace/ForkAndGo/eg/minion.pl | |
14258 ? S 0:00 \_ /home/ubuntu/workspace/ForkAndGo/eg/minion.pl | |
14261 ? Ss 0:00 | \_ /home/ubuntu/workspace/ForkAndGo/eg/minion.pl | |
14267 ? S 0:00 | | \_ /usr/bin/perl /home/ubuntu/workspace/ForkAndGo/eg/minion.pl minion worker | |
14277 ? S 0:00 | | \_ /usr/bin/perl /home/ubuntu/workspace/ForkAndGo/eg/minion.pl minion worker | |
14263 ? Ss 0:00 | \_ /home/ubuntu/workspace/ForkAndGo/eg/minion.pl | |
14265 ? S 0:00 | | \_ /usr/bin/perl /home/ubuntu/workspace/ForkAndGo/eg/minion.pl minion worker | |
14270 ? S 0:00 | | \_ /usr/bin/perl /home/ubuntu/workspace/ForkAndGo/eg/minion.pl minion worker | |
14264 ? Ss 0:00 | \_ /home/ubuntu/workspace/ForkAndGo/eg/minion.pl | |
14268 ? S 0:00 | | \_ /usr/bin/perl /home/ubuntu/workspace/ForkAndGo/eg/minion.pl minion worker |
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
use Mojolicious::Lite; | |
use lib '../Mojolicious-Plugin-OAuth2-Fetch/lib'; | |
use lib 'lib'; | |
use Mojo::Pg; | |
use TimeClock::Model::Pg::Users; | |
use TimeClock::Model::Pg::Timeclock; | |
my $config = plugin 'Config'; |
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 TimeClock::Model::OAuth2; | |
use Mojo::Base -base; | |
use UUID::Tiny ':std'; | |
has 'pg'; | |
sub store { | |
my $self = shift; | |
if ( $#_ == 1 ) { |
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
use Mojolicious::Lite; | |
use 5.20.0; | |
use experimental 'signatures'; | |
use Mojo::IOLoop; | |
Mojo::IOLoop->recurring(1 => sub { warn scalar localtime }); | |
# Render template "index.html.ep" from the DATA section | |
get '/' => {template => 'index'}; |