Skip to content

Instantly share code, notes, and snippets.

View escowles's full-sized avatar

esmé cowles escowles

View GitHub Profile
<mads:Topic>
<mads:authoritativeLabel>Cosmology</mads:authoritativeLabel>
<mads:elementList rdf:parseType="Collection">
<mads:TopicElement>
<mads:elementValue>Cosmology</mads:elementValue>
</mads:TopicElement>
</mads:elementList>
</mads:Topic>
<mads:Temporal>
@escowles
escowles / Gemfile
Last active August 29, 2015 13:57
list and extract entries from a zip file over http
source 'https://rubygems.org'
gem 'zipruby'
@escowles
escowles / development.log
Last active August 29, 2015 13:57
curb 0.8.5 crashes rails
Started GET "/dc/qa/terms/local/states" for 127.0.0.1 at 2014-03-05 15:40:29 -0500
(developer) Callback phase initiated.
Processing by Qa::TermsController#index as HTML
Parameters: {"vocab"=>"local", "sub_authority"=>"states"}
@escowles
escowles / gist:9555894
Created March 14, 2014 20:16
NPE when trying to copy from federated filesystem to repository storage
at org.modeshape.jcr.cache.document.DocumentTranslator.getProperty(DocumentTranslator.java:336)
at org.modeshape.jcr.cache.document.DocumentTranslator.getPrimaryTypeName(DocumentTranslator.java:357)
at org.modeshape.jcr.federation.FederatedDocumentReader.getPrimaryTypeName(FederatedDocumentReader.java:123)
at org.fcrepo.connector.file.FedoraFileSystemConnector.getDocumentById(FedoraFileSystemConnector.java:75)
at org.modeshape.jcr.federation.FederatedDocumentStore.get(FederatedDocumentStore.java:263)
at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:164)
at org.modeshape.jcr.cache.document.WorkspaceCache.documentFor(WorkspaceCache.java:183)
at org.modeshape.jcr.cache.document.WorkspaceCache.getNode(WorkspaceCache.java:215)
at org.modeshape.jcr.cache.document.AbstractSessionCache.getNode(AbstractSessionCache.java:237)
at org.modeshape.jcr.cache.document.WritableSessionCache.getNode(WritableSessionCache.java:169)
@escowles
escowles / repository.json
Last active August 29, 2015 13:57
Stacktrace after repository.json filesytem federation config changed
WARN 14:22:04.061 (RepositoryConfiguration) The 'query.rebuildUponStartup' field in the repository configuration file is deprecated and is no longer used. { "name" : "repo" , "jndiName" : "" , "workspaces" : { "predefined" : [ "default" ] , "default" : "default" , "allowCreation" : true } , "query" : { "enabled" : true , "indexStorage" : { "type" : "filesystem" , "location" : "/Users/escowles/src/git/fcrepo4/fcrepo-webapp/fcrepo4-data/fcrepo.modeshape.index.location" , "lockingStrategy" : "native" , "fileSystemAccessType" : "auto" } , "rebuildUponStartup" : "if_missing" , "indexing" : { "mode" : "sync" } } , "storage" : { "cacheName" : "FedoraRepository" , "cacheConfiguration" : "config/infinispan/leveldb-default/infinispan.xml" , "binaryStorage" : { "type" : "file" , "directory" : "/Users/escowles/src/git/fcrepo4/fcrepo-webapp/fcrepo4-data/fcrepo.binary-store-path" , "minimumBinarySizeInBytes" : 4096 } } , "security" : { "anonymous" : { "roles" : [ "readonly" , "readwrite" , "admin" ] , "useOnFailedLogin" :
@escowles
escowles / infinispan.xml
Last active August 29, 2015 13:57
Working JGroups config
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.2 http://www.infinispan.org/schemas/infinispan-config-5.2.xsd"
xmlns="urn:infinispan:config:5.2">
<global>
<globalJmxStatistics enabled="true" allowDuplicateDomains="true"/>
<transport clusterName="modeshape-cluster">
<properties>
<property name="configurationFile" value="${fcrepo.ispn.jgroups.configuration:cluster/jgroups-fcrepo-tcp.xml}"/>
</properties>
</transport>
@escowles
escowles / Gemfile
Last active August 29, 2015 13:57
MADS RDF demo using ActiveFedora 7.0.0.rc3
source 'https://rubygems.org'
gem 'active-fedora', github: 'projecthydra/active_fedora', branch: 'master'
gem 'linkeddata'
SFM Mac notes:
Install postgres and python using homebrew:
$ brew install postgres python
Install virtualenv:
$ pip install virtualenv
@escowles
escowles / Gemfile
Created April 4, 2014 14:04
MADS linkage
source 'https://rubygems.org'
gem 'active-fedora', github: 'projecthydra/active_fedora', branch: 'master'
gem 'linkeddata'
@escowles
escowles / 3level.sh
Created May 23, 2014 15:48
3level.sh
#!/bin/sh
BASE_URL=http://localhost:8080/rest/federated
BASE_DIR=$HOME/src/x
head -c $(( 10 * 1024 )) /dev/urandom > tmp.in
md5sum tmp.in
MAX=256 # number of files/directories to create
SLEEP=10