Skip to content

Instantly share code, notes, and snippets.

View ilmari's full-sized avatar

Dagfinn Ilmari Mannsåker ilmari

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ilmari on github.
  • I am ilmari (https://keybase.io/ilmari) on keybase.
  • I have a public key whose fingerprint is 1810 6714 A5F0 E9B4 11C0 7CA7 1065 888F D355 CB63

To claim this, I am signing this object:

=head1 PSGI Middleware and the Future of Catalyst
The PSGI specification describes middleware as:
=over 4
"A middleware component takes another PSGI application and runs it. From the perspective of a server, a middleware component is a PSGI application. From the perspective of the application being run by the middleware component, the middleware is the server. Generally, this will be done in order to implement some sort of pre-processing on the PSGI environment hash or post-processing on the response."
=back
@ilmari
ilmari / output.txt
Created September 11, 2015 11:54
t/tester.t verbose failure
$ prove -e perl6 -lrv t/tester.t
t/tester.t ..
1..2
t/win.t .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.14 cusr 0.02 csys = 0.18 CPU)
Result: PASS
ok 1 - what should pass, passes
# Failed test at t/fail.t line 3
mysql> select name from school_region where name != '' order by name;
+------------------+
| name |
+------------------+
| East |
| East Midlands |
| London |
| North East |
| North West |
| Northern Ireland |
@ilmari
ilmari / config.yml
Created September 2, 2011 16:08
Config merge problem
plugins:
DBIC:
Foo:
schema_class: "MyApp::Schema"
options:
mysql_enable_utf8: 1
on_connect_call:
- "set_strict_mode"
OtherPlugin:
some_setting: bar
#!perl
use Test::More;
use Test::Fatal;
use MooseX::Types::Moose qw(ArrayRef HashRef Value);
use MooseX::Types -declare => [
qw(StructHash StructArray Struct)
];
#!perl
use Test::More;
use Test::Fatal;
use MooseX::Types::Moose qw(ArrayRef HashRef Value);
use MooseX::Types -declare => [
qw(StructHash StructArray Struct)
];
$ +{ count_by { $_->status } grep { $_->server_id < 10**7 } @orders }
$HASH1 = {
cancelled => 2,
despatched => 5,
packed => 4,
partial => 20,
pending => 1,
printing => 337
};
diff --git a/lib/HTML/FormHandler/Widget/Field/Select.pm b/lib/HTML/FormHandler/Widget/Field/Select.pm
index fe990df..c63cf43 100644
--- a/lib/HTML/FormHandler/Widget/Field/Select.pm
+++ b/lib/HTML/FormHandler/Widget/Field/Select.pm
@@ -45,7 +45,6 @@ sub render {
$output .= ' selected="selected"';
}
}
- $output .= $ele_attributes;
my $label = $option->{label};
@ilmari
ilmari / gist:2911517
Created June 11, 2012 17:41
IE VM script
#!/bin/sh
case "$1" in
''|9) n=107;;
9v) n=106;;
8) n=105;;
7) n=104;;
*) echo 'Usage: ie [9|9v|8|7]' 2>&1; exit 1;;
esac