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 | |
/** | |
* == About this Gist == | |
* | |
* Code to add to wp-config.php to enhance information available for debugging. | |
* | |
* You would typically add this code below the database, language and salt settings | |
* | |
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists). | |
* |
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
# Regular Colors | |
BLACK=`tput setaf 0` | |
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
YELLOW=`tput setaf 3` | |
BLUE=`tput setaf 4` | |
MAGENTA=`tput setaf 5` | |
CYAN=`tput setaf 6` | |
WHITE=`tput setaf 7` |
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
# Regular Colors | |
BLACK=`tput setaf 0` | |
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
YELLOW=`tput setaf 3` | |
BLUE=`tput setaf 4` | |
MAGENTA=`tput setaf 5` | |
CYAN=`tput setaf 6` | |
WHITE=`tput setaf 7` |
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 | |
################################################# | |
### Backup file location and naming variables ### | |
################################################# | |
TODAY=`date +"%d%b%Y"` | |
db_record="flowuses" | |
filename="db_export_${db_record}_${TODAY}.csv" | |
dir="/var/lib/mysql/backups/" | |
headers="/home/steven/backups/headers.csv" |
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 | |
//cPanel lsphp process killer. 2019--Brandon Lehman, [email protected] | |
//Wade C. Thomas - 2019 with the assist on the Quert class. | |
//This script was designed to more easily kill processes when a cPanel account is experiencing issues while under high load. | |
//It shows the current running processes by running ps aux, and then kills PHP processes by running pkill lsphp. | |
class Query { | |
private $cmd = ''; | |
//__construct |
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 | |
$x = 10000000000000; //10 minutes | |
//timestamp | |
$current_time = time(); | |
//the file you wish to delete | |
$file_name = 'test.php'; |
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 | |
$runtop = ""; | |
$cpanelUser = ""; | |
$cpanelPhp = ""; | |
$cpanelSsh = ""; | |
$cpanelFtp = ""; | |
if (isset($_GET['runtop'])) { | |
$path = $_SERVER['SCRIPT_FILENAME']; |
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 | |
#renew ssl letsencrypt certificate on bitnami server | |
#https://gist.github.com/printminion/6ec2fc0fefaba8e0a98a63a6d73b0802/edit | |
sudo /opt/bitnami/ctlscript.sh stop apache | |
cd /home/user/certbot | |
#./certbot-auto certonly --standalone -w /opt/bitnami/apache2/conf/ -d example | |
.com -d www.example.com | |
./certbot-auto renew | |
sudo cp /etc/letsencrypt/live/example.com/fullchain.pem /opt/bitnami/apache2/conf/server.crt |