Skip to content

Instantly share code, notes, and snippets.

Avatar

Stuart Harrison pezholio

  • Birmingham / London
View GitHub Profile
View say-the-swears.sh
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
View example_of_full_provenance.json
{
"saon": {
"name": "823 SALISBURY HOUSE"
},
"paon": {
"name": "29"
},
"street": {
"name": "FINSBURY CIRCUS",
"geometry": {
@pezholio
pezholio / import.rb
Last active Jan 15, 2020 — 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)
View import.rb
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
require 'find'
@posts = {}
@drafts = {}
View responsive-image-polyfill.php
<?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 / README.markdown
Created Mar 5, 2012 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things
View README.markdown

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
View TileLayer.Bing.js
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>',
View 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.