Skip to content

Instantly share code, notes, and snippets.

Avatar

blehman technicalogical

View GitHub Profile
@technicalogical
technicalogical / wp-config-debug.php
Created Jul 19, 2019 — forked from jrfnl/wp-config-debug.php
Code to add to wp-config.php to enhance information available for debugging.
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).
*
@technicalogical
technicalogical / mwp.sh
Last active Jun 24, 2019
HTL MWP fixer script
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`
@technicalogical
technicalogical / gist:83a361863c05ea2cddd771319907b2be
Created Jun 23, 2019
Fix MWP prefixes for usermeta and options table
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`
@technicalogical
technicalogical / backup.sh
Last active Apr 12, 2019
Script to send out flowuses table on a daily basis.
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"
@technicalogical
technicalogical / ckiller.php
Last active Apr 7, 2019
cpanel php kill script
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
@technicalogical
technicalogical / wp.php
Last active Apr 7, 2019
WordPress Management Script
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'];
@technicalogical
technicalogical / certbot-renew.sh
Created Mar 9, 2017 — forked from printminion/certbot-renew.sh
renew ssl letsencrypt certificate on bitnami server
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