Skip to content

Instantly share code, notes, and snippets.

View cbeer's full-sized avatar

Chris Beer cbeer

View GitHub Profile
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modeshapeRepofactory': Invocation of init method failed; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFacto
@cbeer
cbeer / Rplot-fedora-10threads.png
Last active December 11, 2015 20:39
Fedora benchamrks
Rplot-fedora-10threads.png
@cbeer
cbeer / akubra-llstore.xml
Created December 21, 2012 21:25
Akubra glacier spring configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean name="org.fcrepo.server.storage.lowlevel.ILowlevelStorage"
class="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorageModule">
<constructor-arg index="0">
<map />
</constructor-arg>
<constructor-arg index="1" ref="org.fcrepo.server.Server" />
@cbeer
cbeer / 2013 talks topics
Created November 14, 2012 03:32
accepted talks topics
0 0.52687 library data university dot system presentation ll code talk development resources application web digital
1 0.02734 experience user blackboard primo functionality hosted northwestern examples services campus student cms collaborative resource
2 0.02849 web service libraries design make accessible user jquery staff users accessibility ryerson database books
3 0.04491 google ncsu libraries tracking analytics interface event carolina north usage html patron catalog vendor
4 0.02449 marc format marcr datastore redis records discovery colorado designation bibliographic structure college source scale
5 0.04151 source open software quality practices small profit development community role bess agile develop mediashelf
6 0.01314 drupal postgresql engine php twig symfony splurge world core recommendation portal ontario laurentian high
7 0.0193 hydra content models public boston dpla bpl hubs service org digital modeling advanced potential
8 0.02437 image images northwestern api stanford iiif framewo
@cbeer
cbeer / ingest-em.rb
Created March 21, 2012 14:28
Rubydora large file ingest
# DOESN'T WORK FOR LARGE FILES
# gems/eventmachine-1.0.0.beta.4/lib/em/streamer.rb:88:in `get_chunk': integer 2147483648 too big to convert to `int' (RangeError)
require 'rubygems'
require 'rubydora'
require 'em-http-request'
Rubydora.repository = Rubydora.connect(:url => ENV['host'], :user => ENV['user'], :password => ENV['pass'], :timeout => 1200)
@cbeer
cbeer / apim-listener.xml
Created February 26, 2012 19:17
Fedora API-M JMS -> Camel -> JMS bridge
<?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"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<camelContext xmlns="http://camel.apache.org/schema/blueprint" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:access="http://www.fedora.info/definitions/1/0/access/">
@cbeer
cbeer / script.rb
Created January 27, 2012 22:00
Fedora (pre-akubra) llstore -> Pairtree
require 'rubygems'
require 'pairtree'
require 'find'
require 'fileutils'
pairtree = Pairtree.at('.', :create => true)
Find.find('data/objects') do |x|
next if File.directory? x
f = x.split("/").last
@cbeer
cbeer / gist:1406418
Created November 29, 2011 20:43
Exclude models from the Rails identity map
require 'active_record/identity_map'
module ActiveRecord
module IdentityMap
class << self
alias_method :add_without_exclude, :add
def exclusions
@exclusions ||= []
end
@cbeer
cbeer / catalog_controller.rb
Created November 3, 2011 19:07
WGBH gated discovery solr helper logic example
class CatalogController < ...
include AmericanArchive::SolrHelper::Authz
end
require 'rubygems'
require 'parslet'
require 'parslet/convenience'
class Duration < Parslet::Parser
rule(:integer) { match('[0-9]').repeat(1, 2) }
rule(:space) { match('\s').repeat(1) }
rule(:space?) { space.maybe }
rule(:q) { str('?') }