Skip to content

Instantly share code, notes, and snippets.

@j4crev
j4crev / implement-user-api-keys-with-supabase.md
Last active August 11, 2026 01:54
Implement user API keys with Supabase

Implement user API keys with Supabase

!!!!! THIS GIST SHOULD BE CONSIDERED DEPRECATED.

This is pretty much my first crack at this. I'm sure things could be improved or done differently.

Rationale

JWTs are at the heart of Supabase authorization, but sometimes we wanna build an app that also gives users access via API keys; or perhaps only exclusively via API keys. As you may know, using JWTs as API keys makes them difficult to revoke and therefore a security issue.

We also want to ensure this doesn't significantly add to RLS polices, if at all.

@EricTendian
EricTendian / email-over-curl.sh
Created February 17, 2020 22:11
Sending an HTML email with curl over SMTP
#!/bin/bash
cat << EOF > email.eml
From: "${MAIL_FROM_NAME}" <${MAIL_FROM_ADDRESS}>
To: "${MAIL_TO_NAME}" <${MAIL_TO_ADDRESS}>
Reply-To: "${MAIL_TO_NAME}" <${MAIL_TO_ADDRESS}>
Subject: ${MAIL_SUBJECT}
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
@zenubis
zenubis / rclone_exclude_list.txt
Last active February 3, 2025 16:02
List of file names to be excluded from rclone/rsync copying for common macOS and windows system files.
$RECYCLE.BIN
$Recycle.Bin
.AppleDB
.AppleDesktop
.AppleDouble
.com.apple.timemachine.supported
.dbfseventsd
.DocumentRevisions-V100*
.DS_Store
.fseventsd