Skip to content

Instantly share code, notes, and snippets.

View jcoyne's full-sized avatar

Justin Coyne jcoyne

  • Stanford University Libraries
  • Minneapolis, MN
View GitHub Profile
@jcoyne
jcoyne / response.txt
Created July 30, 2019 17:01
"You guys" Slack response
Instead of *guys* perhaps you mean *everyone*? ...[Please consider editing your response so it's more inclusive]
Instead of *guys* perhaps you mean *y'all*? ...[Please consider editing your response so it's more inclusive]
Instead of *guys* perhaps you mean *team*? ...[Please consider editing your response so it's more inclusive]
Instead of *guys* perhaps you mean *colleagues*? ...[Please consider editing your response so it's more inclusive]
Attaching to sinopia_editor_platformdata_1
platformdata_1 | 2019/06/06 13:28:50 Waiting for: tcp://platform:8080
platformdata_1 | 2019/06/06 13:28:50 Connected to tcp://platform:8080
platformdata_1 | creating root container
platformdata_1 | creating repository container
platformdata_1 | creating alberta group container
platformdata_1 | creating boulder group container
platformdata_1 | creating chicago group container
platformdata_1 | creating cornell group container
platformdata_1 | creating dlc group container
#!/usr/bin/env ruby
# frozen_string_literal: true
# Usage:
# ./bin/set-active-version <pathToVersionCSV>
puts 'Loading environment...'
require File.expand_path('../config/environment', __dir__)
require 'csv'
@jcoyne
jcoyne / out.log
Created March 19, 2019 15:47
workflow getting slow then stopping
```
App 20285 stdout: [17b17870-b711-404b-a729-cafa047e3281] Processing by WorkflowQueuesController#show as XML
App 20285 stdout: [17b17870-b711-404b-a729-cafa047e3281] Parameters: {"completed"=>"dor:gisAssemblyWF:wrangle-data", "lane-id"=>"default", "limit"=>"100", "waiting"=>"dor:gisAssemblyWF:package-data"}
App 20233 stdout: [78bea94a-70a7-4473-8e1d-946c4a5dd2bb] Rendering workflow_queues/show.xml.builder
App 20233 stdout: [78bea94a-70a7-4473-8e1d-946c4a5dd2bb] Rendered workflow_queues/show.xml.builder (0.1ms)
App 20233 stdout: [78bea94a-70a7-4473-8e1d-946c4a5dd2bb] Completed 200 OK in 185ms (Views: 0.6ms | ActiveRecord: 182.8ms)
App 20233 stdout: [95fab39f-c36d-448b-9070-c8890909d3ac] Started GET "/workflow_queue/lane_ids?step=dor%3AgisAssemblyWF%3Aextract-boundingbox" for 171.67.35.38 at 2019-03-19 08:43:40 -0700
App 20233 stdout: [95fab39f-c36d-448b-9070-c8890909d3ac] Processing by WorkflowQueuesController#lane_ids as XML
App 20233 stdout: [95fab39f-c36d-448b-9070-c8890909d3ac] Parameters: {"ste
@jcoyne
jcoyne / github-pr-urls.js
Last active November 25, 2019 16:12
Grab GitHub PR URLs for weekly dependency updates
// Forked from https://gist.githubusercontent.com/camillevilla/16b53c50eccc11de0cb40ee0be7dcf03/raw/51f2473d5b04bb72e835ac9168381d87c0961d31/github-pr-urls.js
// PR search at https://github.com/pulls
// is:pr org:sul-dlss head:update-dependencies created:2018-05-08..2018-05-09
// Repo order used in our update script and status table
// https://github.com/sul-dlss/access-update-scripts/blob/master/infrastructure/ruby
var repoList= "argo common-accessioning dlme dlme-transform dor-services-app dor_indexing_app dor-fetcher-service gis-robot-suite google-books hydra_etd hydrus lyberservices-scripts modsulator-app-rails preservation_catalog preservation_robots pre-assembly repository-api rialto-etl rialto-webapp robot-console sul_pub sdr-services-app was-registrar-app was_robot_suite was-thumbnail-service workflow-server-rails"
repoList = repoList.split(' ')
@jcoyne
jcoyne / bnf.json
Created March 4, 2019 16:59
Sample BnF record that has a URL for the identifier.
{"cho_title":["The Bahá'í world : a biennial international record. Volume VII., April 1936 - April 1938 / prepared under the supervision of the National Spiritual Assembly of the Baha'is of the United States and Canada with the approval of Shoghi Effendi"],"cho_date":["1939"],"cho_description":["Numérisé par le partenaire","Appartient à l’ensemble documentaire : BbLevt0","Numérisé par le partenaire"],"cho_dc_rights":["domaine public","public domain"],"cho_format":["xxiii, 303 pages : illustrations ; 26 cm","Nombre total de vues : 934"],"cho_publisher":["(New York)"],"cho_relation":["Notice du catalogue : http://catalogue.bnf.fr/ark:/12148/cb445887770"],"cho_source":["Bibliothèque Orientale de l'Université Saint-Joseph de Beyrouth, 140 D6"],"cho_contributor":["National Spiritual Assembly of the Bahá'ís of Canada"],"cho_edm_type":["text"],"cho_language":["French"],"id":"https://gallica.bnf.fr/ark:/12148/bpt6k91073505","agg_data_provider":"Bibliothèque Orientale","agg_provider":"Bibliothèque nationale de France"
@jcoyne
jcoyne / gist:a3fde6de1a06991b8440a31ce517a59f
Created January 18, 2019 21:27
Infrastructure improvments
dor-services 6 & 6.1. - Many structural improvements. Moving services out of the models. Create Indexers.
dor-services-client - A standard way to interact with dor-services-app
workflow-server-rails - Move away from java & oracle to rails and postgres
consolidate robots
col.class.ancestors
=> [Dor::Collection,
Dor::Releaseable,
Dor::Set,
#<Module:0x0000000006517678>,
#<Module:0x000000000661dea0>,
#<Module:0x000000000661eb48>,
#<Module:0x000000000661f430>,
Dor::Publishable,
Dor::Abstract,
@jcoyne
jcoyne / gist:fdcc08a914a4812e3064d1980ab03119
Created December 4, 2018 03:39
Methods in dor-services
# 6.1.0
Dor::Item.new.methods.count - Object.new.methods.count
=> 352
@jcoyne
jcoyne / gist:1d66e4c190fa411ebbaf4208db275d39
Last active November 29, 2018 21:04
Argo indexing tests
File.open('new-qq613vj0238.txt', 'w') do |file|
h = Dor.find("druid:qq613vj0238").to_solr.stringify_keys
file.puts JSON.pretty_generate(h)
end
cat old-qq613vj0238.txt | jq '.' --sort-keys > old-sorted.txt
cat new-qq613vj0238.txt | jq '.' --sort-keys > new-sorted.txt
diff new-sorted.txt old-sorted.txt