Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Generated schema for Root",
"type": "object",
"properties": {
"dublin_core": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
@eknowles
eknowles / gist:046742fa7877754a0605a90ad830b105
Created November 9, 2024 13:06
overture buildings duckdb slow
# pmtiles extract https://overturemaps-tiles-us-west-2-beta.s3.amazonaws.com/2024-08-20/buildings.pmtiles data/overture_buildings.pmtiles --region=data/e00_geometry.geojson
# ogr2ogr data/overture_buildings.geojson data/overture_buildings.pmtiles -t_srs EPSG:4326 -skipfailures -nln buildings -nlt POLYGON -select @geometry_source,class,height -clipsrc data/e00_geometry.geojson
@asset(
deps=["e00_geometry"]
)
def overture_buildings(duckdb: DuckDBResource) -> Output[None]:
with duckdb.get_connection() as conn:
conn.load_extension("spatial")
bbox = conn.sql(f"""
@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",