The fastest way to share a snippet
Paste your code, pick a language, and get a clean link to share with anyone. No account required.
Instant sharing
Paste, hit create, and get a clean shareable link in a second.
Syntax highlighting
Over 30 languages rendered in crisp monospace.
Public or private
Control who sees each snippet, set expirations, fork freely.
Recent snippets
Explore allOne-line UUID v4
Anonymous·6h ago
// Generate an RFC 4122 v4 UUID using the Web Crypto API
const uuid = () =>
([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
(6400
Debounced search input
@maya_dev·12h ago
function SearchBox({ onSearch }: { onSearch: (q: string) => void }) {
const [value, setValue] = useState('')
const debounced = useDebounce(value, 250)
20301
Find the 20 largest files
@linuxgnu·1d ago
# Find the 20 largest files under the current directory
find . -type f -printf '%s\t%p\n' 2>/dev/null \
| sort -nr \
| head -n 20 \8701
Postgres upsert with ON CONFLICT
@linuxgnu·2d ago
-- Insert a row, or update it if the unique key already exists
INSERT INTO settings (user_id, key, value)
VALUES ($1, $2, $3)
ON CONFLICT (user_id, key)15601
Tailwind cn() class merger
@maya_dev·3d ago
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'
// Merge conditional class names and resolve Tailwind conflicts.12800
Python retry decorator
Anonymous·4d ago
import time
from functools import wraps
def retry(times=3, delay=0.5):9900