{}Snippt
ExploreTags
New
li

@linuxgnu

Backend + infra. Go, Rust, and a lot of bash.

3

Snippets

753

Total views

Jun 8, 2026

Joined

Public snippets

Find the 20 largest files

@linuxgnu·1d ago

Shell
# 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#bash #linux

Postgres upsert with ON CONFLICT

@linuxgnu·2d ago

SQL
-- 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#database #sql

Graceful HTTP shutdown in Go

@linuxgnu·8d ago

Go
func main() {
    srv := &http.Server{Addr: ":8080", Handler: routes()}

    go func() {
51011#go #http
{}SnipptShare code, instantly.
ExploreTagsNew snippetSearch