Skip to content

Instantly share code, notes, and snippets.

View Jimgerneer's full-sized avatar

Jim Denton Jimgerneer

  • Blinker
  • Denver
View GitHub Profile
@Jimgerneer
Jimgerneer / ga4-instrumentation-plan.md
Created April 17, 2026 16:32
GA4 Event Instrumentation Plan — BZZR Web & Flutter

GA4 Event Instrumentation Plan — BZZR Consumer Apps

This plan covers installing GA4 tracking and instrumenting custom events in both bzzr-web (Next.js) and bzzr-flutter. Both apps feed into the same GA4 property per environment via their respective data streams.


Table of Contents

@Jimgerneer
Jimgerneer / postmortem-2026-03-28-home-screen-crash.md
Last active March 30, 2026 22:57
Post-Mortem: Home Screen Crash - March 28, 2026

Post-Mortem: Home Screen Crash (March 28, 2026)

Date of incident: Saturday, March 28, 2026 Duration: ~2 hours (8:00 AM - 10:00 AM MDT) Severity: Critical — app unusable for all testflight users Responders: Troy, Noman, Anton, Max, Jim, Dima A.


Summary

@Jimgerneer
Jimgerneer / unsafe-list-access-audit.md
Created March 30, 2026 16:20
Unsafe list access patterns audit - bzzr-flutter

Unsafe List Access Patterns - Remaining Issues

These are non-API-related instances of firstWhere (without orElse) and unsafe .first/.last access that could crash if lists are empty or don't contain a matching element. These are lower priority than the API-related ones (which have been fixed) but should still be addressed.

Hypes Screen Notifier

File: apps/bzzr_flutter/lib/features/Home/presentation/screens/hypes/hypes_screen_notifier.dart:137

final activity = state.valueOrNull?.activities.firstWhere(

Domain Migration: app.bzzr.combzzr.com

Current → Target

Environment Current Target
Production app.bzzr.com bzzr.com
Staging app.staging.bzzr.com staging.bzzr.com
Webflow bzzr.com decommissioned
@Jimgerneer
Jimgerneer / email-verification-error-flow.md
Last active March 11, 2026 19:39
Email Verification Error Handling — Decision Flow

Email Verification Error Handling Flow

Problem

The current VerifyEmail.tsx catch block is generic — it shows a toast and redirects to /signin regardless of the error type or user state. This creates a poor experience in several scenarios.

Cases This Solves

  1. User clicks a verification link after already being verified — e.g., they verified via one link but later click an older one from their inbox. Instead of showing a confusing error, the system detects they're already verified and sends them home.
@Jimgerneer
Jimgerneer / buzz.rb
Created December 3, 2013 04:17
FizzBuzz
class FizzBuzz
def self.play(array)
array.collect do | num |
self.fizzbuzz(num) || self.buzz(num) || self.fizz(num) || num
end
end
def self.fizz(n)
@Jimgerneer
Jimgerneer / gist:6105276
Created July 29, 2013 15:42
Ruby Warrior
class Player
def play_turn(warrior)
@warrior = warrior
@direction ||= :backward
@health ||= warrior.health
@hurt ||= false
@step ||= true
explore(@direction)
@Jimgerneer
Jimgerneer / ruby
Last active December 15, 2015 13:19
Fail sauce
class Canoe
class CommitValue < Struct.new(:email, :committed_date); end
def self.weight(commit_values)
sorted_by_email_list = commit_values.group_by(&:email)
scored_by = sorted_by_email_list.each_with_object({}) do |(email, commit), hsh|
hsh[email] = sorted_by_email_list[email].count
hsh
class Bill < ActiveRecord::Base
attr_accessible :invoice, :amount, :initiated_by_id, :payer_id, :origin_id, :destination_id ,:accepted, :paid, :auto, :frequency, :payments_left
belongs_to :initiated_by, class_name: 'Member', foreign_key: :initiated_by_id
belongs_to :payer, class_name: 'Member', foreign_key: :payer_id
belongs_to :origin, class_name: 'Account', foreign_key: 'origin_id'
belongs_to :destination, class_name: 'Account', foreign_key: 'destination_id'
validates_numericality_of :amount, greater_than_or_equal_to: 0.01
validates :amount, :presence => {message: "cannot be blank"}
@Jimgerneer
Jimgerneer / perpetrator.rb
Created January 23, 2013 21:02
perp model
class Perpetrator < ActiveRecord::Base
attr_accessible :name
has_many :reports
scope :sort_by_highest_bounty, order("max_bounty DESC")
scope :sort_by_most_reported, order("record_count DESC")
scope :sort_by_most_evidence, order("evidence_count DESC")
scope :filter_by_civ, lambda {|civ| where(["reports.civilization_id = ?", civ])}
scope :sort_by_most_wanted, order(" ( (SUM(CASE when reports.active = 't' THEN reports.bounty ELSE 0 END) - MAX(reports.bounty))*(COUNT(DISTINCT reports.id) + (SUM(COALESCE(evidence_links.evidence_count,0)) * 3 ) ) ) / (MIN(extract(epoch FROM now() - reports.created_at)) / 86400 + 1.3) DESC")