Skip to content

Instantly share code, notes, and snippets.

View jbenner-radham's full-sized avatar

James Benner jbenner-radham

View GitHub Profile
@jbenner-radham
jbenner-radham / release-notes.md
Last active July 24, 2025 01:54
Notes regarding random thoughts about GitHub releases and the retrieval of them via POSIX script.

Get the Latest Release Tag (Without the GitHub API)

# Yes, I know that cURL isn't part of POSIX but it's pretty ubiquitous. Maybe see if a Wget fallback would be possible? (note: Apparently Wget is not installed on macOS by default)
# The alternative to use cURL (or possibly Wget) is to use the Git "sparse checkout" technique I'm currently utilizing. Yet again, not POSIX. And probably pre-installed on less UNIX-like operating systems than cURL or Wget.
LATEST_RELEASE=$(basename $(curl --head --location --output /dev/null --silent --write-out %{url_effective} https://github.com/jbenner-radham/node-readme-md-cli/releases/latest))

# After messing around with it for a bit, here's a potential Wget (and grep and sed) based alternative.
# So why is `grep` in there you ask? Well apparently `sed` cannot do multiline regex (at least through pipes). So it's just there to get that "Location" header line for `sed` to extract from.
# Also, `sed` uses "basic regular expressions" (apparently "modern regular ex
@jbenner-radham
jbenner-radham / plugins.toml
Last active July 12, 2025 02:53
Sheldon config file.
# `sheldon` configuration file
# ----------------------------
#
# You can modify this file directly or you can use one of the following
# `sheldon` commands which are provided to assist in editing the config file:
#
# - `sheldon add` to add a new plugin to the config file
# - `sheldon edit` to open up the config file in the default editor
# - `sheldon remove` to remove a plugin from the config file
#
@jbenner-radham
jbenner-radham / .zprofile
Last active July 8, 2025 02:00
Zsh Config Based Off of a Thinned Down Oh-My-Zsh
eval "$(/opt/homebrew/bin/brew shellenv)"
# Added by Toolbox App
export PATH="$PATH:/Users/jamesbenner/Library/Application Support/JetBrains/Toolbox/scripts"
@jbenner-radham
jbenner-radham / readme-md.1
Created October 20, 2024 23:03
Manpage for my readme-md-cli Node.js app
.Dd $Mdocdate$
.Dt README-MD 1
.Os
.\"
.Sh NAME
.\" ====
.Nm readme-md
.Nd Automatically generate a readme for your project from the CLI.
.\"
.Sh SYNOPSIS
@jbenner-radham
jbenner-radham / measure-text.ts
Last active June 4, 2025 17:37
JS/TS Snippets
const get2dCanvasContext = (): CanvasRenderingContext2D | null => {
const canvas = document.createElement('canvas')
const context = canvas.getContext('2d')
if (!context) return context
const { fontWeight, fontSize, fontFamily } = window.getComputedStyle(document.body)
context.font = `${fontWeight} ${fontSize} ${fontFamily}`
return context
@jbenner-radham
jbenner-radham / d&d-5e-cheat-sheet.md
Last active August 3, 2024 23:30
D&D 5e Cheat Sheet

D&D 5e Cheat Sheet

Terms

AC
Armor Class
DC
@jbenner-radham
jbenner-radham / fullscreen-centered.css
Created November 6, 2023 20:04
Fullscreen centering (e.g., for a loading spinner)
.fullscreen-centered {
position: fixed;
inset: 0;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
tap "homebrew/bundle"
tap "homebrew/cask-fonts"
tap "oven-sh/bun"
brew "bat"
brew "dog"
brew "git"
brew "has"
brew "httpie"
brew "jq"
brew "mandown"
@jbenner-radham
jbenner-radham / package.json
Last active January 5, 2023 23:06
CLI script to unzip all zip files in a directory and extract them to another directory.
{
"name": "unzipper",
"version": "0.0.0",
"description": "",
"exports": "./lib/index.js",
"type": "module",
"scripts": {
"start": "node ./lib/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
@jbenner-radham
jbenner-radham / rom_suffix_codes.md
Created December 30, 2022 21:05 — forked from ramiabraham/rom_suffix_codes.md
Video game rom suffix codes (decoded)

Video game rom codes

You wouldn't download a car...


Primary rom codes

Probably what you're looking for

  • [a] Alternate (alternate version of the game, usually trying a different output method)
  • [p] Pirate