Skip to content

Instantly share code, notes, and snippets.

View ldodds's full-sized avatar
🤓

Leigh Dodds ldodds

🤓
View GitHub Profile
@ldodds
ldodds / gist:6937696
Created October 11, 2013 16:20
Gin and Tonic Cake Recipe
Gin and Tonic Cake
makes one large 9×13 baking dish
* 3 cups all-purpose flour
* 2 teaspoons baking powder
* 1/4 teaspoon salt
* 1 cup unsalted butter, at room temperature
* 1 3/4 cup granulated sugar
* 4 large eggs
@ldodds
ldodds / datapackage.json
Created December 2, 2013 14:45
Examples of describing a CSV file using a range of formats supported by different tools, including chkcsv.py, csv-validator, datapackage.json, and schema.ini
{
"name": "CSV Validation Example",
"resources": [
{
"name": "Land Registry Example Data",
"path": "../lr-pp-nov-2013.csv",
"format": "csv",
"mediatype": "text/csv",
"encoding": "UTF-8",
"dialect": {
@ldodds
ldodds / headlines.csv
Last active January 3, 2016 06:49
I was curious about stats on buzzfeed articles. I'm not sure why. Run scrape.rb then run summarise.rb specifying CSV file to use for each. The data is included below
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 3 columns, instead of 1. in line 9.
URL,Title,Description
http://www.buzzfeed.com//buzz/Ghetto_Gourmet,Ghetto Gourmet,Underground eating club expands into large community of foodies.
http://www.buzzfeed.com//buzz/The_Borat_Movie,The “Borat” Movie,Comedy about a Kazakh television journalist's adventures in America.
http://www.buzzfeed.com//buzz/Gay_Republicans,Gay Republicans,Mark Foley scandal puts all gay Republicans on Capitol Hill under scrutiny.
http://www.buzzfeed.com//buzz/Eating_Endangered_Species,Eating Endangered Species,Animals on endangered species list considered a culinary delicacy.
http://www.buzzfeed.com//buzz/Crystal_Meth,Crystal Meth,Drug with ugly side effects.
http://www.buzzfeed.com//buzz/Loco_Roco_,Loco Roco,Cute PSP video game for the Katamari and Cute Overload set.
http://www.buzzfeed.com//buzz/Waterboarding,Waterboarding,Controversial form of torture simulates drowning.
http://www.buzzfeed.com//buzz/Global_Warming_Vacation_Hotspots_,Global Warming Vacation Hotspots ,Why is it 70 degrees in December?
http://www.buzzfeed.
@ldodds
ldodds / senior-staff-organagram.json
Last active November 17, 2019 07:50
Draft Schema for UK Govt Senior Staff Organagram CSV
{
"title": "UK Government Organagram",
"description": "Draft schema for validating CSV files collected as part of publishing UK Government organagrams",
"fields": [
{
"name": "Post Unique Reference",
"title": "Post Unique Reference",
"description": "Unique id for a post",
"constraints": {
"required": true,
@ldodds
ldodds / land-registry-price-paid.json
Last active April 20, 2022 01:18
Land Registry Monthly Price Paid Schema (CSV, new version)
{
"title": "Land Registry Monthly Price Paid Data",
"description": "Schema for the land registry monthly price-paid data",
"fields": [
{
"name": "ID",
"description": "Unique transaction code",
"constraints": {
"required": true,
"minLength": 38,
@ldodds
ldodds / endgame.md
Last active August 29, 2015 13:57
DayZ Endgame Ideas

I might turn this into a blog post, but if I open up Wordpress rather than a gist editor I'll think too much and end up not posting anything. So...

I'm finding DayZ Standalone to be a really compelling experience. At lot of this I owe to the fact that I'm playing with @Thayer, @bamblesquatch, @tomnatt and @dsfan10 who are fun to play with. But the game itself, even at this early stage, has a lot to get hooked on.

Firstly, its a really beautiful game. I've spent several sessions just roaming the landscape away from all of the towns, cities, zombies and other players. In the dreary, wet winter evenings it's nice to drop-into an "eternal day" server and just roam the countryside.

Secondly, the survival mechanics, whilst still being developed, are nuanced and more complex than I've seen in other FPS's that I've played. The need to regulate hydration, food intake, health, bleeding and shock, makes the simple fact of fi

@ldodds
ldodds / gist:9760027
Created March 25, 2014 11:39
ons migration
#set environment for mongoid
export RACK_ENV=development
#run data conversion
rake clean convert
#run the data load, using settings from mongoid.yml
bundle exec rake load
#to drop the database, read database name from ENV["ONS_POC_DB"]
{
"fields": [
{
"name": "One",
"constraints": {
"required": true
}
},
{
"name": "Two",
@ldodds
ldodds / README.md
Last active September 2, 2023 01:15
How to make your own Xanadu demo

Twitter informed that a demo of Xanadu had launched, so I went to have a look. The demo only works in Firefox and it seems to be a cut down version of demos that I've seen Ted Nelson give in the past. But still: running code in the wild.

I met Ted Nelson once when we both spoke at an STM Innovations conference in 2006. I suspect he wouldn't have agreed with my much of my talk which looked at the web as a hypertext system and compared it with earlier approaches. My point of view was that we could bring those features back into the web by creating new services and by exploiting Javascript and web browsers to upgrade our experience of using the web. Evolution doesn't need to happen in a coordinated centralised way.

(When I say I met Ted Nelson, I meant that I shyly sat next to him at lunch while he expounded on various topics and fiddled with the tape recorder he was using to record all his conversations. So maybe, "met" isn't the right word (he won't

@ldodds
ldodds / agreement.txt
Created June 25, 2014 09:43
Webscope Data Sharing Agreement
YAHOO! WEBSCOPE(TM) DATA TERMS OF USE
1. PARTIES & AGREEMENT TO TERMS
1.1. Yahoo! Inc. (“Yahoo!”) provides you access to and use of the Yahoo! WebscopeTM data made available from the Yahoo! website located at http://webscope.sandbox.yahoo.com (“Data”) subject to the terms and conditions of this Terms of Use (“TOU”).
1.2. This TOU is a binding agreement between Yahoo! and you and, if applicable, the company or other legal entity you represent (collectively, “you” or “your”). If you are entering into this TOU on behalf of a company or other legal entity, you warrant and represent that you have the legal authority to bind the legal entity to this TOU, in which case “you” or “your” means that entity. If you do not have this authority, or if you do not agree with the terms and conditions of this TOU, you may not use the Services or any Services-related materials.
1.3. BY CLICKING THE “I AGREE” BUTTON, DOWNLOADING OR USING THE DATA, YOU AGREE THAT THAT YOU HAVE READ AND UNDERSTAND, AND THAT YOU AGREE TO BE BO