Skip to content

Instantly share code, notes, and snippets.

View GwynethLlewelyn's full-sized avatar
👩
Learning Go

Gwyneth Llewelyn GwynethLlewelyn

👩
Learning Go
View GitHub Profile
@GwynethLlewelyn
GwynethLlewelyn / mermaid-test.md
Last active September 21, 2025 11:43
Testing Mermaid rendering in GitHub

Explaining rolling window

Basic Flowchart

flowchart TD
    A[Request new task] --> B{Check last 3 task times}
    B -->|All > 72h| C[Eligible]
    B -->|Some < 72h| D[Wait until oldest is >72h]

    C --> E{Check 15-day average}
@GwynethLlewelyn
GwynethLlewelyn / acronyms.vera
Created August 28, 2025 12:46
VERA Acronyms Database for `wtf`
100VG 100 Voice Grade [technology]
10GE 10 GigaBIT Ethernet (ethernet, BIT)
1D2B 1 D-channel 2 B-channels (BRI, ISDN)
2B1D 2 B-channels 1 D-channel (BRI, ISDN)
2S2D Double Sided - Double Density (FDD)
3DC 3D Consortium (org., Sanyo, Sharp, Sony, ...)
3DDDI 3D Device Dependent Interface (MS), "3D DDI"
3DRAM 3 Dimensional Random Access Memory (RAM)
3GIO Third Generation Input/Output (PCIe)
3GIP 3rd Generation . Internet Protocol (org., IP, GPRS, WLAN, mobile-systems), "3G.IP"

An attempt to get all command line configurations working to manually compile Homebrew's Node.js for macOS Big Sur

  ./configure --without-npm --with-intl=system-icu --shared-libuv --shared-nghttp2 --shared-openssl --shared-zlib --shared-brotli --shared-cares --prefix=/usr/local/Cellar/node/23.3.0 --use-prefix-to-find-headers --openssl-use-def-ca-store --enable-lto

Notes

  1. Use default XCode compiler & linker (reset appropriate variables!)
@GwynethLlewelyn
GwynethLlewelyn / extract-uuid.sh
Last active September 17, 2025 07:32
Shell script that will grab all Second Life textures necessary for a specific LLSD XML backup
#!/bin/sh
# Grab all possible textures from LL's own CDN, referenced by UUID from LLSD backups.
# Usage: Go to where your LLSD XML files are stored; run script. Wait a few seconds. Done!
# (cc) 2024–2025 by Gwyneth Llewelyn. Some rights reserved.
# Distributed under the MIT license: https://gwyneth-llewelyn.mit-license.org
# Second Life® is a registered trademark of Linden Lab. No copyright infringement is intended.
#
# `ug` below is `ugrep`, a `grep` replacement, which you can get from here: <https://ugrep.com/>
# All others should be standard on any Un*x system.
# `curl` is usually available on all systems as well, but, if not, you can grab it from <https://curl.se/>
@GwynethLlewelyn
GwynethLlewelyn / convert.sh
Last active July 21, 2024 16:26
Batch conversion using ImageMagick
for file in *.png ; do
magick "$file" -define webp:lossless=true -define webp:auto-filter=true -define webp:filter-strength=50 -define webp:image-hint=picture -define webp:method=6 -define webp:thread-level=1 "${file%.*}.webp" ;
done
@GwynethLlewelyn
GwynethLlewelyn / imagemagick-convert-multiple-resolutions.md
Last active April 7, 2024 21:15
ImageMagick Simultaneously Convert To Multiple Resolutions
convert gw-original-1400.png -write mpr:img +delete \( mpr:img -resize 1280x +write gw-1280.png \) \( mpr:img -resize 1024x +write gw-1024.png \) \( mpr:img -resize 512x +write gw-512.png \) \( mpr:img -resize 500x +write gw-500.png \) \( mpr:img -resize 300x +write gw-300.png \) \( mpr:img -resize 256x +write gw-256.png \) \( mpr:img -resize 160x +write gw-160.png \) \( mpr:img -resize 128x +write gw-128.png \) \( mpr:img -resize 100x +write gw-100.png \) \( mpr:img -resize 90x +write gw-90.png \) \( mpr:img -resize 80x +write gw-80.png \) \( mpr:img -resize 64x +write gw-64.png \) \( mpr:img -resize 50x +write gw-50.png \) \( mpr:img -resize 40x +write gw-40.png \) \( mpr:img -resize 32x +write gw-32.png \) \( mpr:img -resize 16x +write gw-16.png \) null:
h
@GwynethLlewelyn
GwynethLlewelyn / generate-dane-tlsa-records.sh
Last active November 14, 2023 09:45
Viktor Dukhovni's shell script to generate all possible TLSA records for DANE from the full certificate chain
#! /usr/bin/env bash
# Bash needed for PIPESTATUS array
# Author: Viktor Dukhovni <[email protected]> (@ietf-dane)
# Date: 28 December 2015
# From https://community.letsencrypt.org/t/making-a-dane-tlsa-to-work-with-le/2129/8
# See also https://community.letsencrypt.org/t/please-avoid-3-0-1-and-3-0-2-dane-tlsa-records-with-le-certificates/7022
extract() {
case "$4" in
0) openssl x509 -in "$1" -outform DER;;
@GwynethLlewelyn
GwynethLlewelyn / convert-from-Latin-1-to-UTF-8.md
Created November 2, 2023 13:20
One-liner shell script to convert every file in a large directory tree from ISO-Latin-1 to UTF-8

Convert files from ISO-8859-1 (Latin-1) to UTF-8, recursively

This requires recode to be installed (brew install recode or apt install recode).

The example shows HTML files only. Adjust as required.

Process:

  1. (Recursively) find all files that end with *.htm or *.html.
  2. For each match, check its file type using file.
@GwynethLlewelyn
GwynethLlewelyn / get-flag.go
Created August 4, 2023 10:53
Go lang conversion from ISO-3166-1 two-letter codes to flag emoji
// To run this on the Go Playground: https://go.dev/play/p/9na7SU0ExdD
package main
import "fmt"
func main() {
country := "PT"
fmt.Printf("%s — Decimal: %d %d Hex: %#[1]x %#x\n", country, rune(country[0]), rune(country[1]))