Skip to content

Instantly share code, notes, and snippets.

View dominijk's full-sized avatar

Dominic Humphrey dominijk

View GitHub Profile
@dominijk
dominijk / brew-install-script.sh
Created October 4, 2023 13:34 — forked from CliffordAnderson/brew-install-script.sh
Brew script for installing packages and applications on OSX
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing brew cask..."
brew tap homebrew/cask
@dominijk
dominijk / dev-setup.sh
Created October 4, 2023 13:33 — forked from lmarti17/dev-setup.sh
A shell script to install all apps / packages I usually use for working as an Interactive developer (not tested for now though)
#!/usr/bin/env bash
# Install command-line tools using Homebrew.
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@dominijk
dominijk / ral_standard.csv
Created April 5, 2023 08:09 — forked from lunohodov/ral_classic.csv
RAL Standard Color Table (CSV)
RAL RGB HEX German English French Spanish Italian Nederlands
RAL 1000 190-189-127 #BEBD7F Grünbeige Green beige Beige vert Beige verdoso Beige verdastro Groenbeige
RAL 1001 194-176-120 #C2B078 Beige Beige Beige Beige Beige Beige
RAL 1002 198-166-100 #C6A664 Sandgelb Sand yellow Jaune sable Amarillo arena Giallo sabbia Zandgeel
RAL 1003 229-190-001 #E5BE01 Signalgelb Signal yellow Jaune de sécurité Amarillo señales Giallo segnale Signaalgeel
RAL 1004 205-164-052 #CDA434 Goldgelb Golden yellow Jaune or Amarillo oro Giallo oro Goudgeel
RAL 1005 169-131-007 #A98307 Honiggelb Honey yellow Jaune miel Amarillo miel Giallo miele Honinggeel
RAL 1006 228-160-016 #E4A010 Maisgelb Maize yellow Jaune maïs Amarillo maiz Giallo polenta Maisgeel
RAL 1007 220-156-000 #DC9D00 Narzissengelb Daffodil yellow Jaune narcisse Amarillo narciso Giallo narciso Narcissengeel
RAL 1011 138-102-066 #8A6642 Braunbeige Brown beige Beige brun Beige pardo Beige marrone Bruinbeige
@dominijk
dominijk / xml_split.py
Created June 1, 2021 07:05 — forked from scnctech/xml_split.py
I took this gist https://gist.github.com/benallard/8042835 and modified it a little so it worked for my needs. (mainly encoding issues and bigger file chunks)
#!/usr/bin/env python
#based off this gist https://gist.github.com/benallard/8042835
#modified it a little so it worked for my needs. (mainly encoding issues and bigger file chunks)
import os
import xml.parsers.expat
from xml.sax.saxutils import escape
from optparse import OptionParser
from math import log10
@dominijk
dominijk / la_ecodes.csv
Created November 1, 2020 12:24 — forked from drkane/la_ecodes.csv
CSV list of official UK ONS geography administrative codes mapped to DCLG "ecodes" for England
LAcode geog_LA Ecode
E06000001 Hartlepool E0701
E06000002 Middlesbrough E0702
E06000003 Redcar and Cleveland E0703
E06000004 Stockton-on-Tees E0704
E06000005 Darlington E1301
E06000006 Halton E0601
E06000007 Warrington E0602
E06000008 Blackburn with Darwen E2301
E06000009 Blackpool E2302
@dominijk
dominijk / la_ecodes.csv
Created November 1, 2020 12:24 — forked from drkane/la_ecodes.csv
CSV list of official UK ONS geography administrative codes mapped to DCLG "ecodes" for England
E06000001 Hartlepool E0701
E06000002 Middlesbrough E0702
E06000003 Redcar and Cleveland E0703
E06000004 Stockton-on-Tees E0704
E06000005 Darlington E1301
E06000006 Halton E0601
E06000007 Warrington E0602
E06000008 Blackburn with Darwen E2301
E06000009 Blackpool E2302
@dominijk
dominijk / readme.md
Last active October 25, 2019 08:45
ETL Ordnance Survey AddressBase Plus to Postgresql on a mac

Addressbase plus data loading to postgres on mac

The instructions in the official getting started are tailored to Windows and AddressBase premium. This is a simple guide for those working on mac using Addressbase Plus.

You should received a zip file with the following folder structure when unzipped;

ABFLGB_CSV
|
+-- data
|   |-- AddressBasePlus_FULL_2018-03-19_001.csv
@dominijk
dominijk / geoserver
Created October 17, 2019 13:36
AWS EC2 Initd for Geoserver 2.15.2
#!/bin/sh
### BEGIN INIT INFO
# Provides: GeoServer
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Starts and stops the GeoServer, which should be located at /usr/share/geoserver
### END INIT INFO

Getting Started With Superset: Airbnb’s data exploration platform

Update Python and PIP versions on EC2 (Amazon AMI)

At the time of writing, Python v3.6 and PIP v19.0.3 were available on AWS EC2.

sudo yum update -y
sudo yum install python36 -y
@dominijk
dominijk / Doogal postcode to sql.sql
Last active June 12, 2020 10:24
SQL for taking doogals excellent postcodes into SQL
--Head to doogal and get the data you need
--https://www.doogal.co.uk/PostcodeDownloads.php
--then create the table as below, metadata as
--https://www.doogal.co.uk/PostcodeCsvFields.php
CREATE TABLE doogal_data.postcodes (
postcode character varying(8) PRIMARY KEY,
in_use character varying(3),
latitude numeric(9,6),
longitude numeric(9,6),