Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓

Leigh Dodds ldodds

🤓
View GitHub Profile
@ldodds
ldodds / monitor.rb
Created Jul 30, 2012
Amazon Wishlist Monitor
View monitor.rb
#libnotify-bin
require 'rubygems'
require 'json'
require 'hpricot'
require 'yaml'
require 'open-uri'
#Check for config
if !File.exist?(ENV["HOME"] + "/.wishlist-monitor/config.yaml")
puts "Configuration file is missing"
@ldodds
ldodds / schema.rdf
Created Sep 28, 2012
Artisanal Integer Schema
View schema.rdf
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<rdfs:Class rdf:about="http://artisanalintegers.com/schema.rdf#Integer">
<rdfs:label xml:lang="en">An Artisanal Integer</rdfs:label>
<rdfs:comment>Represents an Artisanal Integer</rdfs:comment>
</rdfs:Class>
@ldodds
ldodds / gist:3958906
Created Oct 26, 2012
List of Board Game suggestions for Geek Family
View gist:3958906
Have:
Ticket to Ride Europe
Talisman
Carcassonne
Suggestions:
Agricola
Bang!
View gist:4030886
<http://creativecommons.org/ns#license> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#AnnotationProperty> <http://data.kas
abi.com/dataset/ordnance-survey> .
<http://data.ordnancesurvey.co.uk/> <http://purl.org/dc/elements/1.1/rights> "Crown Copyright 2010" <http://data.kasabi.com/dataset/ordnance-survey> .
<http://data.ordnancesurvey.co.uk/> <http://purl.org/dc/terms/coverage> <http://data.ordnancesurvey.co.uk/id/country/england> <http://data.kasabi.com/dataset
/ordnance-survey> .
<http://data.ordnancesurvey.co.uk/> <http://purl.org/dc/terms/coverage> <http://data.ordnancesurvey.co.uk/id/country/scotland> <http://data.kasabi.com/datase
t/ordnance-survey> .
<http://data.ordnancesurvey.co.uk/> <http://purl.org/dc/terms/coverage> <http://data.ordnancesurvey.co.uk/id/country/wales> <http://data.kasabi.com/dataset/o
rdnance-survey> .
<http://data.ordnancesurvey.co.uk/> <http://purl.org/dc/terms/creator> <http://data.ordnancesurvey.co.uk/id/ordnancesurvey> <http://data.kasabi.com
@ldodds
ldodds / datagovuk.ini
Created Jan 27, 2013
Sample dpm configuration for data.gov.uk. This is for illustration: your version will have local paths in it
View datagovuk.ini
[dpm]
repo.default_path = /home/ldodds/.dpm/repository
index.default = file
[index:ckan]
ckan.url = http://data.gov.uk/api/
ckan.api_key =
[index:db]
db.dburi = sqlite:///home/ldodds/.dpm/repository/index.db
@ldodds
ldodds / nexus.sh
Created Feb 18, 2013
Is the Nexus 10 32gb in stock yet?
View nexus.sh
# Generate a system notification on the current product status of the Google Nexus 10 32gb
#
# Uses notify-send to generate notification
# hxnormalize and hxselect are from html-xml-utils package on ubuntu
# hxnormalize: tidy up HTML
# hxselect: use CSS selector to extract element content from well-formed XML
# Added to my crontab so I don't have to keep manually checking
#
notify-send "Nexus 10 32gb Status" "`hxnormalize -x -l 240 https://play.google.com/store/devices/details?id=nexus_10_32gb 2>/dev/null | hxselect -c ".hardware-price-description"`"
@ldodds
ldodds / email.md
Created Apr 29, 2013
Lovecraft Span Fan Fic
View email.md

To Whom It May Concern,

I struggle to write this letter with the horrors I have recently encountered, but I trust that my mail finds you in good health and that your mind is free from the looming sense of unease with which my own is troubled.

I am coming to you in good faith and with a firm belief that you can help me resolve this unpleasant situation. I will be thankful to you if you could understand my plight and see clear to helping my resolve my affairs

My name is Howard Clearwater and I am the only heir to the Clearwater family. My father and sister were killed in mysterious circumstances last year after Walpurgis Night. The accident happened whilst there were attending a singular ceremony, held in a local harbour, and conducted by some local families of ill repute.

I am currently living alone in our old house but am troubled by rumours surrounding their deaths and the cause of the ceremony. I am afraid to leave the property as I have been threatened and jeered by locals.

@ldodds
ldodds / geosummary.sh
Created May 15, 2013
Summarise dbpedia geographic coverage by reverse geocoding the lat/lng data
View geosummary.sh
#!/bin/bash
#
# Script to download English dbpedia lat/lng data and produce a
# summary of geographic coverage
#
# You'll need to have local-geocoder Ruby application installed:
#
# sudo gem install local-geocoder
#
# http://github.com/aishfenton/local-geocoder
@ldodds
ldodds / log.txt
Created May 17, 2013
Spotify log output
View log.txt
13:51:26.908 I [breakpad.cpp:107 ] Registered Breakpad for product: spotify

13:51:26.912 I [translate.cpp:139 ] Reloading language file
13:51:26.942 I [breakpad.cpp:261 ] Searching for crashdumps: /home/ldodds/.cache/spotify/*.dmp

13:51:26.943 I [translate.cpp:139 ] Reloading language file
13:51:27.003 A [CefModule.cpp:434 ] Check failed: g_cef_handle: 
13:51:27.255 I [MainView.cpp:1076 ] Registering bundled framework bridge-desktop with version 0.13.0
13:51:27.255 I [MainView.cpp:1076 ] Registering bundled framework import with version 0.1.0
13:51:27.255 I [MainView.cpp:1076 ] Registering bundled framework api with version 0.2.8
@ldodds
ldodds / odrs-rdfa-example.html
Created Jun 10, 2013
Example of a rights statement in RDFa
View odrs-rdfa-example.html
<!DOCTYPE html>
<html prefix="dct: http://purl.org/dc/terms/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
dcat: http://www.w3.org/ns/dcat#
odrs: http://schema.theodi.org/odrs#">
<head>
<title>Example ODRS in RDFa</title>
</head>
<body>
<div typeof="dcat:Dataset" resource="http://gov.example.org/dataset/finances">