Skip to content

Instantly share code, notes, and snippets.

@BenMinga
BenMinga / 1-cx-incident-response-framework.md
Last active March 26, 2026 18:30
CX Incident Response Framework

CX Incident Response Framework

Philosophy

Every issue flows through the same pipeline. Priority is a dial that controls intensity — how fast we mobilize, how broadly we communicate, how deeply we review. Same process for an outage and a cosmetic bug, just different settings.

flowchart LR
    A[Signal] --> B[Triage]
 B --> C[Mobilize]
@BenMinga
BenMinga / snowflake_cost_breakdown_updated.md
Last active February 18, 2026 19:27
Snowflake AI Cost Breakdown

Snowflake AI Cost Breakdown (Updated)

1. Snowflake Pricing Model

Snowflake charges in credits.

Our plan:

  • $2 per credit
@BenMinga
BenMinga / exercise4.py
Created February 13, 2026 19:29
Lambda Workshop - Exercise 4: Environment Variables (Python)
# Exercise 4: Add Environment Variables (Python)
# Runtime: Python 3.12
# BEFORE RUNNING: Add environment variables in Lambda Console:
# Configuration → Environment variables → Edit
# - DB_HOST = db.example.com
# - API_KEY = secret-key-123
import json
import os
@BenMinga
BenMinga / exercise4.js
Created February 13, 2026 19:29
Lambda Workshop - Exercise 4: Environment Variables (JavaScript)
// Exercise 4: Add Environment Variables (JavaScript/Node.js)
// Runtime: Node.js 20.x
// BEFORE RUNNING: Add environment variables in Lambda Console:
// Configuration → Environment variables → Edit
// - DB_HOST = db.example.com
// - API_KEY = secret-key-123
// INIT: Uses environment variables from Lambda config
const config = {
@BenMinga
BenMinga / exercise3.py
Created February 13, 2026 19:29
Lambda Workshop - Exercise 3: Connection Reuse (Python)
# Exercise 3: Optimized Function with Connection Reuse (Python)
# Runtime: Python 3.12
import json
from datetime import datetime
import random
# INIT: Runs ONCE per cold start
config = {
'initialized': datetime.now().isoformat(),
@BenMinga
BenMinga / exercise3.js
Created February 13, 2026 19:29
Lambda Workshop - Exercise 3: Connection Reuse (JavaScript)
// Exercise 3: Optimized Function with Connection Reuse (JavaScript/Node.js)
// Runtime: Node.js 20.x
// INIT: Runs ONCE per cold start - reused across invocations
const config = {
initialized: new Date().toISOString(),
connectionPool: `Connection-${Math.random()}`
};
console.log('INIT: Setup completed');
@BenMinga
BenMinga / exercise2.py
Created February 13, 2026 19:29
Lambda Workshop - Exercise 2: API Handler (Python)
# Exercise 2: API Handler with Validation (Python)
# Runtime: Python 3.12
import json
def handler(event, context):
if not event.get('email') or '@' not in event['email']:
return {'statusCode': 400, 'body': json.dumps({'error': 'Invalid email'})}
if not event.get('username') or len(event['username']) < 3:
return {'statusCode': 400, 'body': json.dumps({'error': 'Username too short'})}
@BenMinga
BenMinga / exercise2.js
Created February 13, 2026 19:29
Lambda Workshop - Exercise 2: API Handler (JavaScript)
// Exercise 2: API Handler with Validation (JavaScript/Node.js)
// Runtime: Node.js 20.x
export const handler = async (event) => {
if (!event.email || !event.email.includes('@'))
return { statusCode: 400, body: JSON.stringify({ error: 'Invalid email' }) };
if (!event.username || event.username.length < 3)
return { statusCode: 400, body: JSON.stringify({ error: 'Username too short' }) };
return {
statusCode: 200,
@BenMinga
BenMinga / exercise1.py
Created February 13, 2026 19:29
Lambda Workshop - Exercise 1: Hello World (Python)
# Exercise 1: Hello World Lambda (Python)
# Runtime: Python 3.12
from datetime import datetime
import json
def handler(event, context):
name = event.get('name', 'World')
return {
'statusCode': 200,
@BenMinga
BenMinga / exercise1.js
Created February 13, 2026 19:29
Lambda Workshop - Exercise 1: Hello World (JavaScript)
// Exercise 1: Hello World Lambda (JavaScript/Node.js)
// Runtime: Node.js 20.x
export const handler = async (event) => {
const name = event.name || 'World';
return {
statusCode: 200,
body: JSON.stringify({
message: `Hello ${name}!`,
timestamp: new Date().toISOString()