{}Snippt
ExploreTags
New

Tags

Browse snippets grouped by topic.

react3utils3hooks2typescript2bash1database1go1http1linux1python1sql1

#utils

One-line UUID v4

Anonymous·8h ago

JavaScript
// Generate an RFC 4122 v4 UUID using the Web Crypto API
const uuid = () =>
    ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
        (
6600#utils

Tailwind cn() class merger

@maya_dev·3d ago

TypeScript
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'

// Merge conditional class names and resolve Tailwind conflicts.
12800#react #typescript #utils

Python retry decorator

Anonymous·4d ago

Python
import time
from functools import wraps

def retry(times=3, delay=0.5):
9900#python #utils
{}SnipptShare code, instantly.
ExploreTagsNew snippetSearch