Skip to content

Instantly share code, notes, and snippets.

View ldodds's full-sized avatar
🤓

Leigh Dodds ldodds

🤓
View GitHub Profile
@ldodds
ldodds / Gemfile
Created August 20, 2014 18:47
Socrata facade
source "https://rubygems.org"
ruby "2.1.0"
gem 'sinatra'
gem 'json'
gem 'soda-ruby'
gem 'dotenv'
gem 'rest_client'
gem 'linkeddata'
@ldodds
ldodds / gist:6a425f610d89ea4afd23
Created November 1, 2014 10:53
OpenLayers example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml>"
<head>
<title>Bath 1818</title>
<meta http-equiv='imagetoolbar' content='no'/>
<style type="text/css"> v\:* {behavior:url(#default#VML);}
html, body { overflow: hidden; padding: 0; height: 100%; width: 100%; font-family: 'Lucida Grande',Geneva,Arial,Verdana,sans-serif; }
body { margin: 10px; background: #fff; }
h1 { margin: 0; padding: 6px; border:0; font-size: 20pt; }
#header { height: 43px; padding: 0; background-color: #eee; border: 1px solid #888; }
@ldodds
ldodds / air-quality.md
Created April 20, 2015 18:13
Bath Air Quality Sensor Data Dataset Documentation

Bath Air Quality Sensor Data

This page provides documentation for the Bath air quality sensor data available in the Bath: Hacked data store.

There are two air quality datasets:

There’s also a third dataset that contains the names and geographic locations for the 5 sensors

@ldodds
ldodds / scribd.js
Created May 13, 2015 06:42
Scribd bypass
var id = window.location.href.match(/\/doc\/([0-9]+)\//)[1]
window.location.href = "https://www.scribd.com/document_downloads/" + id + "?extension=pdf&from=embed&source=embed"
@ldodds
ldodds / fixed-schema.json
Created June 2, 2015 20:30
Fixed up schema from csvlint bug report
{
"fields": [
{
"name": "Store Code",
"constraints": {
"required": true,
"type": "http://www.w3.org/TR/xmlschema-2/#string",
"unique": true,
"maxLength": 10
}
@ldodds
ldodds / bath-unchained.py
Created November 2, 2015 20:35
Quick hack to explore creating Joy Division style album cover from LIDAR data
#Bath Unchained
#
#based on original: http://matplotlib.org/examples/animation/unchained.html
#
#pass the script a path to a ASC file, e.g after unpacking the EA data I ran
#
#python bath-unchained.py LIDAR-DSM-1M-ST76/st7465_DSM_1m.asc
#
#output: https://twitter.com/ldodds/status/661279776292929536
import sys
@ldodds
ldodds / test
Created November 29, 2015 14:50
{
"title":"Burkina Faso",
"version":"1.1.2",
"type":"FeatureCollection",
"copyright":"Copyright (c) 2015 Highsoft AS, Based on data from Natural Earth",
"copyrightShort":"Natural Earth",
"copyrightUrl":"http://www.naturalearthdata.com",
"crs":{
"type":"name",
"properties":{
{
"title": "Burkina Faso",
"version": "1.1.2",
"type": "FeatureCollection",
"copyright": "Copyright (c) 2015 Highsoft AS, Based on data from Natural Earth",
"copyrightShort": "Natural Earth",
"copyrightUrl": "http://www.naturalearthdata.com",
"crs": {
"type": "name",
"properties": {
@ldodds
ldodds / git-blame-club.txt
Created April 14, 2016 10:47
Git Blame Club
Welcome to Git Blame Club.
The first rule of Git Blame Club is: you do not blame other people.
The second rule of Git Blame Club is: you DO NOT blame other people!
Third rule of Fight Club: if someone yells "CONFLICT!", goes limp, or taps out, the blaming is over.
Fourth rule: only two branches to a merge.
Fifth rule: one merge at a time, everyone.
Sixth rule: the merges are command-line. No editors, no GUIs.
Seventh rule: merges will go on as long as they have to.
And the eighth and final rule: if this is your first day at Git Blame Club, you have to commit.
var id = window.location.href.match(/\/doc\/([0-9]+)\//)[1]
window.location.href = "https://www.scribd.com/document_downloads/" + id + "?extension=pdf&from=embed&source=embed"