Skip to content

Instantly share code, notes, and snippets.

@matthewadams
matthewadams / new-supabase-cloud-project.sh
Last active July 12, 2025 16:08
Node.js npx cli to create new Supabase cloud project & update local .env file
# Creates a brand new supabase project and updates the .env to point to it.
#
# Prerequisites:
#
# * Required: npx
#
# * Required: A .env.min file with the following content:
# SUPABASE_ORG_ID=yourorgid
# SUPABASE_REGION=us-east-1 # or whatever
# SUPABASE_DB_PASSWORD=thenewdbpassword
@matthewadams
matthewadams / supabase-sql.ts
Created July 9, 2025 12:42
Typescript cli file to execute sql against supabase returning results as json
#!/usr/bin/env tsx
// Usage: $0 your-sql-statement
// Prerequisites: npx, npm package `pg`, SUPABASE_DB_URL env var
import { Client } from 'pg'
const SUPABASE_DB_URL: string = process.env.SUPABASE_DB_URL || ''
@matthewadams
matthewadams / install-docker-engine.sh
Created November 27, 2025 14:01
Automated docker engine install script for Debian that also supports Linux Mint
#!/usr/bin/env bash
#
# Docker Engine Installation Script for Debian, Ubuntu, and Linux Mint
# Run with: sudo ./install-docker-engine.sh [username...]
#
# Supports:
# - Debian (stable releases)
# - Ubuntu (and derivatives like Kubuntu, Lubuntu, Xubuntu)
# - Linux Mint (Ubuntu-based editions)
# - LMDE (Linux Mint Debian Edition)
@matthewadams
matthewadams / column-alias.gs
Last active February 3, 2026 01:19
Google Sheets column alias capability
/**
* SEMANTIC COLUMN TOOLKIT v1.0
* * Provides a set of custom Google Sheets functions to reference data by column name
* rather than static column letters. Designed to survive column reordering, row
* insertions/deletions, and to handle date-formatted headers (e.g., "Jan").
* * Functions included:
* - NAMED_COLUMN_CELL: Fetches a single cell value from a column by name, not letter.
* - NAMED_COLUMN_RANGE: Fetches an entire vertical array (useful for SUM/AVERAGE) by column name, not letter.
* - COLUMN_NAMED: Returns the current column letter of a named header.
* - DEREF: Helper to resolve a cell value from a column letter and row number.