Skip to content

Instantly share code, notes, and snippets.

View occluder's full-sized avatar
🍯
There is no honey

Elias A. occluder

🍯
There is no honey
View GitHub Profile
:: Author: @mimiru
@echo off
setlocal
:: Determine the path to floorp.exe
set "FLOORP_PATH=%~dp0floorp.exe"
:: Convert the path to use double backslashes for the registry
set "FLOORP_PATH=%FLOORP_PATH:\=\\%"
@beginor
beginor / snowflake-id.sql
Last active May 24, 2025 06:18
Twitter Snowflake ID for PostgreSQL
CREATE SEQUENCE public.global_id_seq;
ALTER SEQUENCE public.global_id_seq OWNER TO postgres;
CREATE OR REPLACE FUNCTION public.id_generator()
RETURNS bigint
LANGUAGE 'plpgsql'
AS $BODY$
DECLARE
our_epoch bigint := 1314220021721;
seq_id bigint;