Skip to content

Instantly share code, notes, and snippets.

View psd's full-sized avatar

Paul Downey psd

View GitHub Profile
@psd
psd / CA01.csv
Last active January 18, 2022 15:28
CA01
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 7 columns, instead of 2. in line 8.
reference,entity,resource,entry-date,name,organisation,start-date
53,,f498f7e6f6eab582c68aa42a62bf61b74a01cf938d664fe44aaa0bb5ba23d845,2020-09-04,Clapham,local-authority-eng:LBH,
CA01,3030363,c2f5fcc2524537d98ac79da451ceb62f1bd3b3640fb1ea726636cbe517b67bff,2021-04-09,Clapham,local-authority-eng:LBH,1968-06-20
CA1,3030363,e1acccbd6a46963b7c34ea51d1255e28d605b35264a7a7d583121de641b54bbf,2021-04-09,Clapham,local-authority-eng:LBH,1968-06-20
COAOOOOO265,,f617d13ef7ff061424ec50ed641f05779797ff03beb2cde6935f2a307c01ab44,2020-09-04,Clapham (COAOOOOO265),local-authority-eng:GLA,
5336,3016206,083a55a37f8bcf36f3b51cbc7a7ea97bb60107478a6470f0c9fa9df13196ca63,2021-09-06,Clapham,government-organisation:PB1164,1968-06-20
5336,3016206,f8aaf696417923bac77e7c2d7fedeff24a9c4be81cf33e4e7a800fc8d70c2c0c,2021-09-23,Clapham,government-organisation:PB1164,1968-06-20
1638,3017466,083a55a37f8bcf36f3b51cbc7a7ea97bb60107478a6470f0c9fa9df13196ca63,2021-09-06,Clapham,government-organisation:PB1164,1993-06-09
1638,3

>>>>> gd2md-html alert: ERRORs: 0; WARNINGs: 0; ALERTS: 3.

  • See top comment block for details on ERRORs and WARNINGs.
  • In the converted Markdown or HTML, search for inline alerts that start with >>>>> gd2md-html alert: for specific instances that need correction.

Links to alert messages:

alert1 alert2 alert3
@psd
psd / nginx
Created October 13, 2012 13:23
query string matching in nginx
map $query_string $new_url {
~a=1 http://www.gov.uk/1;
~a=2 http://www.gov.uk/2;
~a=3&b=1|b=1&a=3 http://www.gov.uk/31;
~\ba=4\b.*\bb=2\b|\bb=2\b.*\ba=4\b http://www.gov.uk/42;
}
server {
server_name lrc.businesslink.gov.uk;
@psd
psd / model.txt
Last active March 18, 2021 19:47
Digital Land View model
// https://dbdiagram.io/d/60536fd6ecb54e10c33c1b72
// > many-to-one; < one-to-many; - one-to-one
// "organisation", "geography", "category", "document", "policy", "rule"
Table typology as T {
typology varchar [pk]
name varchar
}
// "local-authority", "conservation-area", "brownfield-land", etc
@psd
psd / output.txt
Last active March 14, 2021 19:47 — forked from 9600/text.xml
22.3
°C
not found
/(1) EBusRoot/(3) Zusatzmodul/(4) CIRCUIT 1/(119) /(3) 00:01
@psd
psd / index.html
Created June 13, 2012 10:09
iframe thumbnail
<!doctype html>
<html>
<head>
<title>page thumbnails using iframes and CSS3</title>
<meta charset="utf-8">
<style>
.thumbnail {
width: 300px;
height: 160px;
}
@psd
psd / Makefile
Last active August 25, 2020 16:36
Possibly missing shielding hub authorities
missing.txt: missing.py missing.csv organisation.csv local-authority-type.csv local-authority-to-hub.csv
python3 missing.py | tee $@
organisation.csv:
curl -qs 'https://raw.githubusercontent.com/digital-land/organisation-dataset/master/collection/organisation.csv' > $@
local-authority-to-hub.csv:
curl -qs 'https://raw.githubusercontent.com/digital-land/organisation-dataset/master/data/local-authority-to-hub.csv' > $@
local-authority-type.csv:
@psd
psd / typescript.txt
Created April 26, 2020 11:05
Add self-signed certificates by hand to curl
$ HOSTNAME=www.chelmsford.gov.uk
$ openssl s_client -showcerts -servername $HOSTNAME -connect $HOSTNAME:443 > cacert.pem </dev/null
$ curl -Lv --cacert cacert.pem 'https://www.chelmsford.gov.uk/EasySiteWeb/GatewayLink.aspx?alId=1095043' > resource.csv
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 20.39.208.115:443...
* TCP_NODELAY set
@psd
psd / gist:5f72ef0156115b42e74f9c1e2bcd75c4
Created April 24, 2020 07:16
unknown addressbase custodians
2020-04-24 08:10:02,463 WARNING local-authority-eng:BPC: missing addressbase-custodian field
2020-04-24 08:10:02,464 WARNING local-authority-eng:BUC: missing addressbase-custodian field
2020-04-24 08:10:02,466 WARNING local-authority-eng:DST: missing addressbase-custodian field
2020-04-24 08:10:02,466 WARNING local-authority-eng:ESK: missing addressbase-custodian field
2020-04-24 08:10:02,473 WARNING local-authority-eng:SWT: missing addressbase-custodian field
2020-04-24 08:10:02,475 WARNING local-authority-eng:WSK: missing addressbase-custodian field