Skip to content

Instantly share code, notes, and snippets.

@dltj
dltj / mediainfo-islandora-23-OBJ.txt
Last active August 29, 2015 14:16
Comparison of Islandora Video Datastreams (rev-1: OBJ; rev-2: MP4)
General
Complete name : file_name_spoof.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 1.13 MiB
Duration : 14s 676ms
Overall bit rate : 643 Kbps
Encoded date : UTC 1904-01-01 00:00:00
Tagged date : UTC 1904-01-01 00:00:00
@dltj
dltj / gist:f126b340cc0ec45f3bce
Created August 19, 2015 14:42
Difference in filesystems between CSpace-supplied Tomcat and Stock Tomcat
$ rsync -rcnv --delete cspace-apache-tomcat-7.0.57/* apache-tomcat-7.0.57/
building file list ... done
deleting temp/safeToDelete.tmp
LICENSE
NOTICE
RELEASE-NOTES
RUNNING.txt
env.txt
bin/._setenv.sh
bin/catalina-tasks.xml
@dltj
dltj / playbook_cspace_redeploy_tenant_config.yml
Last active September 25, 2015 16:03
CollectionSpace Redeploy Config Playbook
---
- name: Redeploy CSpace Code to CSpace Tomcat
hosts: all
tasks:
- name: Shut down CSpace Tomcat before deployment
sudo: true
service:
name: cspace-tomcat
@dltj
dltj / CATALINA_HOME_temp_*_request.xml
Last active October 13, 2015 22:10
CSpace Import Person Authorities
<document repository="default" id="b0e95309-63b5-4fe2-8026-5d5f9574b629">
<system>
<type>Person</type>
<path>Persons/b0e95309-63b5-4fe2-8026-5d5f9574b629</path>
<lifecycle-state>project</lifecycle-state>
<lifecycle-policy>default</lifecycle-policy>
<access-control>
<acl name="inherited">
<entry principal="Administrator" permission="Everything" grant="true"/>
<entry principal="members" permission="Read" grant="true"/>
@dltj
dltj / playbook_cspace_deploy_tenant.yml
Created December 1, 2015 01:36
Ansible Playbook to Set Conditions and Build/Deploy Application
---
- name: Deploy CSpace Code to CSpace Tomcat
hosts: all
tasks:
- name: Check for existance of tenant source directory
stat:
path: "{{ tenant_source }}"
register: tenant_source_register
@dltj
dltj / bluebird_box_door.c
Last active April 25, 2026 13:00
Arduino program for Bluebird Box Door
/*
Bird box gate (servo) controller - Arduino Nano
RF receiver is in MOMENTARY mode and drives a relay contact:
Relay COM -> GND
Relay NO -> D2
We use D2 with INPUT_PULLUP:
- D2 reads HIGH normally
- D2 reads LOW while the relay is energized (button held)
@dltj
dltj / RecordDataFormatter-Specs-DefaultRecord.php
Last active September 16, 2026 12:28
Taming the VuFind RecordDataFormatter
<?php
namespace IndexDataShared\RecordDataFormatter\Specs;
class DefaultRecord extends \VuFind\RecordDataFormatter\Specs\DefaultRecord {
/**
* Get a callback function for processing label-data pairs for multi-line fields.
*
* This method returns a closure that can be used as a "multiFunction" in field specifications. The
@dltj
dltj / vufind-3way-merge.py
Created August 30, 2026 18:18
VuFind 3-Way Merge
#!/usr/bin/env -S uv run --script
# Note: This script requires 'uv' (https://docs.astral.sh/uv/).
# Install: curl -LsSf https://astral.sh/uv/install.sh | sh (or `brew install uv`)
# Execution: ./script.py OR uv run script.py
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "click",
# ]