Skip to content

Instantly share code, notes, and snippets.

View wolfsage's full-sized avatar

Matthew Horsfall (alh) wolfsage

View GitHub Profile
mhorsfall@tworivers:~$ cat unless.pl
use strict;
use warnings;
my @strs = (
'$x = do { unless ("cat" eq "cat") { } };',
'$x = do { unless ("cat" ne "cat") { } };',
'$x = do { if ("cat" eq "cat") { } };',
'$x = do { if ("cat" ne "cat") { } };',
);
@wolfsage
wolfsage / bug.txt
Created August 29, 2018 17:33
bug.txt
alh@hyrule:~/pobox/git$ cat pass.t
use Test2::API qw(run_subtest);
use Test::More;
run_subtest("foo", sub {
local $TODO = "what";
ok(1, "test");
});
done_testing;
mhorsfall@tworivers:~$ perl p.pl em.txt
PART: Content-Type: text/plain
Do you know everyone in your neighborhood?. View Important Details Here> http://todayonly.kniet.club/extension/3740108_kidssafety
..f71ce26f441537ac7e845ad61dce51bc
can't get body as a string for text/plain at /usr/local/share/perl/5.18.2/Email/MIME.pm line 342.
Email::MIME::body_str('Email::MIME=HASH(0x12d6470)') called at p.pl line 82
main::_is_administrivia('Email::MIME=HASH(0x1089858)') called at p.pl line 16
In some cases nano will try to dump the buffer into an emergency file.
This will happen mainly if nano receives a SIGHUP or SIGTERM or runs
out of memory. It will write the buffer into a file named nano.save if
the buffer didn't have a name already, or will add a ".save" suffix to
the current filename. If an emergency file with that name already
exists in the current directory, it will add ".save" plus a number
(e.g. ".save.1") to the current filename in order to make it unique.
In multibuffer mode, nano will write all the open buffers to their
respective emergency files.
Accepted design:
user
user_id
foo
bar
user_info
user_info_id
user_id
@wolfsage
wolfsage / gist:8291610
Created January 6, 2014 23:10
My attempt at producing dubstep
mhorsfall@Fireforge:~$ cat wobble.pm
package wobble;
use strict;
use warnings;
sub import {
my ($self, $into) = @_;
my $method = "$into\::drop";
mhorsfall@darmstadtium:~$ perl -MCloudPAN2 -Mojo -E 'say g("http://checkip.dyndns.org/")->body'
readline() on closed filehandle $entities at /loader/0xc41090/Mojo/Util.pm line 31.
<html><head><title>Current IP Check</title></head><body>Current IP Address: 173.199.227.254</body></html>
#!/usr/bin/perl
use strict;
use warnings;
use IPC::Shareable;
my %hash;
my $t = tie %hash, 'IPC::Shareable';
@wolfsage
wolfsage / quadratic.dc
Last active October 12, 2015 08:07
Quadratic Equation solver in dc (reverse polish calculator)
# Usage: dc < quadratic.dc
# Shortened to: dc -e '1 3 _4 2kscsbsa[X=]sf[lb2^4lalc**-v]sdlb_1*ldx-2la*/lfPplb_1*ldx+2la*/lfPp'
# Solves:
# x^2 + 3x – 4 = 0
1 # A
3 # B
_4 # C
mhorsfall@darmstadtium:~/git/cpan-api$ bin/metacpan release authors/TEST/
2012/03/31 04:49:49 I release: Looking for tarballs in authors/TEST/
2012/03/31 04:49:49 W release: /home/mhorsfall/CPAN/modules/06perms.txt could not be found.
2012/03/31 04:49:49 I release: Processing authors/TEST/Template-Simple-0.05.tar.gz
Use of uninitialized value $_[0] in join or string at /usr/local/share/perl/5.12.4/ElasticSearchX/Model/Util.pm line 18.
Use of uninitialized value $pauseid in substr at /home/mhorsfall/git/cpan-api/bin/../lib/MetaCPAN/Util.pm line 38.
Use of uninitialized value $pauseid in substr at /home/mhorsfall/git/cpan-api/bin/../lib/MetaCPAN/Util.pm line 38.
Use of uninitialized value $pauseid in sprintf at /home/mhorsfall/git/cpan-api/bin/../lib/MetaCPAN/Util.pm line 38.
2012/03/31 04:49:49 F release: encountered object 'authors/TEST/Template-Simple-0.05.tar.gz', but neither allow_blessed nor convert_blessed settings are enabled at /usr/local/share/perl/5.12.4/ElasticSearch/Transport.pm line 210.