Skip to content

Instantly share code, notes, and snippets.

@stewartduffy
stewartduffy / double_where_clause.php
Created May 14, 2013 09:19
PODS CMS pods double where clause
<?php
/*
Template Name: Month Page Template
*/
?>
<?php
$found_month = false;
global $pods;
$month_slug = pods_url_variable(-1);
@stewartduffy
stewartduffy / array_import.php
Created May 14, 2013 09:32
Import php array into PODS table, WordPress
<?php
$data = array(
"Performance Coaching",
"Principal Responsibilities of Leadership",
"Strategic Performance Template",
"Team Performance Compact",
"Team Performance One",
"Management Performance Compact",
"Management Performance One",
"Leadership Performance Compact",
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
@stewartduffy
stewartduffy / blog.md
Last active March 29, 2016 20:39
Hello Gistlog

This is cool init!

@stewartduffy
stewartduffy / blog.md
Last active April 12, 2016 06:55
I have a landing page
@stewartduffy
stewartduffy / Example.js
Last active February 17, 2017 08:43
Redux Form Validation
/*
* Simple example of how to use the validators in a Redux form
* This file is pseudo code
*/
// Other imports would go above here ^^
import {validators, validatedForm} from 'common/validation' // import validators & validatedForm
import {details} from './actionMaps'
const Details = ({data, fields, handleSubmit, resetForm, close, dirty}, {trans, permissions}) => (

Keybase proof

I hereby claim:

  • I am stewartduffy on github.
  • I am stewartduffy (https://keybase.io/stewartduffy) on keybase.
  • I have a public key ASARwN_OJIt_ocd1JKk5HsgC8RiK6xCmoL8lufcYoVNKgwo

To claim this, I am signing this object:

@stewartduffy
stewartduffy / myscript.js
Last active October 17, 2018 21:55
Script loader
function doMyBidding() {
alert('yes me lord');
}
console.log('location.host ' + location.host);
console.log('location.origin ' + location.origin);