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 / maven-versions-plugin ignore versions.md
Last active April 14, 2024 08:42
maven-versions-plugin How to ignore alpha beta release candidate and milestone versions

maven-versions-plugin: How to ignore alpha, beta, release candidate, and milestone versions

Introduction

By default, maven does not ignore versions ending with qualifier strings when searching for the latest version of an artifact.

For example, versions ending with -alpha, -beta3, -M-2, and -RC1 will be considered as valid upgrade candidates.

Consider the case of your project having a dependency on version 3.2.1 of a certain artifact and 3.3.0-beta is released. The maven-versions-plugin will, by default, consider that to be valid upgrade.

@robin-a-meade
robin-a-meade / deps_to_classpath
Last active March 30, 2024 19:49
resolve dependencies and print classpath. This is a wrapper around `jbang info classpath`.
#!/bin/bash
# NAME
# deps_to_classpath - resolve dependencies and print classpath
#
# SYNOPSIS
# deps_to_classpath [OPTIONS] DEP...
#
# EXAMPLE
# Suppose you are evaluating different HTML parsers to use with saxon. You
@robin-a-meade
robin-a-meade / unofficial-bash-strict-mode.md
Last active March 24, 2024 17:21
Unofficial bash strict mode

Unofficial Bash Strict Mode

Sometimes a programming language has a "strict mode" to restrict unsafe constructs. E.g., Perl has use strict, Javascript has "use strict", and Visual Basic has Option Strict. But what about bash? Well, bash doesn't have a strict mode as such, but it does have an unofficial strict mode:

set -euo pipefail

set -e

@robin-a-meade
robin-a-meade / perl-template.pl
Last active April 29, 2023 19:13
perl template boilerplate
#############################################################################
# BEGIN MODERN PERL BOILERPLATE #
#############################################################################
# Use perl v5.16.3
# (We're tracking RHEL7 as our baseline)
# Note:
# - `use v5.12` or higher implies `use strict`
# https://stackoverflow.com/q/6050031
# https://perldoc.perl.org/feature
@robin-a-meade
robin-a-meade / Sample output
Created April 9, 2023 06:34
Check the gnome extension packages in the Fedora repo for any that are not compatible with the currently running version of Gnome
Checking for existence of jq command ..... Y
Checking for existence of rpm2cpio command ..... Y
Checking for existence of cpio command ..... Y
You are running Fedora 38
You are running Gnome 44
There are 43 packages matching the pattern 'gnome-shell-extension-*'
1 gnome-shell-extension-appindicator-0:53-1.fc38.noarch
2 gnome-shell-extension-apps-menu-0:44.0-1.fc38.noarch
3 gnome-shell-extension-argos-0:3^20220712git1180568-2.fc38.noarch
4 gnome-shell-extension-auto-move-windows-0:44.0-1.fc38.noarch
@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 / Icons.md
Last active February 27, 2023 19:50
'Icons

Icons

Site Icon
Google image
Gmail image
Cal image
Drive image
Meet image
@robin-a-meade
robin-a-meade / 'Minimal config for shell and vim.md
Last active February 24, 2023 01:18
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 / .gitignore
Last active November 15, 2022 09:53
Webpack detects ESM modules automatically
/main.js
/node_modules
/package-lock.json
@robin-a-meade
robin-a-meade / README.md
Last active August 21, 2022 04:05
How to use ESM modules with NodeJS

How to use ESM modules with NodeJS

Excerise 1: Clone the gist and run the examples

  1. Create a temporary directory and cd into it
  2. Clone the gist
  3. Run the examples
cd "$(mktemp -d)"
git clone git@gist.github.com:4ba7867a771de384b66b512d1847de61.git .