Skip to content

Instantly share code, notes, and snippets.

@kgoess
kgoess / skip_paths.diff
Created June 28, 2019 18:20
skip_paths for mojo nytprof plugin
diff --git a/lib/Mojolicious/Plugin/NYTProf.pm b/lib/Mojolicious/Plugin/NYTProf.pm
index 460ee62..8ae7b29 100644
--- a/lib/Mojolicious/Plugin/NYTProf.pm
+++ b/lib/Mojolicious/Plugin/NYTProf.pm
@@ -112,20 +112,27 @@ Here's what you can control in myapp.conf:
# Devel::NYTProf environment options, see the documentation at
# https://metacpan.org/pod/Devel::NYTProf#NYTPROF-ENVIRONMENT-VARIABLE
# for a complete list. N.B. you can't supply start or file as these
# are used internally in the plugin so will be ignored if passed
env => {
@kgoess
kgoess / mojo-nytprof-plugin.diff
Created June 28, 2019 00:10
test case for nytprof with callbacks.
diff --git a/t/lib/ExampleApp.pm b/t/lib/ExampleApp.pm
index 8bfc57a..06c1aca 100644
--- a/t/lib/ExampleApp.pm
+++ b/t/lib/ExampleApp.pm
@@ -13,13 +13,16 @@ sub startup {
pre_hook => 'before_routes',
post_hook => 'around_dispatch',
},
});
@kgoess
kgoess / Locale-TextDomain-OO-Extract-2.015.diff
Created June 18, 2019 17:20
Adds support for concatenation and template literals
diff -u -Nar -U20 Locale-TextDomain-OO-Extract-2.015.orig/lib/Locale/TextDomain/OO/Extract/JavaScript.pm Locale-TextDomain-OO-Extract-2.015/lib/Locale/TextDomain/OO/Extract/JavaScript.pm
--- Locale-TextDomain-OO-Extract-2.015.orig/lib/Locale/TextDomain/OO/Extract/JavaScript.pm 2017-09-28 01:02:36.000000000 -0700
+++ Locale-TextDomain-OO-Extract-2.015/lib/Locale/TextDomain/OO/Extract/JavaScript.pm 2019-06-17 16:54:46.000000000 -0700
@@ -34,70 +34,98 @@
return $condition ? @list : ();
};
my $with_bracket = join "\n| ", (
$list_if->('Gettext', '__? n? p? x?',
'n? p? gettext'),
$list_if->('Gettext::DomainAndCategory', '__? d? c? n? p? x?',
@kgoess
kgoess / 20180315.txt
Last active April 12, 2018 15:38
board minutes 2018-03-15
Board Meeting Minutes March 15, 2018
Meeting called to order at 8:10
Attending:
Yoyo Z.
Sharon G.
Sharyn P.
Jens D.
Alan W.
Eric B.
@kgoess
kgoess / xx.t
Created June 2, 2017 15:23
mojo test
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 98;
use Test::Mojo;
package MyApp {
# the "current" link is what the app should use
# "upcoming current" is where the updated files get written to
#
# start off with it pointing to tempdir1
reigate:xx kevin$ lsl
total 16
drwxr-xr-x 2 kevin staff 68 Jan 7 21:07 tempdir2/
drwxr-xr-x 2 kevin staff 68 Jan 7 21:11 tempdir1/
lrwxr-xr-x 1 kevin staff 8 Jan 7 21:12 current@ -> tempdir1
$ cat long-test.pl
use strict;
use warnings;
use Benchmark;
# build a regex with a lot of alternations
my $r = '';
for my $l ('a'..'y', 'A'..'Y'){
$r .= $l x 10;
--- /home/kevin/git/libwww-perl/lib/LWP/Protocol/http.pm 2014-06-10 13:05:28.383259747 -0700
+++ /home/kevin/mylib/lib/perl5/LWP/Protocol/http.pm 2014-06-16 16:32:27.979196405 -0700
@@ -196,21 +196,22 @@
$socket = $upgrade_sub->($proto_https,
$response->{client_socket},$url)
or die "SSL upgrade failed: $@";
} else {
$socket = $proto_https->_new_socket($url->host,$url->port,$timeout);
}
}
package LWPx::Protocol::https_paranoid;
# $Id: https_paranoid.pm 2 2005-06-01 23:12:25Z bradfitz $
use strict;
# Changing Method Resolution Order because the original https inherited
# from http. But now we want to search for methods first in the original
# https, *then* in the new http_paranoid, and only last in the original http.
use mro 'c3';
package LWPx::Protocol::http_paranoid;
use strict;
require LWP::Debug;
require HTTP::Response;
require HTTP::Status;
require Net::HTTP;