Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈
👀

James Billingham billinghamj

🏳️‍🌈
👀
View GitHub Profile
@billinghamj
billinghamj / card-offline-outbound.json
Last active Sep 10, 2021
Monzo transaction types
View card-offline-outbound.json
{
"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 / 1-preferred-format.json
Last active Jun 16, 2016
Example Policy Batch Files
View 1-preferred-format.json
[
{
"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"
View 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 / body-codes.csv
Last active Apr 7, 2021
DVLA V355 - code mappings, normalized & cleaned, in CSV format
View body-codes.csv
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
View example.js
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
View keybase.md

Keybase proof

I hereby claim:

  • I am billinghamj on github.
  • I am billinghamj (https://keybase.io/billinghamj) on keybase.
  • I have a public key ASAQvSgKR433Yc-RZa6Hdh33a5LcJNcbo6dnobEW5dmTsgo

To claim this, I am signing this object:

@billinghamj
billinghamj / main.go
Created Apr 6, 2016
Go JWT Generator - ES512 with OpenSSL PEM format keys
View main.go
package main
import (
"crypto"
"crypto/x509"
"encoding/pem"
"fmt"
"github.com/dgrijalva/jwt-go"
"io/ioutil"
"time"
@billinghamj
billinghamj / storage.js
Created Mar 30, 2016
Light MongoDB Abstraction
View storage.js
import log from 'cuvva-log';
import {MongoClient, ObjectID} from 'mongodb';
export default class Storage {
static async create(url) {
// for this particular service, majority is worth having
// if copying, evaluate your write concern needs properly
const db = await MongoClient.connect(url, {
db: { w: 'majority' },
});
View user-stylesheet.css
*:not([class*=icon]) {
font-family: inherit;
}
html {
font-family: sans-serif !important;
}
tt, code, kbd, samp, pre, xmp, plaintext, listing {
font-family: monospace !important;
@billinghamj
billinghamj / twilio.js
Created Aug 30, 2015
Twilio async/await
View twilio.js
const express = require('express');
const twilio = require('twilio');
const app = express();
app.use('/twilio', twilio.middleware);
const call = await twilio.call.create('+12125551234', { from: '+16465551234' });
call.say('Welcome to Cuvva');