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
# this example based on module to do html/text truncate | |
# the Template plugin package | |
package Template::Plugin::TextTruncater; | |
use warnings; | |
use strict; | |
use utf8; | |
use DateTime; |
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
# ------------- using * --------------------- | |
POST /logstash-*/_search | |
{ | |
"query": { | |
"filtered": { | |
"query": { | |
"match_phrase": { | |
"@fields.request": "/sok/google" | |
} | |
}, |
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
########################### config yml ########################### | |
--- | |
name: SearchResponsive::EchoSlam | |
EchoSlam: | |
my_config: | |
channel_name: 'my_config_yml_channel' | |
########################### model ########################### | |
package SearchResponsive::EchoSlam; | |
use Moose; |
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 my $method (qw(build_date bought_date)) { | |
Sub::Install::install($_ => sub { | |
my ($self, $input_arg) = @_; | |
return format_string($self->$method); | |
}); | |
} | |
sub apejens {} |
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 RomanConverter; | |
use Moose; | |
use POSIX qw(floor); | |
use String::Util qw(trim); | |
use v5.10; | |
has 'NUMBERS_TO_ROMANS' => ( | |
is => 'bare' , | |
isa => 'Tree' , | |
weak_ref => 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
#!/usr/bin/perl -w | |
use strict; | |
use CGI qw(:all); | |
use CGI::Carp qw(fatalsToBrowser); | |
my($requested_color, $old_color, $color_cookie) = ("",""); | |
$old_color="blue"; # Default value | |
# Is there a new color requested? | |
if(defined param('color')) { | |
$requested_color = param('color'); | |
} |
NewerOlder