Skip to content

Instantly share code, notes, and snippets.

View EcZachly's full-sized avatar
🎯
Manifesting greatness

Zach Wilson EcZachly

🎯
Manifesting greatness
View GitHub Profile
@EcZachly
EcZachly / gist:29520e2fb5c47cc7e33239209534e181
Created September 17, 2025 22:00
Tabular to AWS Glue Conversion Script
#!/bin/bash
# Register Iceberg tables from config.json to AWS Glue Catalog
# Usage: ./register-tables-glue-fixed.sh [config.json]
set -e
CONFIG_FILE="${1:-config.json}"
AWS_REGION="${AWS_REGION:-us-west-2}"
@EcZachly
EcZachly / groups.sql
Created November 6, 2023 21:11
How to write an algorithm to group people in optimized groups based on timezone and track
-- first query all the users
WITH offsets AS (SELECT a.*,
EXTRACT(hour FROM ptn.utc_offset) AS utc_offset
FROM bootcamp.attendees a
JOIN pg_timezone_names ptn ON a.timezone = ptn.name
WHERE a.bootcamp_version = 3
AND a.timezone IS NOT NULL
AND a.content_delivery = 'Live'::text
),
-- then aggregate the users by track and offset, we want matching timezones to fill up first
app.get '/Cards/adv/search', (req, res) ->
console.log(req.query)
colors1 = req.query.colors
if(colors1 == undefined)
colors1 = ["White", "Blue","Black","Green", "Red"]
if(colors1.length == 0)
colors1 = ["White", "Blue","Black","Green", "Red"]
rarity1 = req.query.rares
if(rarity1 == undefined)
rarity1 = ['Common','Uncommon','Rare', 'Mythic Rare']