Skip to content

Instantly share code, notes, and snippets.

I don't really have time for this anymore

Peter Sergeant pjlsergeant

I don't really have time for this anymore
Block or report user

Report or block pjlsergeant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pjlsergeant / util-graph.xsl
Created May 8, 2017
BFS algorithm in XSLT
View util-graph.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="" version="2.0">
<!-- Templates which operate on directed graphs -->
<xsl:import href="util-map.xsl"/>
Simple breadth-first search implementation to return a tree from a starting node
<xsl:template name="generate-paths">
pjlsergeant /
Created Nov 17, 2016
First few steps of porting `wrong` to Perl. This is stupid.
# `wrong` in Perl.
use strict;
pjlsergeant /
Created Jul 8, 2016
Simple OO backtracking Sudoku solver
package Sudoku;
package Sudoku::Grid {
use strict;
use warnings;
use Cell;
View gist:fb33fe3bd15cf02865b582c2b1350670
View Test::Mojo and Cucumber
use strict;
use warnings;
use Test::BDD::Cucumber::StepFile;
use Test::Mojo;
# Instantiates a new Test::Mojo object, and save it in the scenario-level stash.
# Rather than do this per-scenario, we'll store a copy in the feature-level and
View gist:0c2415964f3911e6d5bc
### Keybase proof
I hereby claim:
* I am pjlsergeant on github.
* I am pjlsergeant ( on keybase.
* I have a public key whose fingerprint is 24D0 CFF6 6CE6 C9EE 9731 962B AA91 4EB0 D57E E0AC
To claim this, I am signing this object:
View gist:4a40b5bf6ced969c1f8c
* 02 Jun '93: Dave Raggett updates his HTML+ DTD to include support for "INPUT and SELECT form interaction elements"[0]
* 05 Sep '93: Marc Andreessen says NCSA Mosaic 2.0 will submit form parameters as: "name=value&name=value&name=value"[1]
* 13 Sep '93: Rob McCool announces NCSA httpd 1.0a1[2], which supports:
"server scripts, which are executable programs which the server runs to generate documents on the fly. They are easy to write and can be written in your favorite language, whether it be C, PERL, or even the Bourne shell" [3]
* 14 Nov '93: Rob McCool complains that his users are avoiding writing code because they think the interface will change, and throws open a bunch of open-issues he wants fixing in what he calls the "gateway"
View gist:c63fb15a4b1502219097
use strict;
use warnings;
my %digits = map { $_ => 1 } ( 0 .. 9 );
sub choose ($&) {
my ( $set, $sub ) = @_;
map { $sub->($_) } grep { $set->{$_} } keys %$set;
pjlsergeant / output.html
Created Aug 17, 2013
Pause author ID creation over time
View output.html
<script type="text/javascript" src=""></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart","table"]});
function drawChart() {
var data = new google.visualization.DataTable( {
"cols": [
{"id":"date","label":"Month Beginning","type":"date"},
pjlsergeant / gist:6255791
Created Aug 17, 2013
Count new Pause IDs
View gist:6255791
use strict;
use warnings;
use LWP::Simple;
use DateTime;
use Data::Google::Visualization::DataTable;
# Create a datatable
You can’t perform that action at this time.