Skip to content

Instantly share code, notes, and snippets.

@dmc5179
dmc5179 / README.md
Created October 19, 2026 14:28
Convert git ssh to https

gh-https

Converts a clone's GitHub remotes from SSH to HTTPS, for working from locations where SSH to github.com is blocked.

Install

echo '. /home/danclark/workspace/git-research/profile.d/gh-https.sh' >> ~/.bashrc
@dmc5179
dmc5179 / recovery.py
Created October 14, 2026 17:56
Python script to recover data from a usb drive
#!/usr/bin/env python3
"""Copy readable files out of the corrupted USB, preserving directory structure.
Byte-level paths throughout, so control characters in names can't break anything.
Anything that errors, loops, or claims an impossible size is skipped and logged.
"""
import os, signal, sys
SRC = b'/run/media/danclark/9459-977D/Clark, Daniel/Client Docs'
DST = '/home/danclark/workspace/lsm-usb-recovery/Clark, Daniel/Client Docs'
@dmc5179
dmc5179 / ddrescue.md
Created October 14, 2026 17:56
Using ddrescue to image a USB drive

ddrescue — practical reference

GNU ddrescue copies data from a failing block device to an image file, keeping a mapfile of which sectors succeeded. That mapfile is what separates it from dd: every run is resumable, and you can make multiple passes with different strategies without re-reading sectors you already have.

Use it whenever the source is physically unreliable — failing HDDs/SSDs, scratched optical media, flaky USB sticks, SD cards. For a healthy disk, plain dd is fine.

@dmc5179
dmc5179 / 01-bedrock-secret.yaml
Created October 5, 2026 18:37
RHOAI to AWS BedRock Config
# =============================================================================
# RHOAI MaaS -> AWS Bedrock : credentials Secret (sigv4) [SYNC WAVE -1]
# =============================================================================
# GitOps manifest for an EXISTING Argo CD Application managing RHOAI.
# Target version: Red Hat OpenShift AI 3.5 and later.
#
# !! TECHNOLOGY PREVIEW -- not for production per Red Hat !!
#
# ############################################################################
# # DO NOT COMMIT THIS FILE WITH REAL CREDENTIALS. #
@dmc5179
dmc5179 / 01-bedrock-credentials-secret.yaml
Created October 5, 2026 18:35
OpenShift Lightspeed to BedRock
# =============================================================================
# OpenShift Lightspeed -> AWS Bedrock : credentials Secret [SYNC WAVE -1]
# =============================================================================
# GitOps manifest for an EXISTING Argo CD Application managing OpenShift
# Lightspeed. Requires OpenShift Lightspeed 1.1.2 or later.
#
# ############################################################################
# # DO NOT COMMIT THIS FILE WITH REAL CREDENTIALS. #
# # This is a TEMPLATE. See the alternatives below and pick one before #
# # putting anything in git. #
@dmc5179
dmc5179 / dod-ca-setup.md
Created September 27, 2026 16:45
Installing DoD CAs on Fedora 43

DoD CAC / PKI Certificate Setup on Fedora

Prerequisites

Install the smart card and certificate management packages:

sudo dnf install opensc pcsc-lite pcsc-lite-ccid nss-tools p11-kit p11-kit-trust
@dmc5179
dmc5179 / installing-citrix-on-fedora-43.md
Created September 27, 2026 16:44
Citrix VDI on Fedora 43

Installing Citrix Workspace App on Fedora 43

This documents the process used to install Citrix Workspace App 26.04.10 on Fedora 43 (Linux 7.1.3-100.fc43.x86_64) with CAC smart card authentication support.

The Problem

The official Citrix Workspace App RPM (ICAClient-rhel-gcc-8-26.04.10.1-0.x86_64.rpm) fails to install via dnf because it depends on webkit2gtk3 >= 2.26, which provides libwebkit2gtk-4.0.so.37. Fedora 43 ships webkit2gtk4.1 (the 4.1 API) and webkitgtk6.0, but has dropped the older 4.0 API entirely.

This is a known issue. The webkit2gtk-4.0 library is only needed by the selfservice GUI (the graphical Citrix store browser). The core ICA session engine (wfica) and all session-related binaries do not depend on it and work fine without it.

@dmc5179
dmc5179 / README.md
Created August 28, 2026 01:21
Script to access Linq Connect API

LinqConnect Transaction Downloader

Download transaction history from LinqConnect (school meal accounts) and save it as JSON or CSV for import into Google Sheets or other tools.

Prerequisites

  • Python 3.10+
  • Playwright (only needed for browser login mode)
@dmc5179
dmc5179 / README.md
Created August 26, 2026 21:49
iPhone USB Tethering on Fedora

iPhone USB Tethering Setup for Fedora

How it works

iPhone USB tethering uses the ipheth kernel module to create a virtual ethernet interface. The usbmuxd daemon handles the initial USB multiplexing protocol but is not involved in the tethering data path itself — tethering uses a dedicated USB interface as a virtual network device.

usbmuxd is started automatically by udev rules when an iPhone is plugged in

@dmc5179
dmc5179 / README.md
Last active August 26, 2026 18:25
Gemini Notes to Notebook

notes-to-notebook

Find Gemini meeting notes in Google Drive, move them to a specified folder, and add them as sources to a NotebookLM notebook.

When Gemini takes notes during a Google Meet, it creates a Google Doc named after the meeting subject (e.g. "Team-A Weekly Team Sync - 2025-08-21"). This script finds those docs, moves them out of the default Google Meet folder into a folder you choose, and adds each one as a source in NotebookLM.

Prerequisites

  • gws CLI with a configured profile (default: redhat)
  • nlm CLI authenticated via nlm login