Skip to content

Instantly share code, notes, and snippets.

View kentfredric's full-sized avatar
🤔

Kent Fredric kentfredric

🤔
View GitHub Profile
#!perl
use strict;
use warnings;
use 5.022000;
# Note missing semi-colon
my $x
@kentfredric
kentfredric / great.pl
Last active June 25, 2016 13:15
Sub::Name controls method resolution order ...
#!perl
use strict;
use warnings;
use MRO::Compat;
use Sub::Name qw( subname );
my $recursions = 0;
my $prefix = "";
#!perl
use strict;
use warnings;
use File::Temp;
my @waits;
my $workdir = File::Temp->newdir(
TMPDIR => 1,
);
use 5.006; # our
use strict;
use warnings;
package Dist::Zilla::App::Command::testcase;
our $VERSION = '0.001000';
use Dist::Zilla::App '-command';
#!perl
use strict;
use warnings;
use Path::Tiny qw( path cwd );
use Capture::Tiny qw( capture_stdout );
use Data::Dump qw(pp);
use Gentoo::PerlMod::Version qw( gentooize_version );
use experimental 'signatures';
use HTTP::Tiny;
#!perl
use strict;
use warnings;
return Gentoo::VDB::Explorer->run_if_script;
### Very crappy routing layer
BEGIN {
package Gentoo::VDB::Explorer;
@kentfredric
kentfredric / letwat.mkdn
Last active May 1, 2016 19:20
Dear Internet: Plz to make opensource Uber

Ok, so the TL;DR of Uber vs Taxis:

  • Uber sucks for drivers, Uber basically cheats drivers of securities that they're legally entitled to to save money, getting in hot water with various governments legal systems.

  • Uber kinda rips their employees a new one, taking a significant share of the profits, and subjecting their staff to basically slave labour conditions.

  • But consumers love the convenience of the service esp with Phone interfaces, and consumers are assholes who don't really care about the drivers, because taxi's are annoying and inconvenient and poorly organised.

# First example I did wrong, but shown for posterity.
time curl http://berniespeedtest.com/images/tweet.png -O /dev/null
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 242k 100 242k 0 0 6311 0 0:00:39 0:00:39 --:--:-- 7458
curl: (3) <url> malformed
real 0m39.374s
user 0m0.014s
?: /tmp/7LYkL6zdrB/test_pl/default_1/*
d: /tmp/7LYkL6zdrB/test_pl/default_1/evil
?: /tmp/7LYkL6zdrB/test_pl/default_1/evil/*
d: /tmp/7LYkL6zdrB/test_pl/default_1/evil/*
?: /tmp/7LYkL6zdrB/test_pl/default_1/evil/*/*
f: /tmp/7LYkL6zdrB/test_pl/default_1/evil/**/doublestarfile
f: /tmp/7LYkL6zdrB/test_pl/default_1/evil/*/starfile
f: /tmp/7LYkL6zdrB/test_pl/default_1/evil/child/a
f: /tmp/7LYkL6zdrB/test_pl/default_1/evil/child/b
d: /tmp/7LYkL6zdrB/test_pl/default_1/evil/child/deep
Key:
Public Sub: foo_example
Type Constraint: TypeName
Type Constraint Utility: typeop_TypeName
Private/Boring Sub: foo_example
Public Sub shadowing another: shadowing_example(^)
Public Sub shadowed by higher scope: shadowed_example(_)
Public Sub shadowing another and shadowed itself: shadowed_shadowing_example(^#)
Private/Boring Sub shadowing another: shadowing_example(^)
Private/Boring Sub shadowed by higher scope: shadowed_example(_)