Skip to content

Instantly share code, notes, and snippets.

View orangewolf's full-sized avatar

Rob Kaufman orangewolf

View GitHub Profile
@orangewolf
orangewolf / op_read.rb
Last active March 13, 2026 13:59
Batch-read 1Password items by reference ID
#!/usr/bin/env ruby
# op_read.rb — OpenClaw external secrets exec provider for 1Password CLI
#
# Reads the OpenClaw exec provider protocol from stdin, resolves each id
# via `op read op://<id>`, and returns the protocol response on stdout.
#
# Input (stdin):
# { "protocolVersion": 1, "provider": "op", "ids": ["Personal/OpenAI/apiKey", ...] }
#
# Output (stdout):
{% extends "appbuilder/base.html" %} {% block content %}
<div class="container">
<div
id="loginbox"
style="margin-top: 50px"
class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2"
>
<div class="panel panel-primary">
<div class="panel-heading">
<div class="panel-title">{{ title }}</div>
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 March 5, 2026 00:53 — 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