Skip to content

Instantly share code, notes, and snippets.

@GitTom
GitTom / #Supabase-Import-Auth-Users.md
Last active October 24, 2024 08:16
Supabase Import Auth Users (from an import table into auth.users and auth.identities)

Create new Supabase Auth Users

With the new users loaded from 'import.users' table.

2024-10 Started from ...
https://gist.github.com/khattaksd/4e8f4c89f4e928a2ecaad56d4a17ecd1
With addition of 'provider_id' as per @fluid-design-io
With my additions to load import data from import.users table,
to save generated values back into that table, and
to be able to add rows when destination tables are not empty.

@GitTom
GitTom / supa_audit--0.3.1--changes.sql
Created July 31, 2024 20:14
Variation of supabase's supa_audit PostgreSQL extension - adds 'changes' column to highlight changes made by UPDATE operations.
-- SPDX-License-Identifier: Apache-2.0
/*
Generic Audit Trigger
Linear Time Record Version History
Date:
2022-02-03
Purpose:
Generic audit history for tables including an indentifier

Stopping Autoplay Videos

Browser's should include a setting that allows users to disable autoplay on videos (and then reenable it on a site by site basis, ideally).

I appreciate that Mozilla & Google try to balance the rights/interests/integrity of websites and their developers with the interests of their end-users, to keep the web healthy, but autoplay videos are a menace IMO.

I think most people would love to be able to end autoplay on Netflix!

I'm frustrated by the number of tech headlines that have pronounced that a new version of either browser has finally truly 'blocked autoplay videos' but so far it has never been true. Mostly what they do is block the sound from autoplay videos.

@GitTom
GitTom / RedditOAuth.java
Last active June 30, 2019 15:42
Reddit OAuth2 Java sample code (uses Google HTTP and json.org libs)
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
import org.json.JSONTokener;
import com.google.api.client.extensions.appengine.http.UrlFetchTransport;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpContent;
import com.google.api.client.http.HttpRequest;