This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var spData = null; | |
function doData(json) { | |
spData = json.feed.entry; | |
} | |
This file contains 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
subject="Email Test" | |
body="Hello World. This is an email test and I am including this paragraph of content to gain extra points if there is a substantial body message included. Thank you." | |
from="$1" | |
to="$2" | |
echo -e "To: Test <$to>\nFrom: Test <$from>\nSubject: $subject\n\n$body\n" | sendmail -f $from -t $to | |
# USAGE # | |
# NOTE: Some servers may need BASH not SH | |
# Directly from this URL: | |
# curl -s https://gist.githubusercontent.com/amityweb/e0d1288a719e3ec2f028ec76b551cd86/raw/ | sh -s [email protected] [email protected] |
This file contains 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 | |
DATE=$(date +%Y-%m-%d.%I-%M-%S) | |
echo $DATE - $1 |
This file contains 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 | |
ps_out=`ps -ef | grep "rclone sync\|bash rclone" | grep -v 'grep'` | |
result=$(echo $ps_out | grep "$1") | |
if [ "$result" = "" ];then | |
# DB Dumps First | |
#for i in $(mysql --batch --skip-column-names -e 'SHOW DATABASES' | egrep -v 'performance_schema|information_schema|mysql|eximstats|leechprotect|cphulkd|modsec|roundcube|logaholicDB_.'); do mysqldump --single-transaction -h localhost --opt $i | gzip -c > /home/_dbbackups/$i.sql.gz; done | |
# Home Folder Dump | |
DATE=$(date +%Y-%m-%d.%H:00) |
This file contains 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 | |
// Replace variables with yours | |
// Run script with "php clone_wp.php" | |
// Requires All in One WP Migration Unlimited stored locally and path updated below - other backup plugins can be used with some teaks to WP CLI commands | |
// Requires All in One Backup file created source website and path and filename copied to that below | |
// iThemes securiy is used on source system to hide the admin URL | |
// WP Migrate DB is installed in source system to do find and replace of some settings, like a new Admin URL | |
// Check WP Config settings at bottom, you probably will want your own or none of these |
This file contains 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 | |
# Change directory to /home | |
cd /home | |
# Iterate through all users directories | |
for user in * ; do | |
# For every webapp under the user directory | |
# Count wp-config files to make sure its Wordpess |
This file contains 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 | |
# Change directory to /home | |
cd /home | |
# Iterate through all users directories | |
for user in * ; do | |
# For every webapp under the user directory | |
# Count wp-config files to make sure its Wordpess |
This file contains 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
/* HTML/PHP */ | |
<div class="accordion"> | |
<?php foreach($accordions AS $accordion) : ?> | |
<div class="accordion-row col sixcol"> | |
<a href="#" class="accordion-title"><?php echo $accordion['question'];?></a> | |
<div class="accordion-text"><?php echo $accordion['answer'];?></div> | |
</div> | |
<?php endforeach;?> | |
</div> |
This file contains 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
// Add in to HTML where you want the box to be | |
<script src='https://www.google.com/recaptcha/api.js' async defer></script> | |
<div class="captcha_wrapper"> | |
<div class="g-recaptcha" data-sitekey="YOUR_PUBLIC_KEY"></div> | |
</div> | |
// Add into PHP validation to check the submitted captcha response is a success or fail | |
/* Google ReCaptcha Verification */ |
This file contains 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 | |
// Thanks to http://www.smartofthehome.com/2016/05/hive-rest-api-v6/ | |
// Set maxTemp below | |
// Set your username and password | |
// To get the list of all devices to get the thermostat ID, run this script with deviceList as an argument after it | |
/* Set Your Variabes */ | |
$maxTemp = 19.5; // Or 19 or 20 or whatever! | |
$username = 'your-hive-username'; |
NewerOlder