Skip to content

Instantly share code, notes, and snippets.

View kieranjol's full-sized avatar

Kieran O'Leary kieranjol

View GitHub Profile
@raffazizzi
raffazizzi / METSConverter.xsl
Created August 3, 2012 16:22
METS for CHARM
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Project: CHARM
- Author: Raffaele Viglianti
- Started on: 05-03-2009
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" exclude-result-prefixes="#all">
@mjordan
mjordan / premis_with_agents.xml
Last active December 19, 2016 23:48
PREMIS with organization and validating software agents
<?xml version="1.0" encoding="utf-8"?>
<premis xmlns="info:lc/xmlns/premis-v2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:lc/xmlns/premis-v2 http://www.loc.gov/standards/premis/v2/premis.xsd" version="2.2">
<!--PREMIS data for Islandora object yul:89067. Contains object entries for each datastream
in an Islandora object, and event entries documenting all fixity checks performed on versions of those datastreams.
Note that a datastream version that has never had a fixity check performed on it will not be linked to any fixity
check events.-->
<!--'Internal' eventIdentifierType values are comprised of Fedora datasteam ID plus ':' plus Fedora Audit Record ID.-->
<object xsi:type="file">
<objectIdentifier>
<objectIdentifierType>Fedora Commons datastreamVersion ID</objectIdentifierType>
@mjordan
mjordan / gist:8672407
Created January 28, 2014 17:41
PREMIS with FITS in <objectCharacteristicsExtension>
<?xml version="1.0" encoding="utf-8"?>
<premis xmlns="info:lc/xmlns/premis-v2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:lc/xmlns/premis-v2 http://www.loc.gov/standards/premis/v2/premis.xsd" version="2.2">
<!--PREMIS data for Islandora object islandora:220. Contains object entries for each datastream
in an Islandora object, and event entries documenting all fixity checks performed on
versions of those datastreams. Note that a datastream version that has never had a fixity
check performed on it will not be linked to any fixity check events.-->
<!--'Internal' eventIdentifierType values are comprised of Fedora datasteam ID plus ':' plus Fedora Audit Record ID.-->
<object xsi:type="file">
<objectIdentifier>
<objectIdentifierType>Fedora Commons datastreamVersion ID</objectIdentifierType>
@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active February 20, 2025 09:37
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'design.ui'
#
# Created: Wed May 27 16:39:17 2015
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
@Uchean
Uchean / clamav-mac.md
Created December 9, 2015 23:36
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@ddennedy
ddennedy / getgop.sh
Last active March 29, 2018 22:21
display the GOP structure of a video file (requires ffprobe)
#!/bin/sh
startswith() { case $1 in $2*) true;; *) false;; esac; }
tmpfile=$(mktemp)
ffprobe -show_frames "$1" 2> /dev/null > "$tmpfile"
GOP=1
maxGOP=1
Bframes=0
<?xml version="1.0" encoding="UTF-8"?>
<mets xmlns="http://www.loc.gov/METS/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mi="https://mediaarea.net/mediainfo" xmlns:premis="http://www.loc.gov/premis/v3">
<amdSec ID="amdSec-idp140188101538512">
<techMD ID="techMD-idp140188101538512">
<mdWrap MDTYPE="PREMIS:OBJECT">
<xmlData>
<premis:object xmlns="http://www.loc.gov/premis/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="file" xsi:schemaLocation="info:lc/xmlns/premis-v3 http://www.loc.gov/standards/premis/v2/premis-3-0-draft.xsd" version="3.0">
<objectIdentifier>
<objectIdentifierType>Relative AIP path</objectIdentifierType>
<objectIdentifierValue>objects/access/dvd/THTK21006.iso</objectIdentifierValue>
#!/bin/bash
# This script is for encoding videos in 1080p60 for YouTube using YouTube's recommendations
# Optionally allows for usage of nvenc instead of libx264
# Usage: yt-1080p60.sh INFILE OUTFILE [nvenc]
INFILE="$1"
OUTFILE="$2"
ENCODER="$3"
@drjwbaker
drjwbaker / 2016-06-08_AHRCborndigital1.md
Last active June 9, 2016 11:37
'Born digital big data and approaches for history and the humanities' Workshop 1, School of Advanced Study (University of London), 8 June 2016