Skip to content

Instantly share code, notes, and snippets.

View orangewolf's full-sized avatar

Rob Kaufman orangewolf

View GitHub Profile
f = Rails.root.join("tmp/imports/AMS1Importer_170000-180000/15-10wq0f0r.xml")
instantiation_identifier = nil
results = {}
# read each xml file
# get the physical_instantiation_local_identifiers and their matching cpb-aacip id
# get the digital_instantiation_local_identifiers and their matching cpb-aacip id
line = File.read(f)
pbcore_id = line.scan(/(cpb-aacip\/.+?)<\//).flatten.first
@orangewolf
orangewolf / samvera-training-work-types.md
Created October 17, 2023 23:58 — forked from ShanaLMoore/samvera-training-work-types.md
Samvera Training Workshop: SESSION 2 - WORK TYPES

image

Samvera Training Workshop - SESSION 2 - WORK TYPES

September 13, 2023. 8AM to 2PM PT

Welcome!

Here you'll find the workshop's exercises and supplemental training materials that is meant to go along with the commits found within this PR. As you work through the exercises, you can reference the related commit(s) to check your progress. YOU WILL NOT NEED TO CHECK OUT THIS BRANCH.

We are a community! "When the tide rises, all ships sail". ⛵️ Your feedback and/or contributing back to the Samvera community directly would be greatly appreciated by all!

dc:contributor "contributor 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:creator "creator1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:description "description 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:language "english1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:publisher "publisher 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:publisher "publisher 2"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:rights "rights notes 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:subject "subject 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
ebucore:hasRelatedImage <http://localhost:8080/rest/dev/cz/30/ps/64/cz30ps64c> ;
ebucore:hasRelatedMediaFragment <http://localhost:8080/rest/dev/cz/30/ps/64/cz30ps64c> ;
dc:contributor "contributor 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:creator "creator1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:description "description 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:language "english1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:publisher "publisher 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:publisher "publisher 2"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:rights "rights notes 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
dc:subject "subject 1"^^<http://www.w3.org/2001/XMLSchema#string> ;
ebucore:hasRelatedImage <http://localhost:8080/rest/dev/cz/30/ps/64/cz30ps64c> ;
ebucore:hasRelatedMediaFragment <http://localhost:8080/rest/dev/cz/30/ps/64/cz30ps64c> ;
tilmabeta-production-rails-548bbb7998-5kkpg rails method=GET path=/ format=*/* controller=Refinery::PagesController action=home status=500 error='ActionView::Template::Error: Webpacker can't find frontend-pack in /home/app/webapp/public/packs/manifest.json. Possible causes:
tilmabeta-production-rails-548bbb7998-5kkpg rails 1. You want to set webpacker.yml value of compile to true for your environment
tilmabeta-production-rails-548bbb7998-5kkpg rails unless you are using the `webpack -w` or the webpack-dev-server.
tilmabeta-production-rails-548bbb7998-5kkpg rails 2. webpack has not yet re-run to reflect updates.
tilmabeta-production-rails-548bbb7998-5kkpg rails 3. You have misconfigured Webpacker's config/webpacker.yml file.
tilmabeta-production-rails-548bbb7998-5kkpg rails 4. Your webpack configuration is not creating a manifest.
tilmabeta-production-rails-548bbb7998-5kkpg rails Your manifest contains:
tilmabeta-production-rails-548bbb7998-5kkpg rails {
tilmabeta-production-rails-548bbb7998-5kkpg rails "
@orangewolf
orangewolf / mysql.server.cnf
Created September 14, 2022 15:55
gbh ams2 mysql-server-config
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#
# this is read by the standalone daemon and embedded servers
[server]
tap 'd12frosted/emacs-plus'
tap 'adoptopenjdk/openjdk'
tap 'homebrew/services'
tap 'mutagen-io/mutagen'
tap 'homebrew/cask-fonts'
# brew 'vips'
brew 'amazon-ecs-cli'
brew 'ansible'
brew 'aws-iam-authenticator'
for cmd in rspec ruby rubocop rails; do
alias $cmd="bundle exec $cmd"
done
export class FieldManager {
constructor(element, options) {
this.element = $(element);
this.options = options;
this.options.label = this.getFieldLabel(this.element, options)
this.addSelector = '.add'
this.removeSelector = '.remove'
@orangewolf
orangewolf / reindex_methods.rake
Created May 27, 2022 23:01
Active Fedora ID based Reindex
namespace :reindex do
def formated_offset(offset)
offset.to_s.rjust(5, '0')
end
def print_docs(docs, offset)
File.open("tmp/to_index_#{formated_offset(offset)}.log", "w") do |f|
docs.each do |doc|
f.puts doc['id']
end