Skip to content

Instantly share code, notes, and snippets.

@arubis
arubis / migrate-jaeger-to-otel-operator-fixes.md
Created December 20, 2025 03:04
Fixes for migrate-jaeger-to-otel-operator task (UUID: 14a08734-50a8-4768-9d5f-bbe507a432d5)

migrate-jaeger-to-otel-operator Task Fixes

Task UUID: 14a08734-50a8-4768-9d5f-bbe507a432d5

These patches fix the V4 task to work with the current nebula-devops:latest base image.

Problem

The original V4 task failed test-solution because:

@arubis
arubis / apex-arena-entrypoint-wait.patch
Last active December 18, 2025 18:33
apex-arena: Fix race condition in test-solution by waiting for entrypoint completion
From: Claude Code
Subject: [PATCH] Fix race condition in test-solution by waiting for entrypoint completion
The test-solution command starts containers with `docker run -d ... sleep infinity`
which returns immediately, then runs `docker exec setup.sh` before the container's
entrypoint has finished critical initialization (node cleanup, PV recreation, etc.).
This causes Nebula-based tasks to fail because:
1. Snapshot contains stale node ID from when it was created
2. Entrypoint cleans up old nodes at line ~585
@arubis
arubis / client-retry-demo.ts
Created October 13, 2025 21:19
Phase 2 Frontend Test Integration - Interactive Demonstrations (RFC-060-AMENDMENT-001)
/**
* TestIntegrationClient Retry Behavior Demonstration
*
* This shows how the backend API client handles errors and retries
* with exponential backoff.
*/
console.log('='.repeat(80));
console.log('TEST INTEGRATION CLIENT - RETRY BEHAVIOR DEMONSTRATION');
console.log('='.repeat(80));
@arubis
arubis / expose-service.sh
Last active October 13, 2025 14:43
Nginx userspace proxy script - expose localhost service on interface IPs
#!/bin/bash
# Create temporary nginx config
CONF_FILE=$(mktemp)
trap "rm -f $CONF_FILE" EXIT
cat > "$CONF_FILE" << 'EOF'
pid /tmp/nginx.pid;
error_log /tmp/nginx-error.log;
@arubis
arubis / transcriber-setup.sh
Last active October 11, 2024 04:31
Youtube talk summarizer
#!/bin/bash
set -e
PROJECT_NAME="youtube_transcriber"
mkdir -p $PROJECT_NAME
cd $PROJECT_NAME
cat << EOF > Gemfile
source 'https://rubygems.org'
@arubis
arubis / script.md
Last active February 4, 2022 20:35
SFBT script

Them knowing the answers to their questions is helpful

For new visits/clients:
Beginning
How do you want things to be when this gets better? (What do you want?)

For follow-up visits:
So what’s better?
How did you manage?
How did you keep things from getting worse?

@arubis
arubis / factorybot_trait_exploration.rb
Created March 25, 2020 19:58
Asking for a friend!
FactoryBot.define do
factory :car_communication_rule do
rule_id { SecureRandom.uuid }
end
trait :tire_pressure do
transient do
tp_code { "FR" }
tp_name { "Front right" }
end
for vol_id in $(aws ec2 describe-volumes --filters="Name=status,Values=['available']" | jq '.Volumes[12].VolumeId' | sed 's/\"//g');
do aws ec2 create-snapshot --volume-id ${vol_id}
# do aws ec2 create-snapshot --volume-id ${vol_id} --tag-specifications="[{\"ResourceType\":\"snapshot\",\"Tags\":$(aws ec2 describe-volumes --volume-ids ${vol_id} | jq '.Volumes[].Tags' -c)}]"
done
require "rails_helper"
describe "index issue" do
with_model :MidsizeNameChild do
table do |t|
t.belongs_to :midsize_name_parent,
index: { name: "shorter_index_name" }
end
model do
# frozen_string_literal: true
# source: https://github.com/rails-api/active_model_serializers/blob/v0.10.6/docs/howto/upgrade_from_0_8_to_0_10.md#2-add-activemodelv08serializer
module ActiveModel::V08
class Serializer < ActiveModel::Serializer
include Rails.application.routes.url_helpers
# AMS 0.8 would delegate method calls from within the serializer to the
# object.