Skip to content

Instantly share code, notes, and snippets.

Tom Taylor tomtaylor

Block or report user

Report or block tomtaylor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
View gist:6d51f4a3593ff14e2bf9
Getting Crash Logs Directly From a Device Without Xcode
Your users can retrieve crash reports from their device and send them to you via email by following these instructions.
(It is not possible to get device console logs directly from a device)
1) Open Settings app
2) Go to Privacy, then Diagnostics & Usage
3) Select Diagnostics & Usage Data
View gist:9c687af59100cbaf899a
#0 0x0000000100128288 in mbgl::Painter::render(mbgl::Style const&, mbgl::TransformState, mbgl::FrameData const&) ()
#1 0x000000010010ac2c in mbgl::MapContext::renderSync(mbgl::TransformState const&, mbgl::FrameData const&) ()
#2 0x00000001001063b0 in std::__1::packaged_task<bool ()>::operator()() ()
#3 0x0000000100106304 in mbgl::util::RunLoop::Invoker<std::__1::packaged_task<bool ()>, std::__1::tuple<> >::operator()() ()
#4 0x000000010017832c in mbgl::util::RunLoop::process() ()
#5 0x00000001000b4ecc in uv__async_event at /Users/kkaefer/Code/mason/libuv-1.7.5/mason_packages/.build/libuv-1.7.5/src/unix/async.c:92
#6 0x00000001000b508c in uv__async_io at /Users/kkaefer/Code/mason/libuv-1.7.5/mason_packages/.build/libuv-1.7.5/src/unix/async.c:137
#7 0x00000001000b8c54 in uv__io_poll at /Users/kkaefer/Code/mason/libuv-1.7.5/mason_packages/.build/libuv-1.7.5/src/unix/kqueue.c:247
#8 0x00000001000b543c in uv_run at /Users/kkaefer/Code/mason/libuv-1.7.5/mason_packages/.build/libuv-1.7.5/src/unix/core.c:341
#9 0x000
View ReactiveCocoa.podspec.json
{
"name": "ReactiveCocoa",
"version": "3.0-RC.1",
"summary": "A framework for composing and transforming streams of values",
"description": "ReactiveCocoa (RAC) is an Objective-C framework for Functional Reactive Programming. It provides APIs for composing and transforming streams of values.\n",
"homepage": "https://github.com/ReactiveCocoa/ReactiveCocoa",
"license": "MIT",
"authors": {
"Josh Abernathy": "josh@github.com"
},
@tomtaylor
tomtaylor / Animator.h
Created Aug 2, 2015
MGLMapView Spring Animation
View Animator.h
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol Animation <NSObject>
- (void)animationTick:(CFTimeInterval)dt finished:(BOOL *)finished;
@end
@interface Animator : NSObject
+ (instancetype)animatorWithScreen:(nullable UIScreen *)screen;
You can’t perform that action at this time.