Skip to content

Instantly share code, notes, and snippets.

@aronr
aronr / low-flow-showerhead-cost-savings-algorithm.txt
Last active June 19, 2017 23:22
Algorithm (and/or heuristics) for low-flow showerhead cost savings calculator
A quick discussion of a generic algorithm for a low-flow showerhead
water and energy savings calculator:
0. First thoughts.
The easiest way to think about these costs, for a current or
prospective customer, are likely to be in:
* Savings per month. (We think of mortgage or rent payments; utility,
car, cell phone contract payments, etc., in monthly terms.)
@aronr
aronr / gist:7763527
Created December 3, 2013 03:41
Puppet: reading values from YAML configuration file
http://puppetlabs.com/blog/module-of-the-week-puppetlabs-stdlib-puppet-labs-standard-library-part-4
@aronr
aronr / app-test-results-2013-02-05.txt
Created February 6, 2013 03:10
CollectionSpace App layer test results with latest services and app builds as of approx. 7:00 pm on Tue, Feb 5. 2013.
$ mvn clean test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.collectionspace:general-utils:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.mortbay.jetty:maven-jetty-plugin is missing. @ line 45, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 36, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ org.collectionspace:svcapp:1.0-SNAPSHOT, /Users/aron/Documents/CollectionSpace/source/cspace-app/application/pom.xml, line 56, column 12
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.collectionspace:csp-api:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.mortbay.jetty:maven-jetty-plugin is missing. @ line 57, column 15
@aronr
aronr / collectionobject-import-example.xml
Last active October 13, 2015 22:16
Example of an XML payload for importing an CollectionObject (aka Cataloging) record into CollectionSpace. (This example assigns a provided identifier (CSID) to that record; if the 'CSID=' attribute is omitted, an identifier will automatically be generated and assigned to the record.)
<?xml version="1.0" encoding="UTF-8"?>
<imports>
<import service="CollectionObjects" type="CollectionObject" CSID="be4797f1-08cf-4616-8a73-d763798f8ec3">
<schema xmlns:collectionobjects_common="http://collectionspace.org/services/collectionobject" name="collectionobjects_common">
<collectionobjects_common:objectNumber>UC15565</collectionobjects_common:objectNumber>
</schema>
</import>
</imports>
@aronr
aronr / intake-import-example.xml
Last active October 13, 2015 21:54
Example of an XML payload for importing an Intake record into CollectionSpace. (Note: the value of the intakes_common:valuer field should match the refName of a real Person record, or you can just omit this value from the payload.)
<?xml version="1.0" encoding="UTF-8"?>
<imports>
<import service="Intakes" type="Intake">
<schema name='intakes_common' xmlns:intakes_common='http://collectionspace.org/intake/'>
<intakes_common:conditionCheckReasons/>
<intakes_common:valuationReferenceNumber>valuationReferenceNumberX</intakes_common:valuationReferenceNumber>
<intakes_common:entryReason>entryReasonX</intakes_common:entryReason>
<intakes_common:currentOwner>currentOwnerX</intakes_common:currentOwner>
<intakes_common:depositor>depositorX</intakes_common:depositor>
<intakes_common:valuer>urn:cspace:org.collectionspace.demo:personauthority:id(9505e049-e367-4b51-9425):person:id(f9e46efa-6286-48b3-827d)'David+Bowie'</intakes_common:valuer>
@aronr
aronr / media-import-example.xml
Last active October 13, 2015 21:52
Example of an XML payload for importing a Media record into CollectionSpace.
<?xml version="1.0" encoding="UTF-8"?>
<imports>
<import service="Media" type="Media">
<schema xmlns:media_common="http://collectionspace.org/services/media/" name="media_common">
<media_common:dateGroupList>
<media_common:dateGroup>
<media_common:dateEarliestSingleQualifier/>
<media_common:scalarValuesComputed>true</media_common:scalarValuesComputed>
<media_common:dateLatestYear/>
<media_common:dateLatestDay/>
diff --git a/services/JaxRsServiceProvider/pom.xml b/services/JaxRsServiceProvider/pom.xml
index b112a0d..a0f7709 100644
--- a/services/JaxRsServiceProvider/pom.xml
+++ b/services/JaxRsServiceProvider/pom.xml
@@ -22,18 +22,15 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
</dependency>
@aronr
aronr / gist:3829229
Created October 3, 2012 19:28
Nuxeo DB after running services tests, late in v3.0 (7ee4c2180e9c3e5415bf673ca6a311a6364ebeb4 as of 2012-10-01)
nuxeo=# SELECT schemaname,relname,n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC;
schemaname | relname | n_live_tup
------------+--------------------------------------------------+------------
public | hierarchy | 462
public | fulltext | 132
public | hierarchy_read_acl | 132
public | misc | 131
public | dublincore | 131
public | ancestors | 130
public | content | 54
@aronr
aronr / gist:2764031
Created May 21, 2012 19:10
person search uischema
{
"person": {
"properties": {
"genders": {
"items": {
"properties": {
"_primary": {
"default": true,
"type": "boolean"
},
@aronr
aronr / gist:2763366
Created May 21, 2012 17:14
person-search uispec
{
".csc-person-foreName-label": {
"messagekey": "preferredPA-foreNameLabel"
},
".csc-person-gender-label": {
"messagekey": "person-genderLabel"
},
".csc-person-group-label": {
"messagekey": "person-groupLabel"
},