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 / response.md
Last active February 5, 2019 19:17
Response to "Writing Secure Shell Scripts"
@robin-a-meade
robin-a-meade / README.md
Last active August 30, 2019 01:00
fonts.config to switch from DejaVu to Liberation

Switch to Liberation from DejaVu for better font-handling in Firefox

Test page: https://en.wikipedia.org/wiki/User:Kaldari/Font_test

Firefox defaults to the system defaults, so it's best to make the change at the system level than in Firefox preferences.

First, check current defaults

for family in serif sans-serif monospace Arial Helvetica Verdana "Times New Roman" "Courier New"; do
@robin-a-meade
robin-a-meade / README.md
Last active May 2, 2020 17:43
A patch to make vpn-indicator-shell-extension work for SNX
@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 / '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]).

@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 / 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 / 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 / lipsum
Last active July 1, 2022 21:18 — forked from candu/lipsum
Command-line Lorem Ipsum generator using curl, lipsum.com, and jq
#!/bin/sh
AMOUNT=5
WHAT=paras
START=false
MARKDOWN_PARAGRAPHS= # Insert a blank line between paragraphs, like Markdown
HARD_WRAP=
WIDTH=78
while getopts ":n:wpblsmhW:" opt; do