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 / gist:49d8331c414ee0927469bfe986dec81f
Created October 16, 2019 13:44
Steps to deploy Cantaloupe 4.1.5 on Islandora VM
cd $HOME
git clone https://github.com/cantaloupe-project/cantaloupe
cd cantaloupe
git checkout release/4.1
mvn clean package -DskipTests
sudo rm -rf /var/lib/tomcat7/webapps/cantaloupe*
sudo cp /home/vagrant/cantaloupe/target/cantaloupe-4.1.5-SNAPSHOT.war /var/lib/tomcat7/webapps/cantaloupe.war
sudo service tomcat7 start
sudo service apache2 start
@DiegoPino
DiegoPino / 000-default.conf
Created October 16, 2019 13:37
Apache2 configuration for Cantaloupe 4.1.5 (replaces /etc/apache2/sites-enabled/000-default.conf )
<VirtualHost *:8000>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@DiegoPino
DiegoPino / delegates.rb
Created October 16, 2019 13:34
Cantaloupe Version 4.1.5 delegates.rb file from Islandora VM
##
# Cantaloupe ruby delegates file for Islandora Vagrant base box
# @modifiedby: Diego Pino, dpino@metro.org
# Tested with Version 4.1
#
# The application will create an instance of this class early in the request
# cycle and dispose of it at the end of the request cycle. Instances don't need
# to be thread-safe, but sharing information across instances (requests)
# **does** need to be done thread-safely.
#
@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
@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'
}
{
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 / 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 / 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 / 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