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 warnings; | |
use strict; | |
use IPC::System::Simple qw/capture/; | |
use DateTime; | |
my $now = DateTime->now; | |
my $st = '/usr/local/bin/speedtest-cli'; # via pip-install speedtest-cli | |
my $res = capture "$st"; | |
my ($ping) = $res =~ /(\d+\.\d+) ms/ms; | |
my ($download) = $res =~ /Download: (\d+\.\d+) /ms; |
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 SplunkPipe::Client; | |
use Moo; | |
extends 'LWP::UserAgent::JSON'; | |
use IO::Socket::SSL; | |
use Path::Tiny; | |
sub FOREIGNBUILDARGS { | |
my ($class, %args) = @_; | |
$args{ssl_opts} = { verify_hostname => 0, | |
SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, |
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
File Edit Options Buffers Tools Perl Help | |
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use Try::Tiny; | |
use lib 'lib'; | |
use Plack::Middleware::SSI; | |
use CGI::Emulate::PSGI; | |
use CGI::Compile; | |
use Plack::App::URLMap; |
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 Some::Object; | |
...; | |
use Devel::Cycle; | |
# Devel::Cycle assumes you're happy with things going to STDOUT. | |
no warnings 'redefine'; | |
sub Devel::Cycle::_do_report { | |
my $counter = shift; | |
my $path = 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
(?:B(?:A(?:R(?:R(?:A(?:G(?:ANYATTI|GA BAY|UP)|CK (?:HEIGHTS|POINT)|M(?:ORNIE|UNGA)|POR(?:T WES)?T|B(?:OOL|UP|A)|KEE|TTA)|E(?:N(?: GROUNDS|GARRY)|TT(?:S CREEK|A))|IN(?:G(?:TON(?: TOPS)?|(?:ELL|H)A|UN)|E)|O(?:W (?:ISLAND|CREEK)|N(?: GORGE)?)|Y(?:S REEF)?)|N(?:E(?:Y(?: (?:POINT|VIEW)|S REEF)|S BAY)|A(?:WARTHA(?: NORTH)?|DOWN|RD)?|DIOOTA|SLEY)|K(?:ER(?:S (?:CREEK|VALE)| CREEK FLAT)|STEAD|LY)|O(?:NGAROOK(?: WEST)?|SSA GOLDFIELDS|O[GT]A|MI)|W(?:ON(?: (?:DOWN|HEAD)S)?|I(?:DG(?:EE|I)|TE))|A(?:N(?:GAROO|DUDA)|(?:LA|B)BA|DINE|MBAH)?|D(?:WELL (?:VALLEY|PARK)|EN RIDGE|ON)|UN(?:AH P(?:LAINS|ARK)|GA(?: GAP)?)|M(?:E(?:DMAN|RA)|A(?:RYEE|H)|OYA)|I(?:N(?:GHUP(?: WEST)?|IA)|GAN)|C(?:ALDINE(?: DOWNS)?|OONGERE)|E(?:LLAN(?: POINT)?|E(?:NA)?)|B(?:(?:ERTO|ALI)N|IGAL)|L(?:(?:OWS HIL|I)L|YNE)| (?:BEACH|POINT)|T(?:LE FRERE|ON)|G(?:ARA|O)|YULGIL|FOLD|JARG|HAM)|L(?:L(?:A(?:R(?:AT(?: (?:ROADSIDE DELIVERY|(?:EA|WE)ST|CENTRAL|NORTH|MC))?|OO|D)|DO(?:N(?:IA|G)|RAN)|(?: BALL|JUR|LAB)A|N(?:GEICH|DEAN)?|ST HEAD|YING|PUR)|I(?:ANG(?: EAST)?|MORE|D |
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 | |
package Constructor; | |
use Moose; | |
with 'MooseX::Traits'; | |
use namespace::autoclean; | |
has '+_trait_namespace' => ( default => __PACKAGE__); | |
sub load { | |
my ($class, @plugin) = @_; | |
my $obj_with_plugin = $class->new_with_traits(traits => [@plugin]); | |
return $obj_with_plugin; |
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 Quack; | |
use Moose; | |
use Quack::LikeADuck; | |
sub do_something { | |
require Miaow; | |
Miaow->new->do_something; | |
} | |
sub run { |
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
(?-xism:(?:B(?:A(?:R(?:R(?:A(?:G(?:ANYATTI|GA BAY|UP)|CK (?:HEIGHTS|POINT)|M(?:ORNIE|UNGA)|POR(?:T WES)?T|B(?:OOL|UP|A)|KEE|TTA)|E(?:N(?: GROUNDS|GARRY)|TT(?:S CREEK|A))|IN(?:G(?:TON(?: TOPS)?|(?:ELL|H)A|UN)|E)|O(?:W (?:ISLAND|CREEK)|N(?: GORGE)?)|Y(?:S REEF)?)|N(?:E(?:Y(?: (?:POINT|VIEW)|S REEF)|S BAY)|A(?:WARTHA(?: NORTH)?|DOWN|RD)?|DIOOTA|SLEY)|K(?:ER(?:S (?:CREEK|VALE)| CREEK FLAT)|STEAD|LY)|O(?:NGAROOK(?: WEST)?|SSA GOLDFIELDS|O[GT]A|MI)|W(?:ON(?: (?:DOWN|HEAD)S)?|I(?:DG(?:EE|I)|TE))|A(?:N(?:GAROO|DUDA)|(?:LA|B)BA|DINE|MBAH)?|D(?:WELL (?:VALLEY|PARK)|EN RIDGE|ON)|UN(?:AH P(?:LAINS|ARK)|GA(?: GAP)?)|M(?:E(?:DMAN|RA)|A(?:RYEE|H)|OYA)|I(?:N(?:GHUP(?: WEST)?|IA)|GAN)|C(?:ALDINE(?: DOWNS)?|OONGERE)|E(?:LLAN(?: POINT)?|E(?:NA)?)|B(?:(?:ERTO|ALI)N|IGAL)|L(?:(?:OWS HIL|I)L|YNE)| (?:BEACH|POINT)|T(?:LE FRERE|ON)|G(?:ARA|O)|YULGIL|FOLD|JARG|HAM)|L(?:L(?:A(?:R(?:AT(?: (?:ROADSIDE DELIVERY|(?:EA|WE)ST|CENTRAL|NORTH|MC))?|OO|D)|DO(?:N(?:IA|G)|RAN)|(?: BALL|JUR|LAB)A|N(?:GEICH|DEAN)?|ST HEAD|YING|PUR)|I(?:ANG(?: EAST) |
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
[%- MACRO render_submenu(node) BLOCK -%] | |
[%- FOREACH item IN node.getAllChildren -%] | |
-[% NEXT IF item.getNodeValue == "descr.txt" %] | |
+[% NEXT IF item.getNodeValue == 0 %] | |
<li> [% print_metadata(node) %] | |
-[% IF item.getAllChildren.size %] <ul> [% render_submenu(item) %] </ul> [% END %] </li> | |
-[%- END -%] | |
+[% IF item.getAllChildren.size %] <ul> [% render_submenu(item) %] </ul> | |
+[% ELSIF item.getNodeValue !=0 %] <li> [% render_node(item) %] [% END %] | |
+[% END %] </li> |
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
=head3 condition | |
The condition argument describes the C<ON> clause of the C<JOIN> | |
expression used to connect the two sources when creating SQL queries. | |
To create simple equality joins, supply a hashref containing the | |
remote table column name as the key(s), and the local table column | |
name as the value(s), for example: | |
{ 'foreign.author_id' => 'self.id' } |