Skip to content

Instantly share code, notes, and snippets.

View kablamo's full-sized avatar
🍨
wish i was eating ice cream instead

Eric Johnson kablamo

🍨
wish i was eating ice cream instead
View GitHub Profile
@kablamo
kablamo / find_missing_tests.pl
Created February 3, 2014 13:44
This script finds all the example queries in the DDG::Goodie namespace and checks to see which ones are tested. The ones that are not tested are printed out.
#!/usr/bin/env perl
use strict;
use warnings;
use v5.10.1;
use Clone qw/clone/;
use DDP;
use List::AllUtils qw/first_index/;
use PPI;
@kablamo
kablamo / create_missing_goodie_tests.pl
Last active August 29, 2015 13:56
Create tests for example queries in DDG::Goodie::* with no tests
#!/usr/bin/env perl
use strict;
use warnings;
use v5.19.6;
use Class::Load ':all';
use Path::Tiny;
use PPI;
use List::AllUtils qw/first_index/;
@kablamo
kablamo / create_missing_spice_tests.pl
Created February 28, 2014 22:18
Create tests for example queries in DDG::Spice::* with no tests
#!/usr/bin/env perl
use strict;
use warnings;
use v5.19.6;
use Class::Load ':all';
use Path::Tiny;
use PPI;
use List::AllUtils qw/first_index/;
@kablamo
kablamo / perl testing synopsis.md
Last active September 9, 2015 23:50
perl testing talk description

The Perl test ecosystem

How to write tests in Perl. An exploration of CPAN test libraries.

Topics

Prove

  • Test directory layout
  • Test::More
  • TAP
@kablamo
kablamo / repl.pl
Created January 5, 2011 11:09
$HOME/.re.pl/repl.rc
use lib 'lib';
use feature qw(say);
use Term::ANSIColor;
no warnings 'redefine';
my @plugins = (
'ReadLineHistory', # history saved across sessions
'Colors', # colorize return value and errors
'FancyPrompt', # provide an irb-like prompt
@kablamo
kablamo / id_dsa.pub
Created June 6, 2011 01:58
public key
ssh-dss AAAAB3NzaC1kc3MAAACBAKAkFkdwGP5EzpIq8FV//xIyY0SKTreYedyw82VeVIkxVh5H7NcyV6Qqea5cbm/jqC0/ycK2aWriRPJCCrNC/i8XerMd66dF5/vWYzJhvEHS7y5lIMgeg7qag4o1H60LPpaGxgqoOuR0AYwgf2UofQXwSncwPZzQ5N1TRO7+awHDAAAAFQD9pvu3jVbWcdw1lIJT/z8DN/AndQAAAIAwTrepDGQSwVpC0GVqNiEleOAl4WY6oBToFeavnS0k7zGQcmRE4WgL67G3sCxW1pgueD8OrcdMa6T7PRQnIIl9srU6t8c6ZuedfP92g1Fo6EiYGACBdbtSMqcY4qwqt6hsF0E6nYj7MG0XcTrmG3aikoSarVq2bR5rkZzSOLl+RAAAAIBy1V0pMClbIkc/ayRdgPfMid76IZaH64tyNt3HeQ16+f7lwCmfhfkeP/hZyJ3HPctpZ0AWAR+u9dk3xzsBBbwnoeHR3X2qZvuTZIGPLe9Jy6y72rFYKcMOw72IHa+ViHVM5Ccd9alvrOy2u+T5K6ms/rGTjzEyI/2wePIyye7/9A==
@kablamo
kablamo / git-spark
Last active December 11, 2015 12:08
'git spark -days 30 Batman' gives you a sparkline graph of Batman's commit history over the last 30 days
#!/usr/bin/env perl
# Inspired by @trisweb:
# http://github.com/holman/spark/wiki/Wicked-Cool-Usage
use strict;
use warnings;
use Getopt::Long::Descriptive;
use Encode qw/encode decode/;
use DateTime;
@kablamo
kablamo / handles.pl
Created March 20, 2018 23:49
Moo delegation example
#!/usr/bin/env perl
package MyObject;
use Moo;
use Path::Tiny;
has file => (is => 'lazy', handles => [qw/slurp/]);
sub _build_file { path("./handles.pl") }