Skip to content

Instantly share code, notes, and snippets.

@eknowles
eknowles / index.ts
Created June 6, 2024 10:28
UPRN PMTiles
bun --watch index.ts
pmtiles serve ./files/script --port 9421 --public-url http://localhost:9421 --cors http://localhost:9420
time_until_date_with_workhours() {
# Check if date is provided
if [ -z "$1" ]; then
echo "Usage: time_until_date_with_workhours <event_name> <event_time>"
return 1
fi
event_name=$1
event_time=$2
@eknowles
eknowles / natwest_bank_codes.csv
Created December 20, 2023 12:49
natwest bank codes
ATM Automated Teller (Cash) Machine
BAC Bankers Automated Clearing Services
BGC Bank Giro Credit
BSP Branch Single Payment
CDM Cash & Deposit Machine
CHG Charge
CHP Payments by CHAPS transfer
CHQ Cheque
C/L Cashline
CUI Centralised Unpaid In (Unpaid Cheque)

macOS Setup for SWE

Core

Install Homebrew

Homebrew will also install Xcode for you, but if you'd rather do this first you can with xcode-select --install.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#!/bin/bash
write_npm_token() {
local username=$1
local password=$2
local rc="${HOME}/.zshrc"
# Use sed to remove lines starting with "export NPM_TOKEN="
sed -i '/^export NPM_TOKEN=/d' "$rc"
#!/bin/sh
# The MIT License (MIT)
#
# Copyright (c) 2017 Eficode Oy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
fetch('https://codeload.github.com/Stunjelly/i-am-private/zip/refs/heads/main?token=AAGHTS53SQKZGE5AJXHGJWTBXJZPA')
{
"head": {
"docType": "13",
"editorVersion": "6.4.25",
"c_para": {
"Prefix Start": "1",
"Contributor": "Edward Knowles",
"name": "A-10C Caution Panel"
},
"c_spiceCmd": "null",
<!doctype html>
<html lang="en">
<head>
<title>status</title>
</head>
<body>
<style>
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
function say(str, iterations) {
let total = str;
for (let i = 0; i < iterations; i++) {
let count = 0;
let output = '';
for (let i = 0; i <= total.length; i++) {
if (i === 0 || total[i] === total[i - 1]) {