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/sh | |
rsync="/usr/bin/rsync" | |
################################ | |
# VARIABLES | |
################################ | |
# General Variables | |
remote_server="yourserver.com" | |
remote_port="22" |
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
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 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
/* | |
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 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
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 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
-- Thanks to https://github.com/HunterHillegas/OmniFocusMailFlags/blob/master/PushFlaggedMessagesToOmniFocus.applescript | |
-- This AppleScript will send email messages in a specific folder in Mail.app to your Omnifocus 2 inbox | |
-- Only runs if Mail and OF2 are open | |
-- Run the script with /usr/bin/osascript "/path/to/script/send-follow-up-to-omnifocus.scpt" | |
-- I use Lingon to manage my scheduled scripts | |
-- Edit the variables below | |
on run |
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 | |
// Map CSV file to array | |
$rows = array_map('str_getcsv', file('data.csv')); | |
$header = array_shift($rows); | |
$data = array(); | |
foreach ($rows as $row) | |
{ | |
$data[] = array_combine($header, $row); | |
} |
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 | |
# 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 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 | |
/* 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 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 | |
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 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
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'; |
OlderNewer