Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom Taylor tomtaylor

View GitHub Profile
View cypress.log
cypress_runner.js:197680 Console was cleared
cypress_runner.js:197677 TypeError: The following error originated from your application code, not from Cypress.
> Cannot read property 'getDescendentByEl' of undefined
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the `uncaught:exception` event.
at LiveSocket.getViewByEl (webpack://phoenix_live_view/./js/phoenix_live_view.js?./node_modules/babel-loader/lib:908:38)
at eval (webpack://phoenix_live_view/./js/phoenix_live_view.js?./node_modules/babel-loader/lib:882:23)
View pelias.json
{
"logger": {
"level": "debug",
"timestamp": false
},
"esclient": {
"apiVersion": "7.5",
"hosts": [{ "host": "elasticsearch" }]
},
"elasticsearch": {
@tomtaylor
tomtaylor / pelias.json
Created May 6, 2020
Debugging Pelias import
View pelias.json
{
"logger": {
"level": "debug",
"timestamp": false
},
"esclient": {
"apiVersion": "7.5",
"hosts": [{ "host": "elasticsearch" }]
},
"elasticsearch": {
@tomtaylor
tomtaylor / refresh.js
Created Apr 23, 2020
Google Sheets macro to refresh all the data source sheets in the current file
View refresh.js
/** @OnlyCurrentDoc */
function RefreshData() {
var spreadsheet = SpreadsheetApp.getActive();
SpreadsheetApp.enableAllDataSourcesExecution();
spreadsheet.getDataSourceTables().forEach(function(dataSourceTable) { dataSourceTable.refreshData() });
};
View 437369083.diff
commit 96efd048f3e30dbff39ace91a9b936acfafd46b4 (HEAD -> sync-against-ons-postcode-directory, tomtaylor/sync-against-ons-postcode-directory, master)
Author: Tom Taylor <tom@tomtaylor.co.uk>
Date: Tue Aug 20 08:54:05 2019 +0000
Sync with May 2019 ONS Postcode Directory
diff --git a/data/437/369/083/437369083.geojson b/data/437/369/083/437369083.geojson
index 3e7c98891a383..f753fd67f88dd 100644
--- a/data/437/369/083/437369083.geojson
+++ b/data/437/369/083/437369083.geojson
@tomtaylor
tomtaylor / plug_canonical_domain.ex
Last active Jan 17, 2019
Redirect requests to the host of the url defined in your endpoint. Expects an upstream proxy to have set X-Forwarded-Proto and X-Forwarded-Port.
View plug_canonical_domain.ex
defmodule PoplarWeb.PlugCanonicalDomain do
import Plug.Conn
import Phoenix.Controller
alias Plug.Conn
def init(opts), do: opts
def call(conn, _opts) do
endpoint_url = endpoint_url_struct()
conn_url = conn_url_struct(conn)
@tomtaylor
tomtaylor / run.sh
Created Jan 12, 2019
Convert a video frame into a dithered bmp for display on an e-Paper screen
View run.sh
# Install ffmpeg, imagemagick
ffmpeg -ss 00:01:00.00 -i input.avi -frames 1 -vf "scale=640:384:force_original_aspect_ratio=decrease,pad=640:384:(ow-iw)/2:(oh-ih)/2" -vcodec png -f image2pipe pipe:1 | convert -colorspace Rec709Luma -dither FloydSteinberg -remap pattern:gray50 - bmp:- | cat > image.bmp
View spec.json
{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"width": 500,
"height": 250,
"padding": 5,
"data": [
{
"name": "table",
"format": {
View companies.txt
MOROWS PROPERTY NAIR LLP
TRADINTRY KEEPS COMPANY LIMITED
DR MAJOWSICK BROKERS LTD
FRESHLAND MANAGEMENT BUILDINGS HOLDING INSURANCE AND CONSULTANCY LIMITED
GOOD NETSPORTS LIMITED
YABEGIE
ASHCOCK SOLUTIONS GROUP LIMITED
TYRESKY LAW SPECIALISTS LTD
CLAYD CMISION LIMITED
LAVINGWANE PROPERTY MANAGEMENT LIMITED
@tomtaylor
tomtaylor / names.txt
Last active Apr 28, 2017
English village names generated by Tensorflow
View names.txt
Allers Bottom
Culack
Swrarby
Fenwall St Eastake
Anbarth
St Ninhope
Thawkanham Water Green
Mige Lane
Up Maling
Firley Dinch
You can’t perform that action at this time.