Skip to content

Instantly share code, notes, and snippets.

View missinglink's full-sized avatar

Peter Johnson missinglink

View GitHub Profile
@missinglink
missinglink / query.json
Last active August 29, 2015 14:17
pelias category query
GET /pelias/_search
{
"query": {
"filtered": {
"query": {
"multi_match": {
"query": "good",
"fields": "name.*"
}
},
[
{
"id": "4d4b7104d754a06370d81259",
"name": "Arts & Entertainment",
"pluralName": "Arts & Entertainment",
"shortName": "Arts & Entertainment",
"icon": {
"prefix": "https://ss3.4sqi.net/img/categories_v2/arts_entertainment/default_",
"suffix": ".png"
},
@missinglink
missinglink / london-neighborhoods.txt
Last active August 29, 2015 14:16
London Neighborhoods
Abbey Wood
Acton
Acton Green
Addington
Addiscombe
Aldersbook
Aldgate
Alperton
Anerley
Angel
@missinglink
missinglink / go-ubuntu-install.md
Last active April 9, 2025 20:47
Install go on ubuntu

note: always check for the latest versions, the version numbers shown here will fall out of date quickly.

Installing Go on Ubuntu:

Step 1. Grab yourself a binary release from here: https://golang.org/dl/

You'll want to use one from the Stable versions, you probably want one which is in bold, for Ubuntu it's xxx-linux-amd64.tar.gz

wget https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz;
@missinglink
missinglink / gis-pre-indexed.sh
Created January 6, 2015 15:03
Pre-indexed shapes using geo_shape filter (working)
#!/bin/bash
################################################
# Pre-indexed shapes using geo_shape filter
################################################
ES='localhost:9200';
# Remove old data
curl -XDELETE "$ES/shapes?pretty=true";
#!/bin/bash
################################################
# https://groups.google.com/forum/#!msg/elasticsearch/AqVrhQ7UiG8/3FlF9droCqMJ
################################################
ES='localhost:9200';
# drop index
curl -XDELETE "$ES/foo?pretty=true" 2>/dev/null;
@missinglink
missinglink / curl-timing.sh
Created December 17, 2014 10:37
Measuring response times for a curl request
#!/bin/bash
echo "\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
@missinglink
missinglink / lookup.url
Created December 12, 2014 14:38
GEO IP
http://bits.wikimedia.org/geoiplookup
@missinglink
missinglink / aggregations.sh
Created December 1, 2014 09:53
aggregate per-region index statistics for pelias.
#!/bin/bash
curl -s -X POST "localhost:9200/pelias/_search?pretty=true&search_type=count" -d '
{
"size": 0,
"aggs": {
"group_by_a3": {
"terms": {
"field": "alpha3"
},

npm publish actually zips up your module directory and sends the zip to be stored on the npm servers. if you have passwords and large files in your working directory they may be included in the zip unless you add them to a .npmignore (if an .npmignore is not present it will check .gitignore instead)

on github:

  • merge PR to master

locally:

  • switch to master branch important
  • pull origin master locally important