Skip to content

Instantly share code, notes, and snippets.

View billinghamj's full-sized avatar
🏳️‍🌈
👀

James Billingham billinghamj

🏳️‍🌈
👀
View GitHub Profile
import express from 'express';
import request from 'request';
const app = express();
export default app;
const preRequestRouter = new express.Router();
const postRequestRouter = new express.Router();
// middleware is run in order
@billinghamj
billinghamj / body-codes.csv
Last active January 24, 2024 15:01
DVLA V355 - code mappings, normalized & cleaned, in CSV format
Code Category Subcategory Description
1 Cars & Light 4X4 Utilities Cars 2-Door Saloon
2 Cars & Light 4X4 Utilities Cars 4-Door Saloon
3 Cars & Light 4X4 Utilities Cars Saloon (for information only, no longer used)
4 Cars & Light 4X4 Utilities Cars Convertible
5 Cars & Light 4X4 Utilities Cars Coupe
6 Cars & Light 4X4 Utilities Cars Estate
11 Cars & Light 4X4 Utilities Cars Hearse
12 Cars & Light 4X4 Utilities Cars Limousine
13 Cars & Light 4X4 Utilities Cars 3-Door Hatchback
@billinghamj
billinghamj / apple-pay.js
Created June 14, 2016 13:18
Apple Pay JS
const aps = new ApplePaySession(1, {
countryCode: 'GB',
currencyCode: 'GBP',
supportedNetworks: ['visa', 'masterCard', 'amex'],
merchantCapabilities: ['supports3DS', 'supportsEMV'],
total: { label: 'Test 2', amount: '10.00' },
});
someButton.on('click', () => aps.begin());
@billinghamj
billinghamj / 1-preferred-format.json
Last active June 16, 2016 14:22
Example Policy Batch Files
[
{
"id": "46fe8500-52e2-11e5-ab91-9b1a2fe9338e",
"ref": "PWKJCDPA4",
"startDate": "2015-09-04T08:52:31.182Z",
"endDate": "2015-09-04T09:52:31.182Z",
"startLocation": {
"latitude": 51.5116821067071,
"longitude": -0.1326164101313357,
"postcode": "W1D 6LT"
@billinghamj
billinghamj / card-offline-outbound.json
Last active September 10, 2021 10:15
Monzo transaction types
{
"id": "tx_[transaction-id]",
"created": "2017-07-24T05:45:49.311Z",
"description": "TFL.GOV.UK/CP\\VICTORIA STREET\\TFL TRAVEL CH\\SW1H 0TL GBR",
"amount": -770,
"currency": "GBP",
"merchant": null,
"notes": "",
"metadata": {
"mastercard_clearing_message_id": "mcclearingmsg_[mastercard-clearing-message-id]",
@billinghamj
billinghamj / terraform-providers.yml
Created April 13, 2022 13:53
.terraform.lock.hcl platforms
on:
pull_request_target:
paths:
- 'infra/**/.terraform.lock.hcl'
- '.github/workflows/terraform-providers.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
package polymorphism
type Type interface{ ~string }
type Base[TType Type] interface {
GetType() TType
SetType(TType)
}
type Params[TType Type] interface {