Skip to content

Instantly share code, notes, and snippets.

View jamesvanmil's full-sized avatar

James Van Mil jamesvanmil

View GitHub Profile
SELECT
CONCAT('b', b.record_num, 'a'),
s.marc_tag,
s.content
FROM
sierra_view.bib_view b
JOIN sierra_view.subfield s ON b.id = s.record_id
WHERE
s.marc_tag = '007'
AND s.content LIKE '_o%'

Mahonia

https://github.com/curationexperts/mahonia

Notes:

Hyrax::Actor::DataciteActor runs DataciteRegisterJob, which runs Mahonia::IdentifierDispatcher, which assigns an identifier to the object.

This involves two steps:

  • Registering the identifier with the registrar service via registrar.
# frozen_string_literal: true
require "rails_helper"
describe CollectionLoader do
let(:user) { create(:user) }
let(:collection_pid) { nil }
let(:attributes) do
{
pid: collection_pid,
@jamesvanmil
jamesvanmil / scripts.rb
Created August 28, 2017 17:42
Scripts to check on content
versions = GenericFile.all.map { |gf| {pid: gf.pid, versions: gf.versions.length } }
versions.select { |f| f[:versions] > 1 }
works = []
Curate.configuration.registered_curation_concern_types.each do |klass|
works += klass.constantize.all.select { |work| work.depositor != work.owner }
end
Person.all.select { |p| p.representative_image_url[/downloads/] }
@jamesvanmil
jamesvanmil / .block
Last active July 12, 2017 13:02
visualization-001
license: gpl-3.0
height: 600

Keybase proof

I hereby claim:

  • I am jamesvanmil on github.
  • I am jamesvanmil (https://keybase.io/jamesvanmil) on keybase.
  • I have a public key whose fingerprint is 119A 66E6 6CDA 344C E572 4B97 3E27 6AD7 0BED F8E4

To claim this, I am signing this object: