Skip to content

Instantly share code, notes, and snippets.

require 'savon'
handle_wsdl = "http://linktest.odai.yale.edu/ypls-ws/PersistentLinking?wsdl"
handle_prefix = "10079.1/isps"
handle_group = "10079.1/ISPS"
handle_user = "10079.1/ISPS"
handle_credential = "*******"
handle_base = "http://isps.yale.edu/"
#handle_group = "10079.1/DIGCOLL"
@yulgit1
yulgit1 / gist:145d6f0d681b236a97f0
Created November 13, 2014 16:41
riiif stack trace
[ 2014-11-13 10:58:13.0001 45921/7f7b72a65700 Pool2/Pool.h:726 ]: Analytics collection time...
[ 2014-11-13 10:58:13.0679 45921/7f7b72a65700 Pool2/Pool.h:830 ]: Analytics collection done; next analytics collection in 4.932 sec
[ 2014-11-13 10:58:13.5257 45921/7f7b715c0700 agents/HelperAgent/RequestHandler.h:1336 ]: [Client 20] New client accepted; new client count = 1
[ 2014-11-13 10:58:13.5259 45921/7f7b715c0700 Pool2/Group.h:775 ]: Session checked out from process (pid=46199, group=/usr/local/blacklight/diggit-hydra#default)
[ 2014-11-13 10:58:13.5260 45921/7f7b715c0700 agents/HelperAgent/RequestHandler.h:1959 ]: [Client 20] Session checked out: pid=46199, gupid=16809c2-FtkgTrFkZpq
[ 2014-11-13 10:58:13.5260 45921/7f7b715c0700 agents/HelperAgent/RequestHandler.h:2054 ]: [Client 20] Session initiated: fd=27
[ 2014-11-13 10:58:13.5430 45921/7f7b70919700 Pool2/Implementation.cpp:1274 ]: [App 45988 stderr] [ 2014-11-13 10:58:13.5428 46199/0x00000004c6b5c0(Worker 1) utils.rb:74 ]: *** Exception Errno::ENOENT in
@yulgit1
yulgit1 / gist:98489d23ca87d4b7f3bc
Last active August 29, 2015 14:07
YUL Access Control example
#current implementation as solr fields
#finegrained (view and download options for each datastream)
#using json nested literals for resolution
<str name="thumbnail_ss">Open Access</str>
<str name="jpg_ss">Yale Only</str>
<str name="jp2_ss">IP Restriction{130.132.111.227,128.36.*.*};NetID Restriction{handdan1}</str>
<str name="pdf_ss">Open Access</str>
<str name="ocr_ss">AD Group{mssasystems,libraryserveradmins}</str>
<str name="metadata_ss">Aeon Registration</str>
<str name="thumbnail_dl_ss">Open Access</str>
@yulgit1
yulgit1 / gist:41ddafc5831cb4f125c6
Created September 3, 2014 17:47
semantic handle creation using java Web Service client (another example) (using Netbeans wizard to create client methods)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.yale.library.ilts.findingaids;
//import edu.yale.library.ilts.handles.linktest.HandleMap.Map.Entry;
//import edu.yale.library.ilts.handles.linktest.ResultMap;
import java.util.HashMap;
import java.util.Map;
@yulgit1
yulgit1 / gist:02ab681fcb154c93e12a
Created September 3, 2014 17:41
semantic handle creation using java Web Service client (using Netbeans wizard to create client methods)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.yale.library.fortunoff.handles;
import edu.yale.library.fortunoff.link.ResultMap;
//import javax.xml.rpc.Call;
@yulgit1
yulgit1 / gist:e75db8375adebd8954d1
Created September 3, 2014 17:33
semantic handle creation with ruby Savon library
the gem:
gem "savon", "~> 2.0"
the basic config:
handles_enabled: false
handle_wsdl: http://linktest.odai.yale.edu/ypls-ws/PersistentLinking?wsdl
handle_prefix: 10079.1/digcoll
handle_group: 10079.1/DIGCOLL
handle_user: 10079.1/DIGCOLL
handle_credential: *
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
@yulgit1
yulgit1 / gist:f196f55d67cee766030d
Created June 27, 2014 21:09
sufia Gemfile.lock 1
GIT
remote: git://github.com/harai/kaminari.git
revision: 384fcb5d11b66a0cc8fad030104bf80f82616355
branch: route_prefix_prototype
specs:
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
GEM
#!/bin/bash
#note this program requires the setting of three variables:
# 1) the original akubra directory
# 2) the destination akubra directory
# 3) and awkcmd representing the hash structure
time_start=$(date)
orig_dir='/usr/local/fed362/data/objectStore'
NoMethodError in Spotlight::Resources::CsvController#template
undefined method `csvs' for #<Spotlight::Exhibit:0x007f90a4152908>
Rails.root: /hydra_store/ermadmix/spotlight/spotlight
Application Trace | Framework Trace | Full Trace
activemodel (4.1.1) lib/active_model/attribute_methods.rb:435:in `method_missing'
activerecord (4.1.1) lib/active_record/attribute_methods.rb:206:in `method_missing'
cancancan (1.8.2) lib/cancan/controller_resource.rb:184:in `resource_base'
cancancan (1.8.2) lib/cancan/controller_resource.rb:77:in `load_collection?'