Skip to content

Instantly share code, notes, and snippets.


Iain Collins iaincollins

View GitHub Profile
iaincollins /
Created September 15, 2022 22:08
Aalternate light/dark images with GitHub Flavour Markdown
iaincollins / pizza-filter-long.js
Created March 19, 2020 01:50
Pizza Filter (long and short form example)
View pizza-filter-long.js
// Long form example
const pizzas = [
name: 'Margarita',
toppings: ['Cheese', 'Tomato']
name: 'Hawaiian',
toppings: ['Cheese', 'Tomato', 'Ham', 'Pineapple']
iaincollins / deploy.yml
Created February 4, 2020 00:29
Example GitHub action to place somewhere like .github/workflows/deploy.yml
View deploy.yml
name: Deploy on push to master
- master
name: deploy
runs-on: ubuntu-latest
iaincollins / auth.js
Last active November 12, 2019 23:02
Script to fetch images from Flickr
View auth.js
// 1. Add your API key and secret below
// 2. Run `npm i flickrapi` to install the SDK dependency
// 3. Run 'node auth.js` and follow the instructions
// (will open browser window, need to paste number back in terminal and copy entire output)
const Flickr = require('flickrapi')
iaincollins /
Created November 27, 2018 10:52

Keybase proof

I hereby claim:

  • I am iaincollins on github.
  • I am iaincollins ( on keybase.
  • I have a public key ASDf9ymZvYwN7R-sHq0yoHEa8kvW_5i1MmIK_cbroZLEBAo

To claim this, I am signing this object:

iaincollins /
Created October 26, 2018 09:32
How to Contribute

How to contribute

See the instructions in for how to run the code.

When developing a feature, you should start by scoping out a spec, developing tests against that spec and writing code against the tests. Working with others to review the spec before starting development is encouraged.

Raise a Pull Request

  1. When you create a branch, it should reflect the nature of the change.
iaincollins /
Last active October 29, 2018 10:26
Pull Request Template


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


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

Link to Issue

iaincollins /
Last active September 20, 2021 14:26
ADR Template

[short title of solved problem and solution]

  • Status: [accepted | superseded by ADR-0005 | deprecated | …]
  • Deciders: [list everyone involved in the decision]
  • Date: [YYYY-MM-DD when the decision was last updated]

Technical Story: [description | ticket/issue URL]

Context and Problem Statement

iaincollins /
Last active October 1, 2018 23:22
Data for appearances by guests on BBC Question Time.
iaincollins / golf.js
Last active February 2, 2018 19:25
Code Golf
View golf.js
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";