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
@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"
}
@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 / 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) .
-- 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 ;
<?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" />