Skip to content

Instantly share code, notes, and snippets.

@pauldougan
pauldougan / csv-tools.md
Last active October 1, 2022 07:16
some csv tools

CSV tools - a partial list

I tend to wrangle a lot of spreadsheet data but don't always want to use use google sheets and habitually convert to csv and process them locally.

This is a list of some of my favourite tools, its non exhaustive and biased towards my preference for terminal based user interfaces

1. visidata - the swiss army tool for tabular data

https://www.visidata.org/

@pauldougan
pauldougan / README.md
Created October 5, 2022 10:30
paas-lookup - a handy tool to look up PaaS GUIDs

a tool for looking up GUIDs of things

@pauldougan
pauldougan / TEMPLATE-alpaca-tracker.ENV.txt
Last active November 15, 2023 14:21
Camelid example relying party
NODE_ENV=development
NODE_PORT=3004
OIDC_CLIENT_ID={{CLIENT_ID}}
OIDC_PRIVATE_KEY={{PRIVATE_KEY}}
OIDC_ISSUER_DISCOVERY_ENDPOINT=https://oidc.integration.account.gov.uk/.well-known/openid-configuration
IV_PUBLIC_KEY={{PUBLIC_KEY}}
OIDC_AUTHORIZE_REDIRECT_URI=http://localhost:3004/oauth/callback
OIDC_LOGOUT_REDIRECT_URI=http://localhost:3004/logged-out
LOGOUT_TOKEN_MAX_AGE_SECONDS=120
TOKEN_CLOCK_SKEW=10
@pauldougan
pauldougan / seq.mmd
Last active November 30, 2023 14:01
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pauldougan
pauldougan / clientID.jsh
Last active February 15, 2024 15:58
generate client ID
import java.security.SecureRandom;
import java.util.Base64.Encoder;
int ENTROPY_BYTES = 20;
SecureRandom RANDOM = new SecureRandom();
Base64.Encoder ENCODER = Base64.getUrlEncoder().withoutPadding();
byte[] buffer = new byte[ENTROPY_BYTES];
RANDOM.nextBytes(buffer)
System.out.println(ENCODER.encodeToString(buffer))
@pauldougan
pauldougan / README.md
Last active November 30, 2024 06:41
Generate a Time-based one-time password (TOTP) in TypeScript

Generate a Time-based one-time password (TOTP) in TypeScript

A simple command line example that generates a TOTP code in TypeScript in accordance with IETF rfc6238

Usage

totp.ts

NAME
 totp.ts - generate a TOTP code
@pauldougan
pauldougan / govuk-one login-oidc-discovery-endpoints.csv
Last active January 10, 2024 20:41
GOV.UK One Login OIDC Discovery
environment uri
integration https://oidc.integration.account.gov.uk/.well-known/openid-configuration
production https://oidc.account.gov.uk/.well-known/openid-configuration
@pauldougan
pauldougan / ruby_notes.md
Last active January 20, 2024 23:48
Notes on configuring ruby for use with the tech docs template

Notes on configuring Ruby for use with the Tech docs template

We use the Middleman static website builder with Tech docs template (TDT) to work with our technical documentation. It is essential to have a functioning Ruby environment in order to be able to test branches locally as part of the publishing process.

Selecting the Ruby version

The 2.7.x versions are no longer supported so we need to use a recent supported version in the 3.x range

ruby versions

@pauldougan
pauldougan / nodejs_notes.md
Last active January 20, 2024 20:40
Notes on running nodejs
@pauldougan
pauldougan / README.md
Last active September 12, 2024 20:29
Run govuk-one-login/authentication-tech-docs locally

run-tech-docs.sh

A script to spin up a copy of the GOV.UK One Login technical documentation locally.

It clones the documenation repo into a temporary folder locally, fixes the version of ruby, installs dependencies and runs the Middleman server.

Review pages at http://localhost:4567 and http://localhost:4567/__middleman if you need the middleman dashboard

Dependencies