Skip to content

Instantly share code, notes, and snippets.

View magick93's full-sized avatar
💩
Focusing

magick93

💩
Focusing
View GitHub Profile
Kanel
[
'supabase_migrations', '_analytics',
'_realtime', 'nzlegal',
'adls', 'vault',
'stripe', 'private',
'auth', 'extensions',
'graphql_public', 'net',
'public', 'realtime',
'storage', 'supabase_functions',
@magick93
magick93 / troublesome.sql
Created September 29, 2023 19:58
Error: 'character varying' cannot be found in EnumType's name.
-- DROP SCHEMA public;
CREATE SCHEMA public AUTHORIZATION pg_database_owner;
COMMENT ON SCHEMA public IS 'standard public schema';
-- DROP TYPE public."account_based_product_code_list_type";
CREATE TYPE public."account_based_product_code_list_type" AS ENUM (
'HSA',
@magick93
magick93 / radiobuttongroup.svelte
Last active November 16, 2023 21:12
Re-creating Tailwind color radiobuttons
<script lang="ts">
import { createRadioGroup, melt } from '@melt-ui/svelte';
const {
elements: { root, item, hiddenInput },
helpers: { isChecked },
} = createRadioGroup({
defaultValue: 'default',
});
@magick93
magick93 / ConfirmDeleteFSM.ts
Created April 15, 2024 22:15
Confirm delete FSM
import { assign, createMachine, fromPromise } from 'xstate';
import { setup } from 'xstate';
function executeAction() {
console.log('FSM: Executing action...');
};
export interface ConfirmationDialogMachineContext {
@magick93
magick93 / xstate_invoke.ts
Last active April 16, 2024 01:16
xstate invoke
import { assign, setup } from 'xstate';
function executeAction() {
console.log('executing action');
}
export type ConfirmationDialogMachineEvent =
| { type: 'OPEN_DIALOG'; action: void }
| { type: 'CONFIRM' }
| { type: 'CANCEL' };