Skip to content

Instantly share code, notes, and snippets.

View ycombinator's full-sized avatar

Shaunak Kashyap ycombinator

  • Elastic
  • San Jose, CA
View GitHub Profile
@ycombinator
ycombinator / gist:31d2af4b335c8d140d21e617b8dc419d
Last active June 16, 2017 13:30
pipeline events throughput across hosts
DELETE i
PUT i
{
"mappings": {
"t": {
"properties": {
"logstash_stats": {
"type": "object",
"properties": {
"logstash": {
diff --git a/gulpfile.js b/gulpfile.js
index e4c4981..5932c25 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -5,7 +5,7 @@ const gulp = require('gulp');
const g = require('gulp-load-plugins')();
const path = require('path');
const del = require('del');
-const isparta = require('isparta');
+// const isparta = require('isparta');

Install the murmur3 plugin

./bin/elasticsearch-plugin install mapper-murmur3

Add a new field with a multi-field using the murmur3 type

PUT foo/_mapping/bar
{
  "properties": {
<!DOCTYPE html>
<html>
<head>
<script src='https://api.mapbox.com/mapbox.js/v2.4.0/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v2.4.0/mapbox.css' rel='stylesheet' />
</head>
<body>
<div id='map' style='width: 400px; height: 300px;'></div>
<script>
// L is Leaflet
<!DOCTYPE html>
<html>
<head>
<script src="https://res.mapjam.com/lib/0.9/mapjam.js"></script>
<link href="https://res.mapjam.com/lib/0.9/mapjam.css" rel="stylesheet" />
<script src="https://res.mapjam.com/lib/0.9/mapjam-resources-L0.js"></script>
<link href="https://res.mapjam.com/lib/0.9/mapjam-resources-L0.css" rel="stylesheet" />
<script>
window.onload = function() {
var ACCESS_TOKEN = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI1Nzg0ZmI2ODcxNWUxMjM0MDBiNzEyYjIiLCJpc3MiOiJtYXBqYW0uY29tIn0.4ngOdDmJymLZOJnZhLWp3ayvtOg9yp3h3i5W8Ld3JEE';
<!DOCTYPE html>
<html>
<head>
<script src='https://api.mapbox.com/mapbox-gl-js/v0.20.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v0.20.1/mapbox-gl.css' rel='stylesheet' />
</head>
<body>
<div id='map' style='width: 400px; height: 300px;'></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoieWNvbWJpbmF0b3I4MSIsImEiOiJjaXFqaDIxa2gwYTloZnJtMTR0cjE3dGFuIn0.9ZLKlLIK00qCDB61_ir-pQ';
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<script lang="javascript" src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<script lang="javascript">
window.onload = function() {
// initialize the map on the "map" div with a given center and zoom
var map = new L.Map('map', {
center: new L.LatLng(51.46, -0.205),
@ycombinator
ycombinator / bulk_request_body.txt
Last active June 22, 2016 20:07
Hands-on Elasticsearch Workshop for php[tek] - bulk API request body
{"index": {"_id": "7192265"}}
{"sku": "7192265", "name": "Skullcandy - Hesh 2 Wireless Over-the-Ear Headphones - Blue/Black", "description": "Wirelessly enjoy rich, powerful audio with these Skullcandy Hesh 2 S6HBHW-515 over-the-ear headphones, which easily pair with most Bluetooth-enabled devices. A detachable 4' cable lets you enjoy your music while the battery recharges.", "price": 99.99, "sale_price": 49.99, "qty_in_stock": 69, "brand": "Skullcandy", "color": [ "blue", "black" ]}
{"index": {"_id": "7902883"}}
{"sku": "7902883", "name": "Bose® - SoundLink® Color Bluetooth Speaker - Black", "description": "Enjoy clear, full-range sound you might not expect from a compact speaker. This small, durable and simple-to-use Bose® SoundLink® Color Bluetooth speaker has voice prompts to ensure simplified Bluetooth pairing, letting you easily connect to devices.", "price": 129.99, "sale_price": 116.99, "qty_in_stock": 134, "brand": "Bose", "color": "black"}
{"index": {"_id": "5838295"}}
{"sku": "5838295", "name": "Io
06:46:59.958: tryForTime failure: expected [ 'GET _search',
'{',
' "query": {',
' "match_all": {}',
' }',
'' ] to sort of equal [ 'GET _search',
'{',
' "query": {',
' "match_all": {}',
' }',
Running "intern:dev" (intern) task
/Users/shaunak/development/github/ycombinator/kibana/node_modules/intern/node_modules/dojo/loader.js:490
throw new Error('Failed to load module ' + module.mid + ' from ' + url + (parent ? ' (parent: ' + parent.mid + ')' : ''));
^
Error: Failed to load module intern/lib/executors/PreExecutor from /Users/shaunak/development/github/ycombinator/kibana/node_modules/intern/lib/executors/PreExecutor.js (parent: intern/runner)
at ReadFileContext.callback (/Users/shaunak/development/github/ycombinator/kibana/node_modules/intern/node_modules/dojo/loader.js:490:27)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:303:13)