Skip to content

Instantly share code, notes, and snippets.

View itz4blitz's full-sized avatar
💭
Working!

itz4blitz itz4blitz

💭
Working!
  • USA
  • 02:42 (UTC -04:00)
View GitHub Profile
@itz4blitz
itz4blitz / seed_users.sql
Last active May 18, 2025 02:32
Supabase Auth Seeding Example
INSERT INTO auth.users ( instance_id, id, aud, role, email, encrypted_password, email_confirmed_at, recovery_sent_at, last_sign_in_at, raw_app_meta_data, raw_user_meta_data, created_at, updated_at, confirmation_token, email_change, email_change_token_new, recovery_token)
VALUES
('00000000-0000-0000-0000-000000000000', uuid_generate_v4(), 'authenticated', 'authenticated', 'email@example.com', crypt('password', gen_salt('bf')), current_timestamp, current_timestamp, current_timestamp, '{"provider":"email","providers":["email"]}', '{}', current_timestamp, current_timestamp, '', '', '', '');
-- test user email identity
INSERT INTO auth.identities (id, user_id, identity_data, provider, provider_id, last_sign_in_at, created_at, updated_at)
VALUES
(uuid_generate_v4(), (SELECT id FROM auth.users WHERE email = 'email@example.com'), format('{"sub":"%s","email":"%s"}', (SELECT id FROM auth.users WHERE email = 'insiders@grida.co')::text, 'insiders@grida.co')::jsonb, 'email', uuid_generate_v4(), current_timestamp,
# .continuerules
# MCP-Specific Usage
# This file defines project-specific rules for working with the Model Context Protocol (MCP)
# in a TypeScript environment. These guidelines apply to both server and client implementations
# using the @modelcontextprotocol/sdk library.
# 1. Server Setup
# - Always instantiate a McpServer or the low-level Server class from "@modelcontextprotocol/sdk".
# - Provide descriptive name and version fields for the server.
#!/bin/bash
set -euo pipefail
# Directory setup
APP_DIR="${HOME}/Applications"
ICON_DIR="${HOME}/.local/share/icons"
DESKTOP_DIR="${HOME}/.local/share/applications"
BIN_DIR="${HOME}/.local/bin"
@itz4blitz
itz4blitz / example.ts
Created March 27, 2024 16:43
example of perm method
async verifyAllowedToMakeNormalPayments(newPage: any, role: any, user: any, api: API, request: APIRequestContext, positiveScenario = true) {
let commonpo = new commonPO(newPage);
let paymentspo = new paymentsPO(newPage);
let origin = process.env.BASE_URL!;
async function adminSeed() {
let random = new randomGen();
let sqlQuery = new SQLquery();
const facility = await api.facility.createFacility(request, api.bearerToken, await api.facility.defaultFacilityValues(random.facilityName));
const testWorker = await api.user.createUser(request, api.bearerToken, await api.user.defaultWorkerValues());
await api.user.credentialedWorker(request, api.bearerToken, testWorker.id, true, 1);