View wp-config-debug.php
<?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). | |
* |
View mwp.sh
# 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` |
View gist:83a361863c05ea2cddd771319907b2be
# 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` |
View backup.sh
#!/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" |
View ckiller.php
<?php | |
//cPanel lsphp process killer. 2019--Brandon Lehman, blehman@godaddy.com | |
//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 |
View wp.php
<?php | |
$x = 10000000000000; //10 minutes | |
//timestamp | |
$current_time = time(); | |
//the file you wish to delete | |
$file_name = 'test.php'; |
View ckill.php
<?php | |
$runtop = ""; | |
$cpanelUser = ""; | |
$cpanelPhp = ""; | |
$cpanelSsh = ""; | |
$cpanelFtp = ""; | |
if (isset($_GET['runtop'])) { | |
$path = $_SERVER['SCRIPT_FILENAME']; |
View certbot-renew.sh
#!/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 |