Skip to content

Instantly share code, notes, and snippets.

View terrywbrady's full-sized avatar

Terry Brady terrywbrady

View GitHub Profile
@terrywbrady
terrywbrady / GoogleSpreadsheet.html
Last active April 12, 2024 13:14
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}
@terrywbrady
terrywbrady / Mirage2Theme.xsl
Last active December 13, 2023 09:46
DSpace / IIIF Integration for DigitalGeorgetown
<!--
The following XSL lives in a top-level theme xsl file.
This block of code controls all of loose integrations that we have embedded in our custom themes.
Since our work with IIIF is still evolving, we offer a number of mechanisms for linking a IIIF manifest into DSpace
- Add the manifest file as a specially named item bitstream ("IIIF Manifest")
- Link a manifest to an item in dc.relation.uri
- Link a manifest file to a collection page with special markup in dc.description.tableofcontents
We expect to eventually standardize the integration on a smaller set of options.
@terrywbrady
terrywbrady / Dockerfile
Created May 15, 2023 18:06
Sample Capybara Driver Running Headless Chrome in a Container
#FROM ruby:2.7
FROM ruby:3
RUN apt-get update -y && \
apt-get -y upgrade && \
apt-get install -y libarchive-tools zip
RUN gem install bundler
COPY Gemfile Gemfile
@terrywbrady
terrywbrady / README.md
Created June 9, 2022 15:37
Maven integration tests utilizing external containers for testing

Overview

The io.fabric8 docker-maven-plugin can start and stop docker containers to support junit integration tests.

These tests run during the integration test phase.

Example Container - test S3 api interactions during integration tests

For instance, create a container build on minio/minio to simulate interactions with a cloud service.

@terrywbrady
terrywbrady / Shema.Org_ForXMLUI.md
Last active September 19, 2022 17:25
Schema.org microtags in XMLUI
@terrywbrady
terrywbrady / bookview-banner.html
Last active February 10, 2022 01:15
Sample FlexPaper Document Viewer for XMLUI
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<div id="close"><a href="javascript:window.close();">Close Book Viewer</a></div>

Keybase proof

I hereby claim:

  • I am terrywbrady on github.
  • I am terrywbrady (https://keybase.io/terrywbrady) on keybase.
  • I have a public key ASCUdDs5dO-EZlFetC02Ta16Lof1jUlIUCnlXna4RDrmlwo

To claim this, I am signing this object:

@terrywbrady
terrywbrady / PdfBitstreamsPerCollection.sql
Created September 16, 2016 21:02
DSpace 5 vs DSpace 6 Queries
//DSpace 5
select
h.handle,
rp.policy_id,
bit.sequence_id,
bitmv.text_value,
bit.internal_id,
brp.policy_id
from handle h
join item i
@terrywbrady
terrywbrady / sharestream.xsl
Created January 28, 2019 20:31
Sharestream Embed Logic
<xsl:template name="summaryHeaderSharestream">
<xsl:variable name="isAudio" select="dim:field[@element='type'][text()='Audio']"/>
<xsl:for-each select="dim:field[@element='relation' and @qualifier='uri']">
<div class="row">
<div class="col-sm-12">
<xsl:variable name="media">
<xsl:choose>
<xsl:when test="contains(.,'/sharestream2gui')">
<xsl:text>https://mediapilot.georgetown.edu:443/ssdcms/embedplayer.do?aid=</xsl:text>
<xsl:value-of select="substring-before(substring-after(.,'mediaPath='),'&amp;')"/>
@terrywbrady
terrywbrady / vendor.xsl
Last active April 24, 2018 21:27
Alma to GMS Vendor Stylesheet
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:vend="http://com/exlibris/repository/acq/invoice/xmlbeans" version="1.0">
<xsl:output method="text"/>
<xsl:template match="/vend:payment_data">
<xsl:apply-templates select="vend:invoice_list/vend:invoice"/>
</xsl:template>
<!-- Question: Special handling of Credit Card Stuff -->