Skip to content

Instantly share code, notes, and snippets.

@dannylamb
dannylamb / gist:ce6db4da43456ce0fd7947dd56335f56
Created August 12, 2016 14:04
strong etag on container
daniel@daniel-Latitude-3560:/opt/karaf$ curl -i "http://localhost:8080/fcrepo/rest/fixtures"
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
ETag: "dab54979f9951cb100ea9cc0f52da72111511deb"
Last-Modified: Fri, 12 Aug 2016 13:36:29 GMT
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#Container>;rel="type"
Link: <http://www.w3.org/ns/ldp#BasicContainer>;rel="type"
Accept-Patch: application/sparql-update
Accept-Post: text/turtle,text/rdf+n3,text/n3,application/rdf+xml,application/n-triples,multipart/form-data,application/sparql-update
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<reference id="dataSource" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=jdbc/idiomaticds)"/>
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=acrepo/Broker)"/>
@dannylamb
dannylamb / gist:cea486a82d1467baf70d67bf40e8f9b9
Created December 14, 2016 14:36
transaction.log and velocity.log problems
INFO: Deploying web application archive /var/lib/tomcat7/webapps/fcrepo.war
Dec 14, 2016 2:22:08 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/fits/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/var/lib/tomcat7/webapps/fcrepo/WEB-INF/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
14:22:08,494 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
14:22:08,494 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logb
from("timer:foo?period=5000")
.setHeader("IslandoraExchangePattern", constant("InOut"))
.setHeader("IslandoraBroadcastRecipients", constant("activemq:queue:testA,activemq:queue:testB"))
.to("{{input.stream}}")
.log(INFO, LOGGER, "RECEIVED FROM B: ${body}");
from("activemq:queue:testA")
.log(INFO, LOGGER, "Waiting 2 seconds in A")
.process((exchange -> Thread.sleep(2000)))
.log(INFO, LOGGER, "Finished waiting in A")
@dannylamb
dannylamb / issue-640.sh
Last active August 15, 2017 17:06
Issue 640 Install Script
cd /var/www/html/drupal/web/
/var/www/html/drupal/vendor/bin/drush --y pmu islandora_image
/var/www/html/drupal/vendor/bin/drush --y pmu islandora_collection
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_mimetype
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_height
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_width
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_image
/var/www/html/drupal/vendor/bin/drush --y pmu islandora
cd /var/www/html/drupal/web/modules/contrib/islandora
git remote add danny https://github.com/dannylamb/islandora.git
ubuntu@claw:/var/www/html/drupal/web/modules/contrib/islandora$ drupal config:override
Enter configuration name [at_core.settings]:
> system.file
Enter the configuration key [allow_insecure_uploads]:
> temporary_maximum_age
Enter the configuration value:
> 1
Configuration name system.file
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_mimetype
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_height
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_width
/var/www/html/drupal/vendor/bin/drupal config:delete active field.field.media.tn.field_image
/var/www/html/drupal/vendor/bin/drush --y pmu islandora
@dannylamb
dannylamb / gist:50c6753dc54cedfb7e8ab1c04f820d6e
Created December 18, 2017 15:42
some queyr work to remember later
/**
function islandora_node_insert(NodeInterface $node) {
_node_index($node);
}
function islandora_node_update(NodeInterface $node) {
dsm("IN NODE UPDATE");
_node_index($node);
}
@dannylamb
dannylamb / ansible-role-test.sh
Created February 7, 2018 13:40 — forked from geerlingguy/ansible-role-test.sh
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
# - test_idempotence: whether to test playbook's idempotence (default = true)