Skip to content

Instantly share code, notes, and snippets.

View robin-a-meade's full-sized avatar

Robin A. Meade robin-a-meade

View GitHub Profile
@robin-a-meade
robin-a-meade / perl-iolayers-demo.pl
Last active April 17, 2022 21:48
perl io layers and -CSDA demo
#!/bin/perl
#!/bin/perl -CSDA # Try this variation
use v5.16.3;
use warnings;
use File::Temp qw(tempfile tempdir);
my @layers;
print 'tmp layers: ';
@robin-a-meade
robin-a-meade / binsearch-demo.pl
Created April 16, 2022 07:36
Binary search in perl esp. for finding closest element
#!/bin/perl
# Binary search in perl
# https://www.perlmonks.org/?node_id=920127
# Useful for finding closest element
# https://www.perlmonks.org/?node_id=927656
sub _unsigned_to_signed { unpack('j', pack('J', $_[0])) }
sub binsearch(&$\@) {
@robin-a-meade
robin-a-meade / demo-upgrade.pl
Last active January 14, 2026 19:55
perl template boilerplate preamble
#!/usr/bin/env perl
# Demo showing when Perl upgrades strings from bytes to Unicode
use v5.16.3;
use warnings;
use warnings qw(FATAL utf8);
use utf8;
use open qw(:std :utf8);
use Encode qw(decode_utf8);
@robin-a-meade
robin-a-meade / hello.raku
Last active April 16, 2022 00:56
Raku requires the 'v' in version for the 'use' program
#!/usr/bin/env raku
# The following `use` pragma requires the leading 'v' in the version specification, or you'll get
# an error:
#
# in Raku please use "v" prefix for pragma (e.g., "use v6;", "use v6.c;") instead
#
# The relevant documention page shows only examples with the 'v'
# https://docs.raku.org/language/pragmas
@robin-a-meade
robin-a-meade / Icons.md
Last active April 29, 2025 00:33
'Icons

Icons

Site Icon
Google image
Gmail image
Cal image
Drive image
Meet image
@robin-a-meade
robin-a-meade / Readme.md
Last active January 7, 2022 02:58
Bash script to lookup the creation date of a reddit post or comment

reddit_created — A bash script to lookup the creation date of a reddit post or comment

Example

[robin@laptop ~] $ reddit_created https://www.reddit.com/r/redditisfun/comments/48dk3e/see_actual_date_of_comment_instead_of_2_months/
Mon Feb 29 02:41:34 PM HST 2016
Tue Mar  1 12:41:34 AM GMT 2016
@robin-a-meade
robin-a-meade / 'Minimal config for shell and vim.md
Last active February 15, 2025 06:50
Minimal config for shell and vim

Quick minimal config for shell and vim

For when a full dotfiles setup is overkill.

Installation Instructions

curl https://gist.githubusercontent.com/robin-a-meade/b83dd635076993c4c25b7115d0b5da32/raw/install.sh | bash
@robin-a-meade
robin-a-meade / !Test_case_for_pasting_into_GDoc.md
Last active March 11, 2023 21:36
Test case for pasting into GDoc

GDoc bug?

I've found that pasting into a Google Document produces an unexpected result.

Minimal test case

Copy the following minimal test case:

A link

and paste it into a GDoc.

@robin-a-meade
robin-a-meade / 'Using maven as a downloader.md
Last active February 23, 2022 19:51
Using maven as a downloader

Using maven as a downloader

I needed to download Oracle JDBC jar files for use with my database query tool. Oracle JDBC drivers have been available in the public official Maven repository since September 15, 2019. They extended it to include all supported releases in February, 2020. (link1 [link2] [link3] [link4]).