Skip to content

Instantly share code, notes, and snippets.

@rwc9u
rwc9u / vault-secrets-bug-fix.md
Created November 4, 2025 19:20
Vault Secrets Not Passed to Workload Pods - Bug Fix

Vault Secrets Not Passed to Workload Pods - Bug Fix

Problem

When using Vault Agent injection with ToolHive's Kubernetes operator, secrets are injected into the proxy runner pod at /vault/secrets, but they are not being passed to the actual workload StatefulSet pod.

Symptoms

  • Vault agent successfully injects secrets into the proxy pod (visible in pod description)
  • Secrets are mounted at /vault/secrets in the proxy pod
@rwc9u
rwc9u / unsplash-mcp-example.md
Created November 4, 2025 03:02
Unsplash MCP Server usage example and setup instructions

Unsplash MCP Server Usage Example

Query Example

{
  "tool": "search_photos",
  "query": "mountain",
  "per_page": 5,
 "orientation": "landscape"
@rwc9u
rwc9u / PULL_REQUEST_TEMPLAT.md
Created March 13, 2018 16:04
Pull Request Template

What does it do?

  • Item

What else do you need to know?

  • Item

Related Tickets

  • DIGITAL-XYZ

Screenshots

Image

Communication

(optional)

@rwc9u
rwc9u / add_index_patch.rb
Created June 19, 2012 07:57
Adding Index on Heroku without a Restart
module ActiveRecord::ConnectionAdapters::SchemaStatements
def add_index_with_quiet(table_name, column_names, options = {})
quiet = options.delete(:quiet)
add_index_without_quiet table_name, column_names, options
rescue
raise unless quiet and $!.message =~ /^Index name '.*' on table '#{table_name}' already exists/i
puts "Failed to create index #{table_name} #{column_names.inspect} #{options.inspect}"
end
alias_method_chain :add_index, :quiet
@rwc9u
rwc9u / address.rb
Created June 21, 2011 20:11
:accepts_nested_attributes_for with custom autosave
class Address < ActiveRecord::Base
has_many :phonings, :as => :phonable
has_many :phone_numbers, :through => :phonings
accepts_nested_attributes_for :phonings, :allow_destroy => true
end
@rwc9u
rwc9u / sample_models.rb
Created June 21, 2011 20:07
:accepts_nested_attributes_for with custom autosave
class Address < ActiveRecord::Base
has_many :phonings, :as => :phonable
has_many :phone_numbers, :through => :phonings
accepts_nested_attributes_for :phonings, :allow_destroy => true
end
class Person < ActiveRecord::Base
has_many :phonings, :as => :phonable

Rails 3 Design Choices - Jose Valim

SOLID Design Principles

Agile Software Development - Bob Martin Book is based on developing in Java/C… some interpretation for ruby.

Single Responsibility Open Closed - open for extension … closed for modification Liskov Substition

Rails 3 Design Choices - Jose Valim

SOLID Design Principles

Agile Software Development - Bob Martin Book is based on developing in Java/C… some interpretation for ruby.

Single Responsibility Open Closed - open for extension … closed for modification Liskov Substition

ruby-1.9.2-p136 :001 > j = Job.last
ruby-1.9.2-p136 :002 > j.file_data.file.gridio.class
=> Mongo::GridIO
ruby-1.9.2-p136 :003 > CSV.new(j.file_data.file.gridio)
NoMethodError: undefined method `pos' for #<GridIO _id: 4d5cbe235ef0dbcaf2000001>
from /Users/rchristie/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/csv.rb:2011:in `init_separators'
from /Users/rchristie/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/csv.rb:1570:in `initialize'
from (irb):3:in `new'
from (irb):3
from /Users/rchristie/dev/cast/vendor/ruby/1.9.1/gems/railties-3.0.4/lib/rails/commands/console.rb:44:in `start'
@rwc9u
rwc9u / irbrc
Created February 14, 2011 15:44
#-*-Ruby-*-
require 'rubygems'
require 'pp'
require 'wirble'
require 'hirb'
require 'ap'
if RUBY_VERSION[0..2] == "1.9"
require 'flyrb'
else
require 'utility_belt'