Skip to content

Instantly share code, notes, and snippets.

Avatar

James Van Mil jamesvanmil

View GitHub Profile
View keybase.md

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:

@jamesvanmil
jamesvanmil / .block
Last active Jul 12, 2017
visualization-001
View .block
license: gpl-3.0
height: 600
@jamesvanmil
jamesvanmil / scripts.rb
Created Aug 28, 2017
Scripts to check on content
View scripts.rb
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/] }
View spec.rb
# frozen_string_literal: true
require "rails_helper"
describe CollectionLoader do
let(:user) { create(:user) }
let(:collection_pid) { nil }
let(:attributes) do
{
pid: collection_pid,
View identifier.architecture.md

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.
View cdroms.sql
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%'