Automating Nginx/Apache Configuration Reload
Learn to automate web server configuration reloads with a bash script. This snippet safely tests Nginx or Apache configs and reloads services, ideal for deployments.
Curated list of production-ready BASH scripts and coding solutions.
Learn to automate web server configuration reloads with a bash script. This snippet safely tests Nginx or Apache configs and reloads services, ideal for deployments.
Automate static website deployments with this bash script using `rsync` over SSH. It efficiently transfers and synchronizes files to a remote server.
Learn to create a robust Bash script for automating directory backups, appending a timestamp to each archive for easy versioning and recovery.
Implement a Bash script to monitor a critical system service like Nginx or MySQL, automatically restarting it if it's not running to maintain uptime.
Learn to write a Bash script that efficiently finds and deletes files older than a specified number of days, perfect for log rotation or temporary file cleanup.
Create a robust Bash script to automatically backup specified files or directories, adding a timestamp to the archive name and compressing it using `tar` and `gzip` for storage.
Write a Bash script to verify the presence of a required command (e.g., `jq`, `curl`) and provide instructions or attempt installation using common package managers like `apt`, `yum`, or `brew`.
Learn to make HTTP GET requests to a REST API using `curl`, and efficiently parse the resulting JSON data on the command line using the powerful `jq` tool for data extraction.
Learn to make your Bash scripts more resilient by using `trap` to catch errors and signals, implementing a custom error handler, and logging script execution to a file for better debugging.
A Bash script to efficiently filter large web server access logs by specific IP addresses or HTTP status codes, useful for debugging and analysis.
A simple Bash snippet to parse and load key-value pairs from a .env file into the current shell's environment variables, essential for local development.
A Bash script to quickly start a local HTTP server using Python's http.server and automatically open the served directory in your default web browser.