yabs.io

Yet Another Bookmarks Service

Search

Results

[https://notes.pinboard.in/u:mark.page/c6351996b54c1a5a4825] - - public:mepage
development, notes, perl - 3 | id:1494839 -

my $app = { 'form' => { map { $_ => ($cgi->param($_))[0] } $cgi->param }, };

[https://notes.pinboard.in/u:mark.page/c2df3354ae09fb3e2c10] - - public:mepage
perl, snippet - 2 | id:1494935 -

sub discord { use LWP; use HTTP::Request; use JSON; my ($_a) = @_; my ($_r); my $_msg = { 'username' => 'chsm-ext', 'content' => $_a, }; my $_json = JSON->new->allow_nonref; my $_ua = LWP::UserAgent->new; my $_req = HTTP::Request->new(POST => 'https://discord.com/api/webhooks/'.$app->{'discord'}); $_req->content_type('application/json'); $_req->header("User-Agent" => "Perl Discord HookBot"); $_req->content($_json->encode($_msg)); $_r = $_ua->request($_req); return $_r; }

[https://notes.pinboard.in/u:mark.page/2605ce239a1ab7cec272] - - public:mepage
development, perl, snippet - 3 | id:1495723 -

my @now = localtime; $now[5] += 1900; $now[4] += 1; for my $l (0 .. (scalar(@now) - 1)) { $now[$l] = sprintf("%02d",$now[$l]); }

[https://notes.pinboard.in/u:mark.page/012a6f9640ecbe1d26b4] - - public:mepage
development, perl, snippet - 3 | id:1495727 -

my @sorted = map substr($_, 4) => sort map pack('C4' => /(\d+)\.(\d+)\.(\d+)\.(\d+)/) . $_ => keys $output;

[http://www.perlmonks.org/?node_id=181783] - - public:mepage
development, perl - 2 | id:1495815 -

use PadWalker qw(peek_my); use Data::Dumper; my $s = "a string"; { my @a = qw(an array); print Dumper( peek_my(0) ); } my %h = qw(a hash); print Dumper( peek_my(0) ); sub debugger { use Data::Dumper; $Data::Dumper::Indent = 1; $Data::Dumper::Purity = 1; $Data::Dumper::Terse = 0; $Data::Dumper::Deparse = 1; my ($_a) = @_; open(my $_debug,'>','./logs/'.$_a->{'facility'}.'-debug.log'); print $_debug Dumper($_a->{'data'})."\n"; close($_debug); }

[https://notes.pinboard.in/u:mark.page/4225413c26dfc6b40de3] - - public:mepage
development, perl, snippet - 3 | id:1496108 -

my @d = localtime; $d[5] += 1900; $d[4] += 1; for my $l (0 .. (scalar(@d) - 1)) { $d[$l] = sprintf("%02d",$d[$l]); }

[https://notes.pinboard.in/u:mark.page/6d0a244666446b3934b1] - - public:mepage
development, perl, snippet - 3 | id:1496121 -

for my $s (0 .. (scalar(@source_list) - 1)) { print " - Loading: $source_list[$s]\n"; push(@sources,do "$srpz_home/sources/$source_list[$s]\.pl"); }

Follow Tags


Export:

JSONXMLRSS