Skip to content

Instantly share code, notes, and snippets.

View dotysan's full-sized avatar

Curtis Doty dotysan

View GitHub Profile
@dotysan
dotysan / all-my-gists.sh
Last active March 7, 2026 21:18
Backup all my gists
#! /usr/bin/env bash
#
# Backup all my gists.
#
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace
printf -v TODAY '%(%F)T'
@dotysan
dotysan / fclones-build.sh
Last active March 7, 2026 00:55
Install fclones on a Rust-less system using Rust in Docker
#! /usr/bin/env bash
#
# Install fclones on a Rust-less system using Rust in Docker.
#
set -e
set -u
set -x
# latest stable release
FC_TAG=v0.35.0
@dotysan
dotysan / get-stores.sh
Last active March 1, 2026 22:09
Harvest all stores from wp-store-locator and generate GeoJSON for Google Earth
#! /usr/bin/env bash
# shellcheck disable=SC1112
#
# Harvest all stores from wp-store-locator and generate GeoJSON for Google Earth.
#
# Assumes continental US: latitude range 23° to 50° North and longitude range 67° to 126° West.
#
set -o errexit
set -o errtrace
set -o pipefail
@dotysan
dotysan / find-mc-libcomerr-bug.sh
Last active October 7, 2025 19:08
Scan *all* debian image tags from Docker Hub and report which ones result in `ldd /usr/bin/mc` showing a broken libcom_err.so.2 after installing mc.
#!/usr/bin/env bash
#
# find-mc-libcomerr-bug.sh
# Scan *all* debian image tags from Docker Hub and report
# which ones result in `ldd /usr/bin/mc` showing a broken libcom_err.so.2
# after installing mc.
IMAGE_REPO='library/debian'
PAGE_SIZE=100 # API max page size
REPO_API='https://registry.hub.docker.com/v2/repositories'
@dotysan
dotysan / !Install static libheif using docker.md
Last active September 14, 2025 16:59
build static libheic in a docker container & install in user home

build static libheic in a docker container & install in user home

This installs minimalist heif-info & heif-convert that can only decode HEIC and encode JPEG.

Installation

  • ./install-heic.sh
@dotysan
dotysan / !VS Code on older Linux.md
Last active February 12, 2026 06:22
Allow VS Code Server to run on older Linux
@dotysan
dotysan / docker-lt.sh
Last active July 16, 2025 21:33
Finds ancient docker images with fake creation and sets to most likely timestamp.
#! /usr/bin/env bash
#
# Finds ancient docker images with fake creation and sets to most likely timestamp.
#
set -e
set -u
set -x
main() {
@dotysan
dotysan / !Template for writing a bash script with fancy debugging.md
Last active February 1, 2026 17:42
Template for writing a bash script with fancy debugging.

Template for writing a bash script with fancy debugging

Make a copy of hello-bash.sh and edit as needed.

@dotysan
dotysan / find-my-gh-rulesets.sh
Last active July 2, 2025 23:49
Find all my GitHub rulesets
#!/usr/bin/env bash
#
# Find all my GitHub repositories that have rulesets.
#
# as a oneliner: `gh repo list --limit 1000|while read -r repo rest;do gh ruleset list --repo "$repo"|while read id rest;do gh ruleset view --repo "$repo" "$id";echo;done;done`
#
# If you have more than 1000 repos, adjust!
#
gh repo list --limit 1000 |while read -r repo rest
@dotysan
dotysan / Makefile
Created June 6, 2025 20:56
Bootstraps Node.js inside a local Python virtual environment.
SHELL:= /usr/bin/env bash
PYVER:= 3.13
venv:= .venv
vb:= $(venv)/bin
nm:= $(venv)/lib/node_modules
HERE:=$(notdir $(CURDIR))
# Bootstraps Node.js inside a local Python virtual environment.
$(vb)/npm: $(vb)/nodeenv