Skip to content

Instantly share code, notes, and snippets.

sonata plugins # eselect python list
Available Python interpreters:
[1] python2.4
[2] python2.5
[3] python2.6
[4] python3.1 *
sonata plugins # eselect python set 3
sonata plugins # /usr/sbin/glcu
Traceback (most recent call last):
@dltj
dltj / gist:1406383
Created November 29, 2011 20:36
XSLT Transformation
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:variable name="newline"><xsl:text>
</xsl:text></xsl:variable>
<xsl:variable name="tab"><xsl:text>&#x09;</xsl:text></xsl:variable>
<xsl:template match="/">
O:24:"IslandoraScanBatchObject":12:{s:12:"�*�base_name";s:4:"MODS";s:14:"�*�object_info";a:2:{s:3:"jp2";O:8:"stdClass":4:{s:3:"uri";s:73:"/root/path/to/image_batch/MODS.jp2";s:8:"filename";s:8:"MODS.jp2";s:4:"name";s:4:"MODS";s:3:"ext";s:3:"jp2";}s:3:"xml";O:8:"stdClass":4:{s:3:"uri";s:73:"/root/path/to/MODS.xml";s:8:"filename";s:8:"MODS.xml";s:4:"name";s:4:"MODS";s:3:"ext";s:3:"xml";}}s:26:"�*�preprocessor_parameters";a:6:{s:4:"type";s:9:"directory";s:6:"target";s:64:"/root/path/to/image_batch";s:6:"parent";s:14:"islandora:root";s:23:"parent_relationship_uri";s:49:"info:fedora/fedora-system:def/relations-external#";s:24:"parent_relationship_pred";s:20:"isMemberOfCollection";s:14:"content_models";a:0:{}}s:27:"�*�newFedoraDatastreamClass";s:28:"IslandoraNewFedoraDatastream";s:24:"�*�fedoraDatastreamClass";s:25:"IslandoraFedoraDatastream";s:21:"�*�fedoraRelsExtClass";s:22:"IslandoraFedoraRelsExt";s:14:"�*�datastreams";a:1:{s:8:"RELS-EXT";O:28:"IslandoraNewFedoraDatastream":8:{s:21:"�*�fedoraRelsIntClass";s:22:"
@dltj
dltj / DRS metadata form.xml
Created May 21, 2013 01:46
Islandora form_builder definition
<?xml version="1.0"?>
<definition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2">
<properties>
<root_name>mods</root_name>
<schema_uri>http://www.loc.gov/standards/mods/v3/mods-3-4.xsd</schema_uri>
<namespaces default="http://www.loc.gov/mods/v3">
<namespace prefix="drs">http://lyrasis.org</namespace>
<namespace prefix="dc">http:://purl.org/elements/1.1/</namespace>
<namespace prefix="dcterms">http://purl.org/dc/terms/</namespace>
<namespace prefix="dwc">http://rs.tdwg.org/dwc/terms/</namespace>
@dltj
dltj / bip.conf
Created June 11, 2013 23:58
Config file for the bip IRC bouncer connecting to irc://irc.freenode.net/code4lib and other channels.
# bip default config file.
# Thou shoult change thy password
# Listening IP address. This is the IP address bip will listen for incoming
# client connections.
ip = "10.112.45.239";
# To connect a client to bip, try the port below, and
# be sure to set the password to the value
# specified in the network you want to connect to.
@dltj
dltj / gist:6063275
Last active December 20, 2015 03:19
Modify datastream within PHP using tuque
<?php
module_load_include('inc', 'islandora_basic_image', 'includes/derivatives');
$pid = "islandora:13";
$fedora_object = islandora_object_load($pid);
if (!$fedora_object) {
drupal_set_message("Fedora Object isn't in the repo!");
}
if (!isset($fedora_object["OBJ"])) {
/**
* Implements hook_islandora_breadcrumbs_alter();
*
* Removes Islandora top-level breadcrumbs that would send the user astray.
*
*/
function islandora_breadcrumb_fix_islandora_breadcrumbs_alter(&$active_trail, $item) {
dpm('got here');
dpm($active_trail);
foreach ($active_trail as $key => $parent) {

Keybase proof

I hereby claim:

  • I am dltj on github.
  • I am dltj (https://keybase.io/dltj) on keybase.
  • I have a public key whose fingerprint is 2DA0 8D60 69D2 483D E5E5 37F3 48E5 203C 304F 1344

To claim this, I am signing this object:

@dltj
dltj / gist:d3e6ac55b54134b8f256
Created September 11, 2014 14:22
Proposal to acquire the Code4Lib Journal
Dear Editor/Publisher,
Good Wishes!
As an admirer of the outstanding work that your organization has done for the science community, I particularly enjoy having the opportunity to offer you a proposal for Acquisition/Co-Publishing of your journal: “CODE4LIB JOURNAL”.
This proposal shall entail a variety of different possibilities of our organizations working together towards a common goal.
OMICS International is publishing more than 350 Open Access Journals with the support of 30,000 Editorial Board members and 3 Million readers. Apart from Open access publishing, OMICS Group has SciTechnol, OMICS e-books, Scholar central and more than 300+ International Scientific Conferences under the OMICS umbrella all over the world in 2014.OMICS serves for the betterment of the scientific community through giving services like Publication support, Quality publication services and many more with economical cost.
@dltj
dltj / gist:749e34dbc17c3e578dd2
Created January 16, 2015 21:04
References to digital objects into ASpace

ArchivesSpace actually has a very hands-off approach to data. ArchivesSpace is a tool used to describe the intellectual assets of an archive. Archival description tends to take a somewhat high-level view of the materials in an archive, usually at the shelf, box, and folder level. For particularly noteworthy material, archivists may describe a particular page or group of pages in a folder, and provide access to a digital surrogate of that material.

ArchivesSpace has levels of description at all of these levels. Bundled together, these descriptions are typically called "finding aids" (e.g. an aid for finding the material that is in the archives from a particular donor). For example, this is a finding aid on the demo site for "Jedediah Horcrux Congreave fly fishing correspondence and photographs":

http://demo.archivesspace.org:8081/repositories/2/resources/1

If you scroll to the components of the finding aid and click on "Correspondence":

http://demo.archivesspace.org:8081/repositories/2/archival_ob