Skip to content

Instantly share code, notes, and snippets.

View mephinet's full-sized avatar

Philipp Gortan mephinet

View GitHub Profile
@mephinet
mephinet / promtail.yaml
Created July 27, 2021 18:12
promtail.yaml
server:
http_listen_port: 9080
grpc_listen_port: 0
clients:
- url: http://localhost:3100/loki/api/v1/push
scrape_configs:
- job_name: system
static_configs:
use strict;
use warnings;
use Test::Class::Moose::Runner;
my $runner = Test::Class::Moose::Runner->new();
$runner->runtests;
#! /usr/bin/env perl
use strict;
use warnings;
my $s = "foo\nbar\n";
open my $fh, '<', \$s;
# this while is OK, because it's top-level
while (<$fh>) { }
@mephinet
mephinet / test.pl
Created December 16, 2017 18:01
Test what wantarray return when called as second parameter to or
#! /usr/bin/env perl
use strict;
use warnings;
my $some_cond = 0;
sub method {
my $wa = wantarray();
die "wantarray = $wa" if defined $wa;
@mephinet
mephinet / autoload-performance.pl
Last active November 15, 2017 08:02
perl autoload performance
#! /usr/bin/env perl
use strict;
use warnings;
use v5.10;
package A;
use Moose;
use namespace::autoclean;
@mephinet
mephinet / sample.pl
Last active April 22, 2017 21:45
sample Log::Any user
use warnings;
use strict;
use Log::Any::Adapter;
use Log::Any '$log';
use File::Basename;
BEGIN { $ENV{LOG_PREFIX} = 'elapsed'; }
@mephinet
mephinet / stringify.t
Created October 25, 2016 10:17
Unittest for Log::Any stringification of refs
#! /usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Log::Any '$log';
use Log::Any::Adapter 'Test';
use URI;
@mephinet
mephinet / cp1252.txt
Last active August 5, 2016 09:36
File::Slurper side-effect
污瑩渱⁴敳琠灡牡杲慰栺੾ਰ砲ㄠ℠へ㈲•‰砲㌠⌠へ㈴․‰砲㔠┠ਰ砲㘠☠へ㈷‧‰砲㠠⠠へ㈹
‰砲愠⨠ਰ砲戠⬠へ㉣‬‰砲搠ⴠへ㉥‮‰砲映⼠ਰ砳〠〠へ㌱‱‰砳㈠㈠へ㌳″‰砳㐠㐠ਰ砳㔠㔠へ㌶‶‰砳㜠㜠へ㌸‸‰砳㤠㤠ਰ砳愠㨠へ㍢※‰砳挠㰠へ㍤‽‰砳攠㸠ਰ砳映㼠へ㐰⁀‰破ㄠ䄠へ㐲⁂‰破㌠䌠ਰ破㐠䐠へ㐵⁅‰破㘠䘠へ㐷⁇‰破㠠䠠ਰ破愠䨠へ㑢⁋‰破挠䰠へ㑤⁍‰破攠丠ਰ破映传へ㔰⁐‰砵ㄠ儠へ㔲⁒‰砵㌠匠ਰ砵㐠吠へ㔵⁕‰砵㘠嘠へ㔷⁗‰砵㠠堠ਰ砵㤠夠へ㕡⁚‰砵戠嬠へ㕣⁜‰砵搠崠ਰ砵攠帠へ㕦 ‰砶〠怠へ㘱⁡‰砶㈠戠ਰ砶㌠挠へ㘴⁤‰砶㔠攠へ㘶⁦‰砶㜠朠ਰ砶㠠栠へ㘹⁩‰砶愠樠へ㙢‰砶挠氠ਰ砶搠洠へ㙥‰砶映漠へ㜰⁰‰砷ㄠ焠ਰ砷㈠爠へ㜳⁳‰砷㐠琠へ㜵⁵‰砷㘠瘠ਰ砷㜠眠へ㜸⁸‰砷㤠礠へ㝡⁺‰砷戠笠ਰ砷挠簠へ㝤⁽‰砷攠縠へ愰₠‰硡ㄠꄠਰ硡㈠ꈠへ愳₣‰硡㐠ꐠへ愵₥‰硡㘠꘠ਰ硡㜠꜠へ愸₨‰硡㤠ꤠへ慡₪‰硡戠ꬠਰ硡挠갠へ慥₮‰硡映꼠へ戰₰‰硢ㄠ넠ਰ硢㈠눠へ戳₳‰硢㐠될へ戵₵‰硢㘠똠ਰ硢㜠뜠へ戸₸‰硢㤠뤠へ扡₺‰硢戠묠ਰ硢挠밠へ扤₽‰硢攠븠へ扦₿‰硣〠쀠ਰ硣ㄠ선へ挲⃂‰硣㌠쌠へ挴⃄‰硣㔠씠ਰ硣㘠옠へ挷⃇‰硣㠠젠へ挹⃉‰硣愠쨠ਰ硣戠쬠へ捣⃌‰硣搠촠へ捥⃎‰硣映켠ਰ硤〠퀠へ搱⃑‰硤㈠툠へ搳⃓‰硤㐠퐠ਰ硤㔠픠へ搶⃖‰硤㜠휠へ搸⃘‰硤㤠�ਰ硤愠�へ摢⃛‰硤挠�へ摤⃝‰硤攠�ਰ硤映�へ攰⃠‰硥ㄠへ攲⃢‰硥㌠ਰ硥㐠へ攵⃥‰硥㘠へ攷⃧‰硥㠠ਰ硥㤠へ敡⃪‰硥戠へ散⃬‰硥搠ਰ硥攠へ敦⃯‰硦〠へ昱⃱‰硦㈠ਰ硦㌠へ昴⃴‰硦㔠へ昶⃶‰硦㜠ਰ硦㠠へ昹⃹‰硦愠蘒へ晢⃻‰硦挠ﰠਰ硦搠ﴠへ晥⃾‰硦映@੾੣瀱㈵㈠瑥獴⁰慲慧牡灨㨊縊へ㠰₀‰砸㈠舠へ㠳₃‰砸㐠萠へ㠵₅ へ㠶₆‰砸㜠蜠へ㠸₈‰砸㤠褠へ㡡₊ へ㡢₋‰砸挠谠へ㡥₎‰砹ㄠ鄠へ㤲ₒ へ㤳ₓ‰砹㐠鐠へ㤵ₕ‰砹㘠阠へ㤷ₗ へ㤸ₘ‰砹㤠餠へ㥡ₚ‰砹戠鬠へ㥣ₜ へ㥥₞‰砹映鼠੾�
@mephinet
mephinet / test.pl
Last active May 6, 2016 14:51
Ox issue with Path::Router 0.15
#! /usr/bin/env perl
package My::Types;
use me::inlined;
use Moose::Util::TypeConstraints;
use namespace::autoclean;
enum 'Customer', [qw(ACME Foo)];
package Web;
@mephinet
mephinet / tcm2.pl
Created April 27, 2016 16:23
Test::Class::Moose: subclasses no longer export 'ok' and friends
#! /usr/bin/env perl
package Test_Parent;
use Test::Class::Moose;
use namespace::autoclean;
package Test_Child;
use Test::Class::Moose extends => 'Test_Parent';
use namespace::autoclean;