Skip to content

Instantly share code, notes, and snippets.

View ebridges's full-sized avatar
🛠️
Fixing things

Edward Q. Bridges ebridges

🛠️
Fixing things
View GitHub Profile
@ebridges
ebridges / kb_ingest.py
Created October 10, 2025 16:10
ingest code books to kb
"""
Bedrock Knowledge Base Ingestion Agent
This agent syncs building code data from the PostgreSQL database to AWS Bedrock Knowledge Base (YSASCPLSVW).
It handles metadata transformation, content formatting, and maintains consistency between systems.
"""
import json
import logging
import boto3
@ebridges
ebridges / main.tf
Created September 22, 2025 18:59
Fix `plan` errors in this terraform.
variable assessment_bucket_name {
description = "Name of technical assessment"
type = string
default = "sre-interview"
}
locals {
bucket_name = format("${var.assessment_bucket_name}")
}

Prompt: Implement Event-Driven ECS Fargate Trigger from S3 Upload

🎯 Goal

Build an AWS infrastructure pattern using Terraform and Python that executes a containerized Python ingestion script in ECS Fargate whenever a new file is uploaded to an S3 bucket. The ingestion script processes a CSV file and writes to a database.

🔧 Implementation Summary

  1. S3 Upload → EventBridge
  • Enable S3 event notifications via EventBridge when new .csv files are uploaded to a specific bucket and prefix.
@ebridges
ebridges / inventory-cards.html
Last active February 27, 2025 21:35
Given a CSV file create a PDF of inventory labels from it.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Read CSV file with JS</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/papaparse.min.js"></script>
@ebridges
ebridges / qr-coder.html
Last active March 4, 2025 20:16
Given values from two text fields, embed them in a QR code.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR Code Generator</title>
</head>
<body style="font-family: Arial, sans-serif; text-align: center; margin: 50px;">
<h1>QR Code Generator</h1>
<form id="qrForm">
@ebridges
ebridges / Python language features.md
Created August 7, 2024 15:24
Python Language Features

Python language features

Standard control structures

Conditional statements

  • if statement
if condition:
	# code to execute if condition is true
  • if-else statement
@ebridges
ebridges / .gitignore
Last active December 12, 2023 14:47
Generates cohort test cases
venv
cohort-cases
@ebridges
ebridges / priorities-list.md
Created October 29, 2022 13:13
Obsidian - Priorities List

Priorities

First

TASK FROM "work/aetion"
WHERE contains(tags, "#todo/11") and !completed
GROUP BY file.link
SORT file.ctime DESC
@ebridges
ebridges / meeting-notes-template.md
Created October 29, 2022 13:12
Obsidian - Meeting Notes Template

Topic

Agenda

  • <% tp.file.cursor() %>

Attendees

@ebridges
ebridges / daily-note-template.md
Created October 29, 2022 13:11
Obsidian - Daily Note Template
creation date
<% tp.file.creation_date() %>

← [[<% tp.date.now('YYYY-MM-DD-ddd', -1) %>]] | [[<% tp.date.now('YYYY-MM-DD-ddd', 1) %>]] →

<% tp.date.now('YYYY-MM-DD-ddd') %>

📝 Notes