Backup PostgreSQL/MySQL Database and Compress
Automate daily or weekly backups of your PostgreSQL or MySQL database, compressing the dump file for efficient storage and easy recovery.
Curated list of production-ready BASH scripts and coding solutions.
Automate daily or weekly backups of your PostgreSQL or MySQL database, compressing the dump file for efficient storage and easy recovery.
Verify if a particular TCP port is currently open and actively listening on the system, preventing conflicts when starting new services.
Establish a secure SSH tunnel to forward a remote port to a local port, enabling access to services on a remote network as if they were local.
Regularly check disk space usage on specified partitions and send an email alert if consumption exceeds a predefined threshold.
A bash script to automate web application deployment, including pulling the latest code from Git, installing Node.js dependencies, and restarting a PM2 or systemd service.
A bash script to continuously tail and filter web server access or error logs (Apache/Nginx) for specific keywords like "ERROR", "500", or "denied", providing real-time monitoring.
A bash script to check if a specific network port on a given host is open and optionally, if a basic HTTP/S service is responsive, useful for server health checks.
A bash script demonstrating how to parse and extract specific data from JSON files or API responses using the powerful `jq` command-line JSON processor.
Automatically clean up stale log files, temporary build artifacts, or cached data by deleting files and empty directories older than a specified number of days to free up space.
Ensure critical background services (like Node.js apps or queue workers) stay running by checking their status and automatically restarting them if they're down.
Streamline your web development workflow by automating the 'npm install' and 'npm run build' steps for frontend projects, then synchronizing the build output to a target directory.
Efficiently update text strings across multiple files and directories in your project. Ideal for refactoring variable names, updating URLs, or changing configuration values recursively.