Skip to content

Instantly share code, notes, and snippets.

View missinglink's full-sized avatar

Peter Johnson missinglink

View GitHub Profile
$ cat curl-format.txt
\n
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
@missinglink
missinglink / openvpn
Created November 20, 2015 19:02
setup for openvpn on ubuntu/debian
$ sudo apt-get install resolvconf
@missinglink
missinglink / .Xresources
Created November 17, 2015 17:32
macbook pro linux hidpi retina fix font size
$ cat ~/.Xresources
Xft.dpi: 180
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintslight
@missinglink
missinglink / lazy-infinite-loop-set.js
Last active October 9, 2015 14:07
emca6 infinitely cycle through values in Set using a generator and iterator
"use strict";
// generator to infinitely loop over a set
let infiniteCycleSet = function* ( set ){
let _seq = set.values()
while( true ){
let _cur = _seq.next()
if( _cur.done ){
_seq = set.values()
_cur = _seq.next()
@missinglink
missinglink / gist:6be831c13f3cc40e976d
Created June 16, 2015 11:51
disable annoying npm spinner
npm config set spin false --global
npm config set loglevel http --global
@missinglink
missinglink / i3config
Created May 25, 2015 13:04
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@missinglink
missinglink / pbf-fixture2.md
Created May 4, 2015 19:01
A static OSM pbf fixture for testing purposes

download here: http://peter.johnson.s3.amazonaws.com/vancouver_canada.osm.pbf

A static OSM pbf extract for testing purposes which contains the following data:

$ osmconvert --out-statistics vancouver_canada.osm.pbf
timestamp min: 2007-04-21T20:45:07Z
timestamp max: 2015-05-01T23:43:34Z
lon min: -123.2898637
lon max: -123.0200013
@missinglink
missinglink / london-osm-boundaries.json
Created April 30, 2015 12:09
London OSM Boundaries
This file has been truncated, but you can view the full file.
{
"boundaries" : [ {
"id" : 17529,
"name" : "London Borough of Sutton",
"localname" : "London Borough of Sutton",
"SRID" : "4326",
"admin_level" : 8,
"tags" : {
"name" : "London Borough of Sutton",
"boundary" : "administrative",
@missinglink
missinglink / cat-counts.json
Created April 29, 2015 08:18
Pelias category counts - OSM planet Apr 29 - 2015
{
"took": 344,
"timed_out": false,
"_shards": {
"total": 40,
"successful": 40,
"failed": 0
},
"hits": {
"total": 165113284,
var fs = require('fs');
var path = require('path');
var http = require('http');
var https = require('https');
var app = require('express')();
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var multer = require('multer');
var session = require('express-session');