Skip to content

Instantly share code, notes, and snippets.

@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 / 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_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 / 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 / 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: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

@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.

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:

/**
* 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) {
@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"])) {