Simple HTTP URL Health Check
Perform a quick health check on any HTTP/HTTPS URL using curl in Bash, verifying response status and connectivity for web services.
Curated list of production-ready BASH scripts and coding solutions.
Perform a quick health check on any HTTP/HTTPS URL using curl in Bash, verifying response status and connectivity for web services.
Generate secure, random passwords or tokens using /dev/urandom and head in Bash, essential for temporary credentials or unique identifiers.
Create a robust bash script to automate backing up website files and, optionally, a database to a timestamped archive, essential for disaster recovery.
Learn to use rsync in a bash script for efficient, incremental file synchronization and deployment of web project files to a remote server over SSH, saving time and bandwidth.
Implement a bash script to periodically check if a critical web service (e.g., a Node.js app, Gunicorn) is running and automatically restart it if it's found to be down.
A bash script to parse and extract specific key-value pairs from configuration files like .env or INI files, useful for scripting deployment or environment setup.
A convenient bash script to automate `git pull` across several local Git repositories, simplifying updates for multi-project development environments or local server setups.
Learn how to write a bash script to iterate through a directory of Git repositories and perform a 'git pull' on each, keeping all local branches up-to-date efficiently.
Create more reliable bash scripts by incorporating comprehensive error handling with `set -e`, `trap`, and functions for structured logging to stdout and a log file.
Learn to use the `find` command with various options to locate and safely remove files older than a specified number of days from a directory and its subdirectories.
Set up a bash script to monitor disk space on critical partitions, sending an email alert when usage exceeds a defined threshold, ensuring proactive system maintenance.
Enhance web application security by configuring critical HTTP headers like Content-Security-Policy (CSP), HSTS, and X-Frame-Options to mitigate common attacks.