This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| LOG="/root/cleanup-$(date +%Y-%m-%d_%H-%M-%S).log" | |
| # Save all output to both the terminal and a log file | |
| exec > >(tee -a "$LOG") 2>&1 | |
| echo "========== SERVER CLEANUP ==========" | |
| echo "Started: $(date)" | |
| echo "====================================" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # WordPress Inactive Plugins Cleaner (CloudPanel) | |
| # | |
| # Usage: | |
| # bash delete-inactive-plugins.sh --dry-run | |
| # bash delete-inactive-plugins.sh | |
| DRY_RUN=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # WordPress Inactive Themes Cleaner | |
| # | |
| # Usage: | |
| # bash delete-inactive-themes.sh --dry-run | |
| # bash delete-inactive-themes.sh | |
| DRY_RUN=false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find / -name "php.ini" -not -path "*/proc/*" -not -path "*/sys/*" -exec sed -i 's/;*session.upload_progress.enabled =.*/session.upload_progress.enabled = Off/' {} \; 2>/dev/null | |
| systemctl restart php*-fpm 2>/dev/null | |
| find / -name "php.ini" -not -path "*/proc/*" -not -path "*/sys/*" -exec grep -H "session.upload_progress.enabled" {} \; 2>/dev/null | |
| apt update && apt upgrade -y | |
| systemctl restart php*-fpm 2>/dev/null | |
| find / -name "php.ini" -not -path "*/proc/*" -not -path "*/sys/*" -exec grep -H "session.upload_progress.enabled" {} \; 2>/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Loop through all PHP versions found in /etc/php | |
| for php_ver in /etc/php/*; do | |
| if [ -d "$php_ver" ]; then | |
| ver_num=$(basename "$php_ver") | |
| # Check and update fpm and cli php.ini files | |
| for ini_path in "$php_ver/fpm/php.ini" "$php_ver/cli/php.ini"; do | |
| if [ -f "$ini_path" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Admin-only CSS for the block editor. | |
| * | |
| * [h1] Turn off sidebar view for WordPress/Gutenberg blocks v3 [/h1] | |
| * | |
| * (connect to functions.php [code] require_once get_template_directory() . '/inc/admin-editor-styles.php'; [/code] ) | |
| * ACF prints a "Block" panel of its own in the block inspector sidebar, which | |
| * duplicates what the block's own fields already offer and only adds noise for | |
| * editors. Hide it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo find /home -type f -name "*.wpress" -delete | |
| sudo find /home -type f -name "*.zip" -delete | |
| du -sh /home/* 2>/dev/null | sort -hr | head -20 | |
| du -h --max-depth=2 /home 2>/dev/null | sort -hr | head -50 | |
| find /home -type f -printf '%s %p\n' 2>/dev/null | sort -nr | head -50 | \ | |
| awk '{printf "%.2f GB\t%s\n", $1/1024/1024/1024, $2}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bash -c 'set -euo pipefail; shopt -s nullglob; for png in *.png; do base="${png%.png}"; zipname="${base}.zip"; files=( "${base}".* ); (( ${#files[@]} > 0 )) || continue; rm -f "$zipname"; zip -q -9 "$zipname" "${files[@]}"; echo "✅ $zipname <- ${#files[@]} file(s)"; done' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error_page 404 = @redirect_to_home; | |
| location @redirect_to_home { | |
| return 301 https://$host; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 🧩 setQuantity.js | |
| * | |
| * Automatically sets the quantity for Steam Market Sell input. | |
| * | |
| * This script keeps the sell quantity input (#market_sell_quantity_input) | |
| * synchronized with the available amount element (#market_sell_quantity_available_amt). | |
| * | |
| * ✅ How it works: | |
| * - Checks every millisecond if the quantity input is visible. |
NewerOlder