Skip to content

Instantly share code, notes, and snippets.

View ology's full-sized avatar
💭
🤔

Gene Boggs ology

💭
🤔
View GitHub Profile
@ology
ology / .email
Last active February 9, 2022 00:29
This guy comes out of the woodwork after 17 years!
Mr Boggs,
As you well know, and can verify with the following link,
https://metacpan.org/dist/MIDI-Praxis-Variation
as it’s undisputed author, I am the copyright holder on this software.
You will immediately remove your false claim, arrogating copyright unto yourself,
that appears in the latest versions where you are named as maintainer.
You will furthermore stop pilfering bits of it, calling them your own,
@ology
ology / audio-player2.pl
Created August 7, 2021 06:26
Mojo::File->realpath returns "" ?
app->minion->add_task(reencode_audio => sub ($job, @args) {
my $track = Mojo::File->new($args[0]);
my $path = eval { $track->realpath };
$job->app->log->debug($track, 'to', $path);
(my $outfile = $path) =~ s/^(.+?)\.\w+$/$1.mp3/;
my @cmd = (qw(ffmpeg -i), qq/"$path"/, qw(-c:v copy -c:a libmp3lame -q:a 4), qq/"$outfile"/);
$job->app->log->debug("@cmd");
# if(system(@cmd) == 0) {
# $job->app->log->debug($track, 're-encoded');
# }
@ology
ology / blue-monk.pl
Last active May 3, 2021 20:19
Blue Monk MIDI-Perl
#!/usr/bin/env perl
use strict;
use warnings;
use MIDI::Drummer::Tiny;
use MIDI::Chord::Guitar;
use MIDI::Praxis::Variation qw(tie_durations);
use MIDI::Util qw(set_chan_patch);
my $d = MIDI::Drummer::Tiny->new(
@ology
ology / shire.bmp
Last active January 6, 2021 15:09
Windows Shire Time Display
http://ology.net/tmp/shire.bmp
@ology
ology / dbi-websocket.pl
Created July 23, 2020 19:06
DBI + Mojolicious::Lite websocket app
#!/usr/bin/env perl
# https://github.com/mojolicious/mojo/wiki/Writing-websocket-chat-using-Mojolicious-Lite
# +
# http://blogs.perl.org/users/joel_berger/2012/10/a-websocket-mojoliciousdbi-example.html
use Mojolicious::Lite;
use Mojo::JSON qw(decode_json encode_json);
# Connected websocket clients
@ology
ology / git-when.txt
Created April 2, 2020 20:02
A cool metric
git log --author="Your Name" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max,sum0 -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; for (0..23) { $h{$_} = 0 if not exists $h{$_} } for (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*" x ($h{$_} / $m * 50); } say sum0(values %h), " commits"'
@ology
ology / mysqld.t
Last active January 19, 2019 06:52
A working Test::mysqld example on my local machine
#!/usr/bin/env perl
use strict;
use warnings;
use DBI;
use Test::mysqld;
use Test::More;
my $mysqld = Test::mysqld->new(
my_cnf => {