Skip to content

Instantly share code, notes, and snippets.

View davorg's full-sized avatar
💭
Perlin'

Dave Cross davorg

💭
Perlin'
View GitHub Profile
@davorg
davorg / gist:4321043ca6e926c5eb84
Created December 10, 2015 08:38
Overriding CORE::GLOBAL::open
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
BEGIN {
no strict 'refs';
use Symbol ();
use Devel::Peek;
On Wed, Dec 16, 2015 at 11:37:46AM +0000, Dave Cross <[email protected]> wrote:
> Hi Marc,
>
> It seems that your blog post at
>
> http://blog.schmorp.de/2015-12-15-tidbits-cgipm-a-data-point.html
>
> jumped to some some conclusions that aren't backed up by the facts.
Dave, I am only reporting about that site, and the only newer version of
@davorg
davorg / ages
Created February 1, 2016 15:35
Work out some ages in days
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
use Time::Piece;
use Time::Seconds;
use Lingua::EN::Inflexion;
#!/usr/bin/perl
use strict;
use warnings;
use CGI qw/:standard/;
print header;
##
## property detail - shows a single property
#!/usr/bin/perl
use strict;
use warnings;
use 5.024;
package SVG::TrafficLight;
use Moose;
use SVG;
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
use Storable;
my $hashref;
my $hash_file = 'hashfile';
@davorg
davorg / nme-scraper
Last active December 13, 2018 16:24
Scraping the NME's top 100 albums of 2018
#!/usr/bin/perl -CS
use strict;
use warnings;
use utf8;
use feature 'say';
use Web::Query;
my $page = 'https://www.nme.com/blogs/nme-blogs/' .
@davorg
davorg / blood.cgi
Last active March 5, 2019 08:28
Simple CGI program to answer question on Reddit
#!/usr/bin/perl
use strict;
use warnings;
use CGI qw(param header);
my $title = 'Blood Test';
my $content = param('bloodtype') ? get_results() : get_form();
print header;
@davorg
davorg / wall
Created March 17, 2019 15:03
Wall stuff for T
#!/usr/bin/perl
use strict;
use warnings;
use SVG;
my $PICWIDTH = 22;
my $svg = SVG->new(width => 184, height => 200);
@davorg
davorg / challenge01
Last active July 29, 2019 14:42
Perl Weekly Challenge #19 / Task #1
#!/usr/bin/perl
#
# Perl Weekly Challenge #19 / Task #1
#
# Write a script to display months from the year 1900 to 2019 where
# you find 5 weekends i.e. 5 Friday, 5 Saturday and 5 Sunday.
use strict;
use warnings;
use feature 'say';