Skip to content

Instantly share code, notes, and snippets.

@TheHeat
TheHeat / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@TheHeat
TheHeat / upcoming-events.php
Last active December 18, 2015 02:19 — forked from stephenharris/upcoming-events.php
Display a list of upcoming events with Event Organiser http://wp-event-organiser.com/ without repeating instances of recurring events.
/**
* Display a list of upcoming events with Event Organiser without repeating instances of recurring events
**/
//Get upcoming events for the next 6 months
$events = eo_get_events(array(
'event_start_after'=>'today',
'event_end_after' =>'today',
'event_start_before' => '+6 month',
@TheHeat
TheHeat / autopopulate.js
Last active December 17, 2015 19:09 — forked from mrcave/javascript.js
Retrieve querystring values from the uri, strip out encoded characters and add them to form fields with equivalent names. I'm using this to pre-populate a a generic contact form with dates and details based on which link is clicked.
jQuery(function ($) {
//grab the entire query string
var query = document.location.search.replace('?', '');
//extract each field/value pair
query = query.split('&');
//run through each pair
for (var i = 0; i < query.length; i++) {