Skip to content

Instantly share code, notes, and snippets.

View ColinDKelley's full-sized avatar

Colin Kelley ColinDKelley

  • Invoca, Inc.
  • Santa Barbara, CA
View GitHub Profile
@ColinDKelley
ColinDKelley / hidden_from_reporting_tag_c38f8bc8.plan.md
Created April 13, 2026 02:05
Hidden From Reporting Tag - Implementation Plan

name: Hidden From Reporting Tag overview: Add a $Hidden From Reporting standard data tag and make all reporting surfaces treat tagged fields as if they were deleted (not present in the dictionary). todos:

  • id: register-tag content: Create packs/standard_data/catalog/hidden_from_reporting_tag.rb with TagDefinition registration status: pending
  • id: not-tagged-as content: Add not_tagged_as class method to CustomerData::Field as complement to tagged_as status: pending
@ColinDKelley
ColinDKelley / hidden_from_reporting_tag_c38f8bc8.plan.md
Created April 13, 2026 01:44
Hidden From Reporting Tag - Implementation Plan

name: Hidden From Reporting Tag overview: Add a $Hidden From Reporting standard data tag and make all reporting surfaces treat tagged fields as if they were deleted (not present in the dictionary). todos:

  • id: register-tag content: Create packs/standard_data/catalog/hidden_from_reporting_tag.rb with TagDefinition registration status: pending
  • id: not-tagged-as content: Add not_tagged_as class method to CustomerData::Field as complement to tagged_as status: pending
@ColinDKelley
ColinDKelley / hidden_from_reporting_tag_c38f8bc8.plan.md
Last active April 13, 2026 01:42
Hidden From Reporting Tag - Implementation Plan

name: Hidden From Reporting Tag overview: Add a $Hidden From Reporting standard data tag and make all reporting surfaces treat tagged fields as if they were deleted (not present in the dictionary). todos:

  • id: register-tag content: Create packs/standard_data/catalog/hidden_from_reporting_tag.rb with TagDefinition registration status: pending
  • id: not-tagged-as content: Add not_tagged_as class method to CustomerData::Field as complement to tagged_as status: pending
@ColinDKelley
ColinDKelley / hidden_from_reporting_tag_c38f8bc8.plan.md
Created April 12, 2026 15:32
Hidden From Reporting Tag - Implementation Plan

name: Hidden From Reporting Tag overview: Add a $Hidden From Reporting standard data tag and make all reporting surfaces treat tagged fields as if they were deleted (not present in the dictionary). todos:

  • id: register-tag content: Create packs/standard_data/catalog/hidden_from_reporting_tag.rb with TagDefinition registration status: pending
  • id: field-scope content: Add visible_in_reporting scope to CustomerData::Field status: in_progress
destination_address =
if call_flow.sip_integration_if_enabled
if advertiser.feature_enabled?(:sip_integration_destination_in_display_format) ||
!(destination_phone_number = PhoneNumberWithExtension.new(destination)).valid?
destination.presence
else
destination_phone_number
end
else
destination_phone_number(destination)
orig = File.read("King Bee emails from Rachel.txt")
cleaned = orig
.force_encoding('BINARY')
.gsub("\xCA".force_encoding('BINARY'), '')
.gsub(/\r+/, '; ')
.gsub("\"; <", "\" <")
.gsub(/; */, "\n")
.gsub(/^"/, '')
.gsub("\" ", ' <')
Race 5 horses. Take the fastest 3 and race them against 2 chosen from the remainder. Repeat until there are are no remaining.
The final 3 from the last race are the fastest of the group.
races = 1 + (25 - 5)/2 = 11

Solution to Three Gods Logic Puzzle

  1. Ask god A: "Would the other non-random god answer 'Ja' to the question 'Does the random god sit to your left1?'"

=> If the answer is 'Ja', then it's false (or random), therefore NonRandom1 = C; else it's true (or random), therefore NonRandom1 = B

  1. Ask gods[NonRandom1]: "Would the other non-random god answer 'Ja' to the question 'Does the random god sit to your left1?"
@ColinDKelley
ColinDKelley / prisoner_hat.md
Last active December 25, 2015 20:37
prisoner hat riddle

Answer

The tallest prisoner counts the white hats in front of him. If odd, he calls out "white"; if even he calls out "black".

Then each prisoner down the line makes the same calculation. If the color they compute is different from what was called out before them, they know their color is "white"; if it's the same, their color is "black". They call out their color.

Reasoning

tiles = {}
STDIN.readlines.map.with_index do |line, y|
x = 0
line.chomp.split(".").each do |segment|
unless segment.empty?
tile = [x, segment.size, segment[0]]
if value = tiles[tile]
tiles[tile] = [value.first, value.last + 1]
else