Skip to content

Instantly share code, notes, and snippets.

@maxlang
maxlang / README.md
Last active July 5, 2018 20:14 — forked from ramiroaznar/README.md
Leaflet's flyTo method

Click on a location and the flyTo method will zoom and pan to that particular place.

html {
color:red;
}
@maxlang
maxlang / index.html
Last active December 24, 2015 00:59 — forked from mbostock/.block
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
</head>
<body>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.6.0"></script>
<script type="text/javascript">
var svg = d3.select("body").append("svg")
@maxlang
maxlang / index.html
Last active December 23, 2015 21:39
Dataviz test
<!-- index.html -->
<div>TEST</div>
curl 'http://localhost:9200/test_props/' --data '{"mappings":{"test_mapping_exception":{"dynamic_templates":[{"template_s":{"path_match":"properties.*","path_unmatch":"properties.*.*","match_mapping_type":"string","mapping":{"type":"multi_field","fields":{"{name}":{"type":"string","index":"not_analyzed"},"s":{"type":"string"},"l":{"type":"long","ignore_malformed":"true"},"d":{"type":"double","ignore_malformed":"true"}}}}},{"template_d":{"path_match":"properties.*","path_unmatch":"properties.*.*","match_mapping_type":"double","mapping":{"type":"multi_field","fields":{"{name}":{"type":"string","index":"not_analyzed"},"s":{"type":"string"},"l":{"type":"long","ignore_malformed":"true"},"d":{"type":"double","ignore_malformed":"true"}}}}},{"template_l":{"path_match":"properties.*","path_unmatch":"properties.*.*","match_mapping_type":"long","mapping":{"type":"multi_field","fields":{"{name}":{"type":"string","index":"not_analyzed"},"s":{"type":"string"},"l":{"type":"long","ignore_malformed":"true"},"d":{"type":"doubl
@maxlang
maxlang / gist:6274253
Created August 19, 2013 21:12
overflow exception
curl 'http://localhost:9200/test_index_overflow/' --data '{"mappings":{"test_mapping_overflow":{"dynamic_templates":[{"templates":{"match":"*","match_mapping_type":"string","mapping":{"type":"multi_field","fields":{"{name}":{"type":"string","index":"analyzed"},"s":{"type":"string"},"l":{"type":"long","ignore_malformed":"true"},"d":{"type":"double","ignore_malformed":"true"},"o":{"type":"object"}}}}},{"templated":{"match":"*","match_mapping_type":"double","mapping":{"type":"multi_field","fields":{"{name}":{"type":"string","index":"analyzed"},"s":{"type":"string"},"l":{"type":"long","ignore_malformed":"true"},"d":{"type":"double","ignore_malformed":"true"},"o":{"type":"object"}}}}},{"templatel":{"match":"*","match_mapping_type":"long","mapping":{"type":"multi_field","fields":{"{name}":{"type":"string","index":"analyzed"},"s":{"type":"string"},"l":{"type":"long","ignore_malformed":"true"},"d":{"type":"double","ignore_malformed":"true"},"o":{"type":"object"}}}}}]}}}'
curl 'http://localhost:9200/test_index_overfl
@maxlang
maxlang / gist:6273646
Created August 19, 2013 20:23
Example int/object failed document adding
curl 'http://localhost:9200/text_index/test_type' -X POST --data '{"a":1}'
curl 'http://localhost:9200/text_index/test_type' -X POST --data '{"a":{"z":1}}'