Skip to content

Instantly share code, notes, and snippets.

View staciax's full-sized avatar

STACIA staciax

View GitHub Profile
@staciax
staciax / prisma.ts
Last active January 24, 2025 07:21
Prisma Custom Transaction Handler
// Prisma custom transaction handler
// I'm just add supported transactions options
// Please read more:
// https://github.com/prisma/prisma/issues/22309
// https://github.com/prisma/prisma-client-extensions/tree/main/callback-free-itx
// https://github.com/prisma/prisma-client-extensions/pull/52
import { Prisma, PrismaClient } from '@prisma/client';
const prisma = new PrismaClient({
@staciax
staciax / uuid7.py
Last active April 21, 2024 15:59
Python uuid v7
# https://github.com/python/cpython/pull/29824
import uuid
class UUID(uuid.UUID):
def __init__(
self,
int: int | None = None,
version: int | None = None,
*,
@staciax
staciax / dockerignore-test.sh
Created February 19, 2024 15:02 — forked from sgdan/dockerignore-test.sh
Test the ".dockerignore" file to ensure the build context doesn't contain unwanted files
#!/bin/sh
# Based on BMitch's answer from:
# https://stackoverflow.com/questions/38946683/how-to-test-dockerignore-file
# Note: will create and delete temporary file "Dockerfile.build-context"
# 1. Copy to project folder where image is being built
# 2. Run script
# 3. You should see list of files in build context