Scripts
Short programs and one-liners, ready to copy. Every script says what it changes and how to undo it.
What kind of help
- Guided project 0
- Explains an idea 0
- Step by step 39 (selected, select to remove)
- Cheat sheet 14
- Fixes an error 1
Works on
What do these mean?
- Beginner
- You are new to this topic.
- Intermediate
- You use it, and want to get better.
- Advanced
- You know it well and need the details.
- Guided project
- Build something small from start to finish, step by step.
- Explains an idea
- Plain words on how something works and why.
- Step by step
- Numbered steps to get one task done.
- Cheat sheet
- Commands and options in a table, to look up fast.
- Fixes an error
- An error message, what it means, and how to solve it.
Area
Clear filters
21 entries match these filters
- 0415 Check a site’s TLS expiry and security headers from the terminal A bash script that connects to a domain, prints the certificate's issuer and expiry with days remaining, and reports which recommended security… Intermediate · Step by step · Linux, macOS Script Making requests · Web servers & reverse proxies 15 Oct 2026
- 0424 Cron-safe wrapper: lock, log and report failures for any scheduled command Wrap any cron or timer job so it never runs twice at once, writes a timestamped log, keeps the exit code and… Intermediate · Step by step · Linux Script cron & timers · Shell scripting 15 Oct 2026
- 0366 restic backup wrapper with tagging, retention and a weekly check A bash wrapper that runs restic backup on a fixed list of paths, applies a keep-daily/weekly/monthly policy with forget and prune, runs… Intermediate · Step by step · Linux, macOS Script Backup tools · Backups & syncing 15 Oct 2026
- 0336 Back up and restore a Docker named volume to a tar archive A bash script that copies the contents of a named Docker volume into a .tar.gz on the host, and restores an archive… Intermediate · Step by step · Linux, macOS Script Backup tools · Docker basics 15 Oct 2026
- 0234 Nightly mongodump backup with rotation A bash script for cron that writes a compressed mongodump archive each night, keeps the password out of the process list, checks… Intermediate · Step by step · Linux Script Administration · Database operations 15 Oct 2026
- 0237 Use Redis as a cache: TTLs, maxmemory and an eviction health report Set a memory limit and an eviction policy so Redis behaves like a cache, give keys TTLs, then run a bash report… Intermediate · Step by step · Linux, macOS Script Administration & persistence · Basics 15 Oct 2026
- 0223 Oracle users, roles and tablespaces: setup script and usage report (SQL) A SQL*Plus/SQLcl script that creates a tablespace, a role and an application user inside a PDB, then reports tablespace usage from the… Intermediate · Step by step · Any system Script Administration · Security & access 15 Oct 2026
- 0206 Nightly PostgreSQL backup script with pg_dump and rotation A bash script for cron that dumps cluster roles plus every database in custom format into a dated folder, checks each archive,… Intermediate · Step by step · Linux Script Backup & restore 15 Oct 2026
- 0219 mysqldump nightly backup with rotation (bash) A cron-ready bash script that dumps each MySQL or MariaDB database to its own compressed file with --single-transaction, verifies it and deletes… Intermediate · Step by step · Linux Script Administration · Backup & restore 15 Oct 2026
- 0183 Ansible variables, templates and handlers: configure an nginx site Use group variables, Jinja2 templates and handlers together: render an nginx server block from variables, test the config and reload nginx only… Intermediate · Step by step · Linux, macOS Script Ansible 15 Oct 2026
- 0188 First Terraform configuration: variables, a module and outputs (no cloud needed) A complete Terraform project that writes local files with the hashicorp/local provider, so you can practice init, plan, apply, modules and destroy… Intermediate · Step by step · Any system Script Terraform 15 Oct 2026
- 0139 Collect describe, events and logs of a failing Kubernetes pod A bash script that saves a pod's status, describe output, events, YAML, current and previous logs of every container and its node… Intermediate · Step by step · Linux, macOS Script Troubleshooting 15 Oct 2026
- 0158 Collect an OpenShift project report with oc A read-only bash script that gathers a project's workloads, pods, routes, builds, storage and warning events, plus describe output and logs of… Intermediate · Step by step · Linux, macOS Script Deploying applications · Troubleshooting 15 Oct 2026
- 0109 A vzdump wrapper script with checks, retention and a log file A Bash wrapper around vzdump that checks the target storage first, backs up chosen guests or all guests with zstd and keep-last… Intermediate · Step by step · Linux Script Backup & restore · Shell scripting 15 Oct 2026
- 0084 Tiny JSON echo server for testing HTTP clients A standard-library Python server that echoes back the method, path, query, headers, and body of every request, and can return any status… Intermediate · Step by step · Any system Script Files & automation · Making requests 15 Oct 2026
- 0043 Delete local branches that are already merged A bash script that lists local branches fully merged into main and, if you ask, deletes them. It never touches the current… Intermediate · Step by step · Linux, macOS, Windows Script Housekeeping 15 Oct 2026
- 0010 Find duplicate files by content Scans folders and lists files with identical content, using file size first and SHA-256 hashes second. It is read-only and only reports… Intermediate · Step by step · Any system Script Files & automation 15 Oct 2026
- 0011 Bootstrap a new Python project with a venv A Bash script that creates a project folder with a virtual environment, .gitignore, requirements.txt and a starter main.py, then runs it to… Intermediate · Step by step · Linux, macOS Script Environments & packages 15 Oct 2026
- 0019 fetch with timeout, retries and proper error handling A reusable fetchJson helper for Node 20+ and browsers that adds a timeout, retries with backoff for temporary failures, and clear errors… Intermediate · Step by step · Any system Script Async code · Making requests 15 Oct 2026
- 0020 Debounce and throttle functions in plain JavaScript Two small dependency-free helpers that limit how often a function runs: debounce waits for a pause, throttle runs at most once per… Intermediate · Step by step · Any system Script Patterns 15 Oct 2026
- 0022 Build a small Node.js CLI with util.parseArgs A complete, dependency-free command-line tool in Node: options and flags with parseArgs, input from files or a pipe, help text, and meaningful… Intermediate · Step by step · Any system Script Node.js 15 Oct 2026