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 | |
# Save in public folder | |
# run with "sh ee_update.sh" | |
# Variables | |
database=your_db_name | |
username=your_useraccountname_name | |
now=$(date +'%Y-%d-%m-%H%M') |
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 | |
/* DO NOT LEAVE THIS LIVE ON A SERVER */ | |
$sendemail = true; // Simple switch to enable or disable sending to be safe | |
if (isset($_POST['email']) && $sendemail) | |
{ | |
$to = $_POST['email']; |
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
on run | |
tell application "System Events" | |
set isMailRunning to (count of (every process whose bundle identifier is "com.apple.mail")) > 0 | |
end tell | |
if isMailRunning then | |
# Set Date the Mail is Old | |
set oldemaildate to ((current date) - (71 * days)) |
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
/* | |
The problem with email is it arrives at the time it arrives, and not when you you want it to arrive, | |
and it's a common habit to press the Send and Receive button all the time. So this script and technique | |
will prevent any email that has arrived in Gmail from in fact being downloaded to your mail client apart | |
from the specified times. Good for productivity, email management and less distractions | |
This script is best used when a third party mail application is used to read mail, and not the Gmail | |
interface itself. | |
GMail Requirements: |
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 | |
if( function_exists('acf_add_local_field_group') ): | |
// Main Content Group | |
acf_add_local_field_group(array | |
( | |
'key' => 'content_1', | |
'title' => 'Content', | |
'fields' => array ( |
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
UPDATE wp_pmpro_memberships_users | |
SET enddate = '2018-01-30 23:59:59' | |
WHERE (membership_id = 10 OR membership_id = 11) | |
AND enddate = '0000-00-00 00:00:00' | |
AND status = 'active'; |
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
/*********************** | |
CHANGE USER PASS | |
Function to programmatically change the users password if you know the ID, and do not have access to the admin interface | |
***********************/ | |
wp_set_password( 'yourpassword', id ); // |
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
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} |
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
on run | |
tell application "System Events" | |
set isThingsRunning to (count of (every process whose bundle identifier is "com.culturedcode.things")) > 0 | |
set isMailRunning to (count of (every process whose bundle identifier is "com.apple.mail")) > 0 | |
end tell | |
if isThingsRunning and isMailRunning then | |
tell application "Mail" |
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
# REDIRECT TO WWW and HTTPS | |
#RewriteEngine On | |
#RewriteCond %{HTTP_HOST} !^www.domainname.co.uk$ [OR] | |
#RewriteCond %{SERVER_PORT} 80 | |
#RewriteRule (.*) https://www.domainname.co.uk/$1 [R=301,L] | |
# REDIRECT TO WITHOUT WWW and HTTPS | |
#RewriteEngine On | |
#RewriteCond %{HTTP_HOST} !^domainname.co.uk$ [OR] | |
#RewriteCond %{SERVER_PORT} 80 |
OlderNewer