Skip to content

Instantly share code, notes, and snippets.


Jon Heslop jonheslop

View GitHub Profile
joyrexus /
Last active Sep 29, 2022 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery


// jQuery
$(document).ready(function() {
  // code
cmod /
Last active Sep 15, 2022 — forked from eddiewebb/
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to and press CMD-/ and start typing.

Fast Search

adactio / basicServiceWorker.js
Last active Aug 11, 2022
A basic Service Worker, for use on, say, a blog.
View basicServiceWorker.js
'use strict';
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
(function() {
// Update 'version' if you need to refresh the cache
var staticCacheName = 'static';
var version = 'v1::';
erikh /
Created Mar 31, 2012 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
robinsloan / unfave.rb
Last active Jun 5, 2022
Unfave script, because why not??
View unfave.rb
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
require "json"
require "faraday"
# things you must configure
TWITTER_USER = "your_username"
# get these from
robinsloan / langoliers.rb
Last active Jun 5, 2022
The Langoliers, a tweet deletion script
View langoliers.rb
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from
CONSUMER_KEY = "your_consumer_key"
helen / repeatable-fields-metabox.php
Created Jan 11, 2012
Repeating Custom Fields in a Metabox
View repeatable-fields-metabox.php
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
function hhs_get_sample_options() {
mhulse / Amazon S3 snippets and Transmit FTP cloud
Last active Feb 21, 2021
Amazon S3 snippets... Transmit FTP cloud settings... Other related goodies...
View Amazon S3 snippets and Transmit FTP cloud

S3 Website "Index Document"


<title>403 Forbidden</title>
anonymous / gist:4266129
Created Dec 12, 2012
Awesome placeholder attribute fallback
View gist:4266129
# If browser doesn't support placeholders, take the placeholder text and set it as the field's value
unless Modernizr.input.placeholder
$("input[placeholder]").each (index, element)->