Deploy Static Website via SCP
Automate the secure deployment of a static website or build artifacts to a remote server using SCP, ideal for simple CI/CD pipelines.
Curated list of production-ready BASH scripts and coding solutions.
Automate the secure deployment of a static website or build artifacts to a remote server using SCP, ideal for simple CI/CD pipelines.
Efficiently synchronize local files to a remote server over SSH. This snippet uses rsync for fast, reliable web deployment and secure, incremental backups.
Create a robust bash script to check if a critical web service is running and automatically restart it if inactive, ensuring continuous operation and availability.
Quickly parse Nginx access logs using bash, grep, and awk. Identify 4xx/5xx errors or specific request patterns, crucial for website debugging and performance monitoring.
Automate daily or weekly backups of a specified directory using tar and gzip. Implement a smart rotation strategy to keep only a set number of recent backups.
Use `curl` to perform essential health checks on a website. Verify its HTTP status code and measure connection and total response times for critical performance monitoring.
Efficiently update text in a large codebase using a Bash script with 'find' and 'sed' for bulk search and replace operations across multiple files.
Enhance your Bash scripts by implementing robust command-line argument parsing with 'getopts', making them flexible, user-friendly, and error-resistant.
Learn to write more resilient Bash scripts by integrating basic error handling with 'set -e', 'trap', and custom logging functions for better debugging and reliability.
Write a Bash script to quickly determine if a specific TCP port is open or in use on your local machine, essential for starting new development services.
Load configuration from .env files into your Bash scripts. This snippet parses key-value pairs, handles comments, and quotes, making environment management simple.
Bash script to safely reload web server configurations (Nginx or Apache) without service interruption, useful for web server management and deployment automation.