I hereby claim:
- I am ovid on github.
- I am ovidperl (https://keybase.io/ovidperl) on keybase.
- I have a public key ASDsbYunRavQwS2b6ZR7TER9LwNC4YtX7oDIqaGPu6URwAo
To claim this, I am signing this object:
#!/usr/bin/env perl | |
use 5.18.0; | |
use warnings; | |
use autodie ":all"; | |
use LWP::UserAgent; | |
use HTTP::Request::Common; | |
use HTML::TokeParser::Simple; | |
my $login_url = 'https://www.livejournal.com/login.bml?ret=1'; |
#!/bin/bash | |
# vim: filetype=sh | |
set -e # exit if any command fails | |
prog=$(basename $0) | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
need_to_stash=$(git status --porcelain -uno) |
#!/usr/bin/env perl | |
# This program constantly prints the time in GCT (Galactic Coordinated Time) | |
# as used in the MMORPG Tau Station (https://taustation.space/) | |
# Obviously, we use something a bit more sophisticated than this :) | |
use strict; | |
use warnings; | |
use Time::HiRes 'sleep'; | |
$|++; # unbuffer STDOUT |
# Turns out this doesn't work because OrderedHash | |
# is sorted, not ordered | |
class Cache::LRU { | |
use OrderedHash; | |
has %.cache = {} does OrderedHash; | |
has UInt $.max_size = 20; | |
method get($key) { | |
return %.cache{$key}; | |
} |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env perl | |
use Test::Most; | |
use Veure::Script; # strict, warnings, postderef, sigs, and more | |
use re 'eval'; # needed for (??{}) in the regex | |
# the (??{}) construct will execute code and consider the result of that | |
# to be a regex to match on. | |
my $yyyy_mm_dd = qr/ | |
^ | |
# any four digit year |
package Less::Boilerplate; | |
use 5.26.0; | |
use strict; | |
use warnings; | |
use feature (); |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
binmode STDOUT, ':utf8_strict'; | |
my $num = shift; | |
if ( $num < 1 || $num != int($num) ) { | |
die "'$num' is not a positive integer"; | |
} |
#!/usr/bin/env perl | |
# ALTER TABLE syntax in SQLite is very limited. This script follows the pattern | |
# outlined in https://www.sqlite.org/lang_altertable.html to make it easier to | |
# alter a table in SQLite | |
# this script is designed to use core Perl so that non-Perl users can use it | |
use 5.6.1; # minimum version for File::Temp | |
use strict; | |
use warnings; |