Skip to content

Instantly share code, notes, and snippets.

@neilb
neilb / hacked-lib-overload-t.pl
Created March 8, 2022 09:51
This is my modified version of $PERL/lib/overload.t, with changes that make the testsuite pass on a taint-free perl
#!./perl -T
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require Config;
if (($Config::Config{'extensions'} !~ m!\bList/Util\b!) ){
print "1..0 # Skip -- Perl configured without List::Util module\n";
exit 0;
}
@neilb
neilb / optionally.pm
Created April 4, 2021 11:03
Another experimental module playing around with optional loading of other modules
package optionally;
# don't use this
#
# this was an experiment in loading modules optionally, so you can write:
#
# use optionally;
# optionally use Module::Foo 1.23 qw/ function1 function2 /;
#
@neilb
neilb / optionally.pm
Last active April 4, 2021 11:15
An experimential module that uses Keyword::Simple to provide syntax for optionally loading a module
package optionally;
# optionally load a module and import functions
#
# Syntax:
#
# use optionally;
# optionally use Module::Foo 1.37 function1 function2;
#
# This was an experiment, and is not at all ready for real use.
@neilb
neilb / optionally.pm
Created April 4, 2021 10:49
A module for optionally loading other modules and importing functions from them
package optionally;
# optionally load a module and import functions
#
# use optionally 'Some::Module', '1.23', qw/ fnA fnB /;
#
use 5.010;
use strict;
use warnings;
@neilb
neilb / losing-first-come.t
Created October 17, 2020 22:22
PAUSE test that shows primeur-only first-come is lost if a co-maint does a release
#
# losing-first-come.t
#
# This test was written to demonstrate a bug that is causing authors
# to lose a first-come permission, in a particular setup and release scenario.
#
# Setup:
# user FORD has first-come on package Guide (but an entry in `primeur` only)
# user ARTHUR has co-maint on package Guide (an entry in `perms`)
#
@neilb
neilb / solve-wordsearch.pl
Created September 2, 2020 21:16
A perl script to solve a word search puzzle
#!/usr/local/bin/perl
#
# solve-wordsearch - search for words (from a word list) in a wordsearch grid
#
use strict;
use warnings;
use v5.20;
use feature qw/ signatures /;
no warnings qw/ experimental::signatures /;
use File::Slurper qw/ read_lines /;
@neilb
neilb / usa-state-data.json
Created June 24, 2019 22:27
States of the USA, with adjacency information, and some other stuff
{
"AL": { "name": "Alabama", "initials": "a", "adjacent": ["FL", "GA", "TN", "MS"] },
"AK": { "name": "Alaska", "initials": "a", "adjacent": [] },
"AZ": { "name": "Arizona", "initials": "a", "adjacent": [ "NM", "UT", "NV", "CA"] },
"AR": { "name": "Arkansas", "initials": "a", "adjacent": [ "LA", "MS", "TN", "MO", "OK", "TX"] },
"CA": { "name": "California", "initials": "c", "adjacent": [ "AZ", "NV", "OR"] },
"CO": { "name": "Colorado", "initials": "c", "adjacent": [ "NM", "OK", "KS", "NE", "WY", "UT"] },
"CT": { "name": "Connecticut", "initials": "c", "adjacent": [ "RI", "MA", "NY"] },
"DE": { "name": "Delaware", "initials": "d", "adjacent": [ "NJ", "PA", "MD"] },
"FL": { "name": "Florida", "initials": "f", "adjacent": [ "GA", "AL"] },
@neilb
neilb / pts-sponsors-2019.md
Last active May 1, 2019 07:07
Sponsors for the Perl Toolchain Summit 2019
@neilb
neilb / trust.xml
Created February 28, 2018 14:12
ADFS relying trust file
<?xml version="1.0" encoding="utf-8"?>
<EntityDescriptor ID="_deadbeef-dead-beef-dead-beefdead" entityID="[BASE-URL]" xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
<RoleDescriptor xsi:type="fed:ApplicationServiceType" xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706" protocolSupportEnumeration="http://docs.oasis-open.org/wsfed/federation/200706" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fed:ClaimTypesRequested>
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" Optional="true" xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706" />
<auth:ClaimType Uri="http://schemas.microsoft.com/ws/2008/06/identity/claims/role" Optional="true" xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706" />
</fed:ClaimTypesRequested>
<fed:TargetScopes>
<EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
<Address>[BASE-URL]</Address>