Skip to content

Instantly share code, notes, and snippets.

View DonRichards's full-sized avatar

Don Richards DonRichards

  • Johns Hopkins University
  • Knoxville, TN
  • 09:35 (UTC -04:00)
View GitHub Profile
@DonRichards
DonRichards / fedora_checksums.sh
Created August 26, 2025 21:23
Islandora Hash extraction
#!/bin/bash
# chmod +x fedora_checksums.sh
# ./fedora_checksums.sh
# This script is used to extract Fedora checksums for files referenced in Drupal nodes.
# It must be run from within the Drupal container.
# The script connects to Fedora via http://fcrepo:8080 and uses Drush
# to query the Drupal database for file URIs.
# The script creates a fedora_checksums.json file with node IDs and their
@DonRichards
DonRichards / Fix_Google_Photos_Takeout_Timestamp_Issues_for_Immich.md
Last active August 26, 2025 12:41
Fix Google Photos Takeout Timestamp Issues for Immich

Photo Timestamp Fixer for Google Photos Takeout

I rewrote a lot of this after looking at the script on https://github.com/werner-j/immich-datetime-fix/ Thanks for the help!

A bash script to restore original timestamps from Google Photos Takeout exports by reading .supplemental-metadata.json files and updating EXIF metadata in place.

Problem: Google Photos Takeout exports modify file timestamps during the zip process, breaking chronological sorting in photo management apps like Immich. While Google includes the original timestamps in .supplemental-metadata.json files, most apps ignore these.

Solution: This script restores original timestamps from Google's metadata files to EXIF data, enabling proper date-based sorting and organization without moving or copying files.

Features

@DonRichards
DonRichards / Database_Structure_Inspect.md
Last active August 14, 2025 20:55
Database Structure inspect

A file to get the structure of a database. Just pass it the name of the db in question.

# Auto-detect database type
./inspect_db.sh dbname

# Specify PostgreSQL explicitly
./inspect_db.sh dbname postgres

# Specify MySQL explicitly 
@DonRichards
DonRichards / How_to_troubleshoot_isle-dc_migration.md
Created April 30, 2025 20:20
A comprehensive document covering everything that can go wrong with Docker and `docker compose` on RHEL (with SELinux disabled, local XFS storage, using the modern `docker compose` plugin). I'll also focus on inter-container communication issues, filesystem migration problems, and networking edge cases that match the production setup

Perfect. I'll prepare a comprehensive document covering everything that can go wrong with Docker and docker compose on RHEL (with SELinux disabled, local XFS storage, using the modern docker compose plugin). I'll also focus on inter-container communication issues, filesystem migration problems, and networking edge cases that match your setup.

I'll get back to you soon with a detailed, organized, and actionable draft you can use for your 30+ page paper.

Comprehensive Docker on RHEL Troubleshooting Guide

Introduction

Migrating a containerized environment between different host systems can expose numerous failure modes. In this scenario, Docker Engine v26.1.3 (with the Docker Compose v2.27.0 plugin) was moved from an Ubuntu setup (using S3-backed storage for volumes) to a Proxmox-based RHEL host. The new host uses local storage on an XFS filesystem for Docker’s data-root, and SELinux has been fully disabled. After migration, containers could ping each other, yet HTTP requests (

@DonRichards
DonRichards / README.md
Created February 25, 2025 22:03
This is an example of a Notepad for Cursor IDE for a containerized drupal setup.

WIthin Cursor click the + character next to notepads in the left column.

Description:

Give it a name that describes to the LLM what it's for like "drupal-developer"

Give it a useful description:

maintaining a clean, scalable, and secure Drupal codebase in a Composer-managed, containerized environment while following best practices for development, theming, and database interactions

What files to point at:

Globs: codebase/*

@DonRichards
DonRichards / Dockerfile
Last active November 19, 2024 17:52
Idea for making a Section 508 compliant PDF (prototype)
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Install dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
tesseract-ocr \
@DonRichards
DonRichards / upgrade_6_2_extras.sh
Last active October 15, 2024 21:08
Enable Plugins for testing on Dataverse v6.2 (draft)
#!/bin/bash
# Globals
DOMAIN="dataverse-clone.mse.jhu.edu"
PAYARA="/usr/local/payara"
CURRENT_VERSION="6.2"
DATAVERSE_USER="dataverse"
PAYARA_EXPORT_LINE="export PAYARA=\"$PAYARA\""
BAGIT_NUMBER_OF_THREADS=10
@DonRichards
DonRichards / upgrade_5_14_to_6_0.sh
Last active October 17, 2024 18:58
Upgrade Dataverse v5.14 to v6.0
#!/bin/bash
# Globals
DOMAIN="dataverse-clone.mse.jhu.edu"
PAYARA_OLD="/usr/local/payara5"
PAYARA_NEW="/usr/local/payara6"
JAVA_UPGRADE_SCRIPT_URL="https://gist.github.com/DonRichards/cb992523a5ec588f1fb978d752d0d030/raw/upgrade_java.sh"
PAYARA_ZIP_URL="https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.8/payara-6.2023.8.zip"
DATAVERSE_WAR_URL="https://github.com/IQSS/dataverse/releases/download/v6.0/dataverse-6.0.war"
SOLR_TAR_URL="https://archive.apache.org/dist/solr/solr/9.3.0/solr-9.3.0.tgz"
@DonRichards
DonRichards / upgrade_6_1_to_6_2.sh
Last active October 17, 2024 18:59
Upgrade Dataverse v6.1 to v6.2
#!/bin/bash
# Used release to generate this: https://github.com/IQSS/dataverse/releases/tag/v6.2
# Globals
DOMAIN="dataverse-clone.mse.jhu.edu"
PAYARA="/usr/local/payara"
SOLR_SCHEMA_URL="https://raw.githubusercontent.com/IQSS/dataverse/v6.2/conf/solr/9.3.0/schema.xml"
SOLR_SCHEMA_FILE=$(basename "$SOLR_SCHEMA_URL")
DATAVERSE_WAR_URL="https://github.com/IQSS/dataverse/releases/download/v6.2/dataverse-6.2.war"
DATAVERSE_WAR_FILE="/home/dataverse/dataverse-6.2.war"