Skip to content

Instantly share code, notes, and snippets.

View orangewolf's full-sized avatar

Rob Kaufman orangewolf

View GitHub Profile
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1bdc763..fc256d2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -82,7 +82,7 @@ RED_CANDLE_REAL_INFERENCE=true bundle exec rspec
**To switch back to working without Red Candle:**
```bash
-bundle config set --local without red_candle
+bundle config unset with
@orangewolf
orangewolf / find-bitnami-images.rb
Created August 13, 2025 22:11
Script to find all bitnami images in the current k8s cluster
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'json'
require 'open3'
require 'optparse'
# Ruby script to find Bitnami-based container images deployed in Kubernetes cluster
# Shows namespace, pod/deployment info, and associated Helm chart when available
```ruby
switch!('adl')
queue = Valkyrie::IndexingAdapter.find(:redis_queue)
error_log = ActiveSupport::Logger.new("/app/samvera/hyrax-webapp/tmp/imports/indexing_errors.log")
@set = []
solr_indexer = Valkyrie::IndexingAdapter.find(:solr_index)
index_error_name = "toindex3929b765-8d25-48ab-986f-3ce4edf75a6b-error"
size = queue.connection.zrange(index_error_name, 0, -1).size
size.times do |i|
@orangewolf
orangewolf / sync.log
Created May 15, 2025 16:15
superset-dashboard-downloads
D, [2025-05-15T09:11:22.476744 #19046] DEBUG -- : Happi: GET https://superset.scientist.com/api/v1/dashboard/export/, {:q=>"!(86)"}
API Error: {"message"=>"Not found"}
+ id: 86 failed for The requested resource was not found
D, [2025-05-15T09:11:23.921620 #19046] DEBUG -- : Happi: GET https://superset.scientist.com/api/v1/dashboard/export/, {:q=>"!(74)"}
D, [2025-05-15T09:11:25.929371 #19046] DEBUG -- : Happi: GET https://superset.scientist.com/api/v1/dashboard/export/, {:q=>"!(83)"}
API Error: {"message"=>"Not found"}
+ id: 83 failed for The requested resource was not found
D, [2025-05-15T09:11:29.350597 #19046] DEBUG -- : Happi: GET https://superset.scientist.com/api/v1/dashboard/export/, {:q=>"!(51)"}
API Error: {"message"=>"Not found"}
+ id: 51 failed for The requested resource was not found
@orangewolf
orangewolf / Console.rb
Last active May 8, 2025 16:59
DOT NTL Sipity Untangler
# Get to the right tenant, almost always step 1 in Hyku console commands
switch!(Account.first)
# There is one workflow state that we want to keep
Sipity::WorkflowState.find(128).update(workflow_id: 1)
# Find all the workflow actions for the state we just kept and move it to the first 1 workflow also
Sipity::WorkflowAction.where(workflow_id: 15, resulting_workflow_state_id: 128).update_all(workflow_id: 1)
# Find all the incorrect workflow roles and set the EntitySpecificResponsibility to have the correct role
@orangewolf
orangewolf / gist:962f67e5a3acac4fa823be22f5775496
Created April 8, 2025 21:40
docker-compose.override.yml
services:
# # Uncomment to allow for the use of a ruby debugger (byebug, pry, etc) in Docker.
# # See http://playbook-staging.notch8.com/en/devops/docker_debugger for more info.
initialize_app:
command: echo 'skip'
web:
command: sh -l -c "sleep infinity"
environment:
- AUXILIARY_QUEUE_TENANTS="sdapi"
- AWS_REGION=us-east-1
@orangewolf
orangewolf / uninstall_rippling.sh
Last active January 9, 2025 18:22 — forked from 10maurycy10/uninstall_rippling.sh
A script to remove Rippling MDM.
#!/bin/bash
export PS4='+[$(date -u)][${BASH_SOURCE}:${LINENO}]: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'; set -x;
if [ `id -u` -ne 0 ]; then
echo "Rippling uninstall must be run by root"
exit 1
fi
sudo launchctl unload /Library/LaunchDaemons/com.rippling.*
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> ;