Skip to content

Instantly share code, notes, and snippets.

View DiegoPino's full-sized avatar
💭
in between metadata and strawberry fields

Diego Pino Navarro DiegoPino

💭
in between metadata and strawberry fields
  • Metropolitan New York Library Council
  • New York, NY, USA
View GitHub Profile
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<!--
Author: Rod Page
Source: http://iphylo.blogspot.com/2011/07/correcting-ocr-using-hocr-firefox.html#comment-400434491
-->
<xsl:output method='html' version='1.0' encoding='utf-8' indent='yes'/>
<xsl:variable name="scale" select="800 div //page/@width" />
-- convert ORE to PCDM 2.0 --
PREFIX ldp: <http://www.w3.org/ns/ldp#>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
PREFIX pcdm: <http://pcdm.org/models#>
CONSTRUCT {
?obj a pcdm:Object ;
iana:first ?first ;
iana:last ?last ;
@DiegoPino
DiegoPino / Islandora Scholar Patch
Created November 8, 2016 13:18 — forked from Rarian/Islandora Scholar Patch
Hack-ish patches for Islandora 1.7 with Fedora 3 and trippi-sparql talking to Fuseki
diff --git a/modules/islandora_scholar_embargo/islandora_scholar_embargo.module b/modules/islandora_scholar_embargo/islandora_scholar_e
index a0d3bc7..36f6937 100644
--- a/modules/islandora_scholar_embargo/islandora_scholar_embargo.module
+++ b/modules/islandora_scholar_embargo/islandora_scholar_embargo.module
@@ -210,8 +210,8 @@ WHERE {
?embargoed is:$eu ?date ;
is:$np ?notify .
FILTER(
- ?notify < '$now'^^xsd:dateTime &&
- ?date > '$pre_expiry'^^xsd:dateTime) .
@DiegoPino
DiegoPino / gist:f85f80276f8c6d88a33e4ffa6abc6351
Created February 28, 2017 19:09
bash history fresh vagrant
2 cd /var/www/
3 ls
4 cd drupal/
5 drush
6 drush pm-update
7 ls
8 cd sites/all/modules/
9 ls
10 cd islandora_solr_search/
11 git status
@DiegoPino
DiegoPino / gist:187993458872196a28884183e85cbc41
Created February 28, 2017 19:12
wrong query with slashes
{
"responseHeader":{
"status":400,
"QTime":5,
"params":{
"facet.field":"fgs_label",
"json.nl":"map",
"indent":"on",
"start":"0",
"fq":["-RELS_EXT_isConstituentOf_uri_mt:[* TO *]",
@DiegoPino
DiegoPino / package-vagrant-box.md
Created March 15, 2017 14:40 — forked from srijanshetty/package-vagrant-box.md
Clean up a vagrant box before packaging

We’re now going to clean up disk space on the VM so when we package it into a new Vagrant box, it’s as clean as possible. First, remove APT cache

$ sudo apt-get clean

Then, “zero out” the drive (this is for Ubuntu):

$ sudo dd if=/dev/zero of=/EMPTY bs=1M
@DiegoPino
DiegoPino / vagrant-clean.sh
Created October 4, 2017 00:25 — forked from jdowning/vagrant-clean.sh
Script to clean up Ubuntu Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/justindowning/5670884/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
CREATE TABLE IF NOT EXISTS {{ crayfish_db_name }}.Gemini (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
uuid VARCHAR(36) NOT NULL UNIQUE,
drupal VARCHAR(2048) NOT NULL,
drupal_sha512 VARCHAR(128) NOT NULL UNIQUE,
fedora VARCHAR(2048) NOT NULL,
fedora_sha512 VARCHAR(128) NOT NULL UNIQUE,
UNIQUE KEY (drupal_sha512, fedora_sha512)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@DiegoPino
DiegoPino / atom-sync.cson
Created January 17, 2019 17:48
Replacement CSON for .atom/packages/atom-sync/menus/atom-sync.cson : Atom >=1.32
# See https://github.com/atom/tree-view/blob/master/menus/tree-view.cson
'context-menu':
'.tree-view .full-menu': [
'label': 'Sync Folder'
'submenu': [
{
'label': 'Edit Sync Config'
'command': 'atom-sync:configure'
}
{
@DiegoPino
DiegoPino / cantaloupe.properties
Created October 16, 2019 13:31
Cantaloupe 4.1.5 properties for Islandora VM
###########################################################################
# Cantaloupe configuration file for Islandora Vagrant base box
# @modifiedby: Diego Pino, dpino@metro.org
#
# Copy this file to `cantaloupe.properties` and edit as desired.
# Tested with Version 4.1
# Keys may change from version to version. See the "Upgrading" section of
# the website.
#
# Most changes will take effect without restarting. Those that won't are