Skip to content

Instantly share code, notes, and snippets.

@clarkbw
clarkbw / preview.yml
Last active May 15, 2024 06:19
Ideal GitHub Action for Fly preview w/ Neon database
name: PR Review
on:
# Run this workflow on every PR event. Existing review apps will be updated when the PR is updated.
# Neon branches are created and removed according to PR updates
pull_request:
types: [opened, reopened, synchronize, closed]
jobs:
pr-preview:
runs-on: ubuntu-latest
@clarkbw
clarkbw / database-services.sql
Last active January 14, 2025 03:07
SQL case to segment the database services by their URL
case
when host like '%cluster-%.rds.amazonaws.com%' then 'Aurora'
when host like '%rds.amazonaws.com%' then 'RDS'
when host like 'ec2%' then 'EC2 Self-Hosted'
when host like '%supabase.co%' then 'Supabase' -- db.project.supabase.co & region.supabase.com
when host like '%timescale.com%' then 'Timescale'
when host like '%postgres.vercel-storage.com%' then 'Vercel Postgres'
when host like '%azure.neon.tech%' then 'Neon (Azure)'
when host like '%aws.neon.tech%' then 'Neon (AWS)'
when host like '%.turso.io%' then 'Turso'