Skip to content

Instantly share code, notes, and snippets.

View pezholio's full-sized avatar

Stuart Harrison pezholio

  • Birmingham / London
View GitHub Profile
@pezholio
pezholio / README.markdown
Created March 5, 2012 11:34 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

I've added a couple of lines to the original fork to stop the default behaviour when tabbing. For the proper source, please see the original gist.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
@pezholio
pezholio / import.rb
Last active January 15, 2020 14:03 — forked from dnagir/import.rb
Regenerate the source of an Octopress blog (if you're an idiot and forgot to commit the source like me)
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
require 'find'
@posts = {}
@drafts = {}
@pezholio
pezholio / say-the-swears.sh
Last active November 3, 2016 15:26 — forked from pikesley/say-the-swears.sh
Swears on a Mac
curl https://peterkwells.github.io/known-uk-swearwords/data/swearwords.csv | tr -s '\015' '\n' | grep -v UID | cut -d ',' -f 1,2 | sed "s:\(.*\),\(.*\):number \1, \2,:" | say
<?php
/*
* Plugin Name: PB Responsive Images
* Plugin URI: http://wordpress.org/extend/plugins/pb-responsive-images/
* Description: Adds support for the proposed responsive image format in post content, and helper functions for theme authors.
* Author: Phenomblue
* Version: 1.3
* Author URI: http://www.phenomblue.com/
*
* -------------------------------------
@pezholio
pezholio / TileLayer.Bing.js
Created October 14, 2011 09:18 — forked from pagameba/TileLayer.Bing.js
Leaflet Bing layer
L.TileLayer.Bing = L.TileLayer.extend({
supportedTypes: ['Road', 'Aerial', 'AerialWithLabels'],
attributionTemplate: '<span style="display:inline-block">' +
'<a target="_blank" href="http://www.bing.com/maps/">' +
'<img src="{logo}" /></a><br><span>{copyrights}' +
'<a style="white-space: nowrap" target="_blank" '+
'href="http://www.microsoft.com/maps/product/terms.html">' +
'Terms of Use</a></span></span>',
@pezholio
pezholio / fatc.html
Created October 19, 2010 12:03 — forked from tomger/fatc.html
<!DOCTYPE html>
<html><head>
<title>Fork-A-Twitter-Client</title>
<!--
Basic OniApollo/StratifiedJS Twitter Client application scaffold.
See http://fatc.onilabs.com/
THIS FILE IS IN THE PUBLIC DOMAIN.
{
"saon": {
"name": "823 SALISBURY HOUSE"
},
"paon": {
"name": "29"
},
"street": {
"name": "FINSBURY CIRCUS",
"geometry": {