Skip to content

Instantly share code, notes, and snippets.

Todd Heslin toddheslin

Block or report user

Report or block toddheslin

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 australian_states.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
toddheslin / shopifyAdditionalScripts.html
Created Feb 5, 2018
Shopify Checkout Additional Scripts
View shopifyAdditionalScripts.html
window.dataLayer = window.dataLayer || [];
function _ready(fn) {
if (document.readyState != 'loading') {
} else {
document.addEventListener('DOMContentLoaded', fn);
_ready(function() {
toddheslin / additionalScripts.js
Created Feb 5, 2018
Shopify GA Additional Scripts
View additionalScripts.js
// Our custom GA additional scripts module
var additionalGA = {
host: window.location.hostname,
path: window.location.pathname.split('/'),
init: function() {
var isCheckout = this.isCheckout();
isCheckout ? this.loadSegment() : null;
//isCheckout ? null : this.ready(this.gaLinker);
isCheckout: function(){
toddheslin / docker-compose.yml
Last active Dec 21, 2017
Wordpress Docker Compose
View docker-compose.yml
version: '3'
image: mariadb
- db_data:/var/lib/mysql
restart: always
- "8081:3306"

Keybase proof

I hereby claim:

  • I am toddheslin on github.
  • I am toddheslin ( on keybase.
  • I have a public key ASAdXH-pml-gSwn1oTdKeugGf1ZYqCPdO_e3EZ2YZLsAvQo

To claim this, I am signing this object:

toddheslin / find-unique-keys.js
Last active Aug 2, 2017
Discover which custom properties have been added to the global javascript scope
View find-unique-keys.js
(function() {
// Taken from Chrome. Can update this with your own browser/version by running Object.keys(window) on an empty HTML document
var vanilla = ["stop","open","alert","confirm","prompt","print","requestAnimationFrame","cancelAnimationFrame","requestIdleCallback","cancelIdleCallback","captureEvents","releaseEvents","getComputedStyle","matchMedia","moveTo","moveBy","resizeTo","resizeBy","getSelection","find","getMatchedCSSRules","webkitRequestAnimationFrame","webkitCancelAnimationFrame","btoa","atob","setTimeout","clearTimeout","setInterval","clearInterval","createImageBitmap","scroll","scrollTo","scrollBy","postMessage","fetch","blur","focus","close","webkitRequestFileSystem","webkitResolveLocalFileSystemURL","openDatabase","chrome","console","arr","frames","self","window","parent","opener","top","length","closed","location","document","origin","name","history","locationbar","menubar","personalbar","scrollbars","statusbar","toolbar","status","frameElement","navigator","applicationCache","external","sc
toddheslin / gist:41d54f115f495efb29e9
Created Feb 27, 2015
Advanced handling of Wufoo url query params
View gist:41d54f115f495efb29e9
<div id="wufoo-m2oq9xw0yusu89"></div>
<script type="text/javascript">
var QueryString = function () {
This function is anonymous, is executed immediately and
the return value is assigned to the variable 'QueryString'
var query_string = {};
var query =;
var vars = query.split("&");
toddheslin / wufooUrlParams.js
Last active Dec 22, 2016
Setting url params as variables in Wufoo embed form
View wufooUrlParams.js
// The following code is from @dorward answering a stackoverflow question.
// Like the Wufoo embed, it doesn't rely on jQuery. Thanks @dorward!
<div id="wufoo-m2oq9xw0yusu89"></div>
<script type="text/javascript">
var QueryString = function () {
This function is anonymous, is executed immediately and
toddheslin / wufooCookies.js
Created Nov 23, 2014
Setting url params as cookies for wufoo forms
View wufooCookies.js
// Requires cookies.js to be loaded globally, or added as part of the Wufoo script. Added here as part of script for convinence.
|*| :: cookies.js ::
|*| A complete cookies reader/writer framework with full unicode support.
|*| Revision #1 - September 4, 2014
You can’t perform that action at this time.