Skip to content

Instantly share code, notes, and snippets.

View fiver-watson's full-sized avatar

Dan Gillean fiver-watson

  • Artefactual Systems
  • Buffalo, NY
View GitHub Profile
@fiver-watson
fiver-watson / load-demo.sh
Last active February 27, 2024 19:45
Load demo data script for AtoM docker env
# AtoM bash script to load demo data into a docker environment
# Created by Dan Gillean, Artefactual Systems - dan@artefactual.com
# CC-BY-SA 4.0
# v1 - created June 29, 2018
# v2 - fix typos, June 29, 2018
# v3 - update for AtoM 2.6 compatibility, March 31, 2020
# v4 - introduce optional choice for regen derivs, July 29, 2020
# v5 - simplify uploads/downloads replacement; add change log, July 30, 2020
# v6 - modify for use in AtoM Docker Compose env, August 17, 2023
# v7 - fix restart commands for docker env, October 05, 2023
@fiver-watson
fiver-watson / retropie-setup-fiver.md
Last active December 3, 2018 01:40
RetroPie Setup: My own personal reference documentation for setting up RetroPie from scratch. RetroPie is a project to turn a raspberry pi into a retro arcade. Learn more at https://retropie.org.uk
@fiver-watson
fiver-watson / load-demo.sh
Last active February 22, 2024 20:53
This is a bash script that can be used with the Access to Memory (AtoM) Vagrant box, to quickly purge the current environment and reload the demo data. Requirements: This script has been updated for the AtoM 2.7.0.0 and/or 2.6.0.2 vagrant boxes, and therefore works with Ubuntu 18.04, PHP 7.2, and MySQL 8. The uploads directory and the sqldump mu…
# AtoM bash script to load demo data into a vagrant environment
# Created by Dan Gillean, Artefactual Systems - dan@artefactual.com
# CC-BY-SA 4.0
# v1 created June 29, 2018
# v2 - fix typos, June 29, 2018
# v3 - update for AtoM 2.6 compatibility, March 31, 2020
# v4 - introduce optional choice for regen derivs, July 29, 2020
# v5 - simplify uploads/downloads replacement; add change log, July 30, 2020
# Requirements for this version: AtoM 2.6 or higher
@fiver-watson
fiver-watson / update-term-name.php
Created February 12, 2018 18:27
Script to update the i18n name of a term in AtoM 2.x - relates to issue #9541
<?php
print("Have you created a backup of the database? [y/N]: ");
flush();
ob_flush();
$confirmation = trim(fgets(STDIN));
if ($confirmation !== 'y')
{
exit(0);
}
@fiver-watson
fiver-watson / genAllFindingAids.php
Created November 21, 2016 20:41
This script, when run in Access to Memory (AtoM - see: https://www.accesstomemory.org) using the tools:run command-line task, will generate a PDF finding aid for each published archival descriptive hierarchy (e.g. fonds, collection, record group, etc) in AtoM. If you want to generate a finding aid for all descriptions regardless of publication s…
<?php
$c = new Criteria;
$c->add(QubitInformationObject::PARENT_ID, 1);
foreach (QubitInformationObject::get($c) as $io)
{
if ($io->getPublicationStatus()->statusId == QubitTerm::PUBLICATION_STATUS_DRAFT_ID)
continue;
@fiver-watson
fiver-watson / 10276-separator-fix.php
Last active November 15, 2016 21:39
This script can be used by Access to Memory (AtoM) users who have encountered bug #10276 (https://projects.artefactual.com/issues/10276), and have accidentally created slugs (permalinks) for users or other entities with periods in them - these slugs will fail, rendering the record inaccessible. This script can be run from AtoM's root directory u…
<?php
print "Fixing invalid slugs...\n";
// add separator characters you want to convert FROM (DO NOT ADD A BACKSLASH HERE)
$separators = array('.', '/');
// change all instances of 'separator' to dash '-'.
foreach ($separators as $separator)
{
@fiver-watson
fiver-watson / AtoM_premiumPlus_FAQ.md
Last active September 2, 2015 19:02
This document offers an overview for AtoM Premium+ hosted clients with Artefactual Systems on setting up SSH access to an AtoM installation, basic command-line use, links to CLI tools, and where to find support.