Skip to content

Instantly share code, notes, and snippets.

View iaincollins's full-sized avatar
:shipit:

Iain Collins iaincollins

:shipit:
View GitHub Profile
@iaincollins
iaincollins / Keybase.md
Created November 27, 2018 10:52
Keybase.md

Keybase proof

I hereby claim:

  • I am iaincollins on github.
  • I am iaincollins (https://keybase.io/iaincollins) on keybase.
  • I have a public key ASDf9ymZvYwN7R-sHq0yoHEa8kvW_5i1MmIK_cbroZLEBAo

To claim this, I am signing this object:

@iaincollins
iaincollins / Additional common aliases.csv
Last active November 17, 2018 19:20
🌍 ⁉️ WHAT EVEN ARE COUNTRIES
iso2 alias
BM Islands of Bermuda
BM The Islands of Bermuda
BM Bermudas
BM The Bermudas
BM Somers Isles
BM The Somers Isles
BS Bahama
BS Bahamas
BS The Bahamas
@iaincollins
iaincollins / pull_request_template.md
Last active October 29, 2018 10:26
Pull Request Template

Summary

A sentence describing the reason for the changes in this pull request.

Description

A few sentences / bullet points describing the goals of this change and the implementation.

Link to Issue

@iaincollins
iaincollins / README.md
Last active October 1, 2018 23:22
Data for appearances by guests on BBC Question Time.
@iaincollins
iaincollins / uk-mps.csv
Last active February 9, 2018 02:04
UK MPs as of 2015-05-08 11:00 BST
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 13 columns, instead of 6. in line 7.
Member_Id,Dods_Id,Pims_Id,DisplayAs,ListAs,FullTitle,LayingMinisterName,DateOfBirth,Gender,House,MemberFrom,HouseStartDate,
172,25790,3572,Ms Diane Abbott,"Abbott, Diane",Ms Diane Abbott MP,null,1953-09-27T00:00:00,F,Commons,Hackney North and Stoke Newington,1987-06-11T00:00:00,
4212,80556,5905,Debbie Abrahams,"Abrahams, Debbie",Debbie Abrahams MP,null,1960-09-15T00:00:00,F,Commons,Oldham East and Saddleworth,2011-01-13T00:00:00,
4057,35435,5556,Nigel Adams,"Adams, Nigel",Nigel Adams MP,null,1966-11-30T00:00:00,M,Commons,Selby and Ainsty,2010-05-06T00:00:00,
1586,35516,4734,Adam Afriyie,"Afriyie, Adam",Adam Afriyie MP,null,1965-08-04T00:00:00,M,Commons,Windsor,2005-05-05T00:00:00,
4038,83154,5563,Heidi Alexander,"Alexander, Heidi",Heidi Alexander MP,null,1975-04-17T00:00:00,F,Commons,Lewisham East,2010-05-06T00:00:00,
4138,58561,5735,Rushanara Ali,"Ali, Rushanara",Rushanara Ali MP,null,1975-03-14T00:00:00,F,Commons,Bethnal Green and Bow,2010-05-06T00:00:00,
364,25774,3636,Mr Graham Allen,"Allen, Graham",Mr Gr
@iaincollins
iaincollins / golf.js
Last active February 2, 2018 19:25
Code Golf
function golfScore(par, strokes) {
// Only change code below this line
if (strokes === 1) {
return "Hole-in-one!";
} else if (strokes <= (par - 2)) {
return "Eagle";
} else if (strokes === (par - 1)) {
return "Birdie";
@iaincollins
iaincollins / example.html
Created May 12, 2015 15:23
Juicer 2.0 API Example
<html>
<body>
<h2>Lookup by Query</h2>
<textarea cols="100" rows="10" id="query-result"></textarea>
<hr/>
<h2>Lookup by URI</h2>
<textarea cols="100" rows="10" id="uri-result"></textarea>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
// Set up a scheduled job to fetch Bills with node-cron
// https://github.com/ncb000gt/node-cron
//
// Just add this to your server.js (or app.js) file
var CronJob = require('cron').CronJob;
var job = new CronJob({
cronTime: '00 30 11 * * 1-5',
onTick: function() {
// Code goes here
},
@iaincollins
iaincollins / Bills with tags
Last active August 29, 2015 14:14
Combining UK Parliament data + NLP + BBC Things in node.js to tag Bills by topic
Tags for Employment Practices Bill:
{ 'Scottish Parliament':
{ label: 'Scottish Parliament',
hint: 'The Scottish Parliament is the devolved national, unicameral legislature of Scotland, located in the Holyrood area of the capital, Edinburgh. ',
uri: 'http://www.bbc.co.uk/things/59ab9b46-cb29-4394-bea7-59b2d6c74bc2#id',
properties: [Function] },
Wales:
{ label: 'Wales',
hint: 'a nation of the United Kingdom of Great Britain and Northern Ireland',
uri: 'http://www.bbc.co.uk/things/00eb010f-568a-4b89-bbfe-799d5b812bed#id',