Skip to content

Instantly share code, notes, and snippets.

Jason Tucker jasontucker

Block or report user

Report or block jasontucker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kill.scpt
tell application "System Events"
set ProcessList to name of every process
if "TextEdit" is in ProcessList then
set ThePID to unix id of process "TextEdit"
do shell script "kill -KILL " & ThePID
@jasontucker
jasontucker / PRTG-mailchimp-subscriptions-count.php
Last active Oct 24, 2017
Generates a PRTG friendly XML file for use with a PRTG XML sensor
View PRTG-mailchimp-subscriptions-count.php
<?php
header('Content-Type: text/xml');
// API Values
$api_key = '';
$dc = ''; //us15
$list = '';
// Create the logs directory and create the two log files
$lastRunLog = 'logs/lastrun.log';
View gist:28bac4195d3e682770673a55df5787f2
add_action( 'fl_builder_post_grid_after_column', 'probb_add_google_adsense', 10, 2 );
function probb_add_google_adsense( $settings, $module ){
//if( is_home() || is_front_page() ){
//if( 'columns' !== $settings->layout && 'main_query' !== $settings->data_source){
if( 'columns' !== $settings->layout ){
// If we're using the column layout or not
return;
}
@jasontucker
jasontucker / display_event_time.php
Created May 10, 2017
WordPress Display Event Time shortcode using WordTimeBuddy.com
View display_event_time.php
function display_event_time( $atts ) {
$a = shortcode_atts( array(
'day' => '12/13/2014',
'time' => '14.00',
), $atts );
$add = '<span class="wtb-ew-v1" style="width: 560px; display:inline-block">
<script src="https://www.worldtimebuddy.com/event_widget.js?h=5368361&md=' . esc_attr($a['day']) . '&mt=' . esc_attr($a['time']) . '&ml=1.00&sts=0&sln=0&wt=ew-ltc"></script>
View Event Espresso query limit
// Event Espresso plugin for WordPress
// includes/event-management/queries
// For some reason Event Espress limits the queries of all of it's
// queries to 50 when you have over 100 events 50 isnt going to cut it.
// $max_rows = isset($_REQUEST['max_rows']) & !empty($_REQUEST['max_rows']) ? absint($_REQUEST['max_rows']) : 50;
// to
$max_rows = isset($_REQUEST['max_rows']) & !empty($_REQUEST['max_rows']) ? absint($_REQUEST['max_rows']) : 10000;
View WordPress Short code to generate list of donors using Give plugin
function recent_donors_function() {
//Get the latest 100 Give Donors
$args = array(
'number' => 100,
function recent_donors_function() {
$donors = Give() - > customers - > get_customers($args);
foreach($donors as $donor) {
View imgls.sh
#!/bin/bash
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST.
function print_osc() {
if [ x"$TERM" = "xscreen" ] ; then
printf "\033Ptmux;\033\033]"
else
printf "\033]"
@jasontucker
jasontucker / gist:46729509dc5343d5cb88
Created Jan 25, 2016
Importing CCB (Church Community Builder) groups into Google Sheets
View gist:46729509dc5343d5cb88
// Based on the script found here
// https://village.ccbchurch.com/message_comment_list.php?message_id=2530&view_increment=1&search_term=groups
// Get Sheet and CCB Data
function getgroups() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var unamepass ="username:password";
var CCBLink = "https://churchsubdomain.ccbchurch.com/api.php?";
var CCBapi = "srv=group_profiles";
@jasontucker
jasontucker / parse-podcast-feed.php
Created Dec 11, 2015
Parses enclosure urls from iTunes RSS feed
View parse-podcast-feed.php
<?php
/**
* mp3s.php
* Parses enclosure urls from itunes RSS feed
* @author Jason Tucker
*/
?>
<html>
<head>
@jasontucker
jasontucker / redownload.sh
Created Sep 5, 2015
WordPress - Redownload all installed and active plugins
View redownload.sh
active=$(wp plugin list --status=active --format=csv --fields=name)
for plugin in $active; do
(
if [ ! $plugin = 'name' ]; then
wp plugin install $plugin --force
fi
)
done
You can’t perform that action at this time.