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 / es-on-aws.md
Last active August 29, 2015 14:21
Elasticsearch on AWS

Here are 3 resources about running Elasticsearch on AWS. I recommend going through them in order:

  1. Webinar (by Elastic employees) about running Elasticsearch on AWS: https://vimeo.com/elasticsearch/review/110218622/a1c28e84cc. Its a bit long (~1 hour) but I'd start here.

  2. These two blog posts cover setting up the AWS environment, then installing and configuring Elasticsearch on it:

  1. And this is a deeper technical dive into various configuration settings - primarily to do with HA and security - that might be useful when setting up Elasticsearch on AWS: http://www.slideshare.net/bobeirasa/es-on-aws-rafael-lopes-2nd-meetup-elasticsearch-brasil
[2015-09-15 19:37:33,194][INFO ][org.elasticsearch.node ] [Agatha Harkness] version[2.0.0-beta2], pid[7097], build[91726c3/2015-09-14T14:58:02Z]
[2015-09-15 19:37:33,194][INFO ][org.elasticsearch.node ] [Agatha Harkness] initializing ...
[2015-09-15 19:37:33,679][INFO ][org.elasticsearch.plugins] [Agatha Harkness] loaded [cloud-gce], sites []
[2015-09-15 19:37:33,724][INFO ][org.elasticsearch.env ] [Agatha Harkness] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [8.1gb], net total_space [9.7gb], spins? [unknown], types [rootfs]
[2015-09-15 19:37:35,465][DEBUG][org.elasticsearch.discovery.zen.elect] [Agatha Harkness] using minimum_master_nodes [-1]
[2015-09-15 19:37:35,466][DEBUG][org.elasticsearch.discovery.gce] [Agatha Harkness] using tags []
[2015-09-15 19:37:35,469][DEBUG][org.elasticsearch.discovery.zen.ping.unicast] [Agatha Harkness] using initial hosts [127.0.0.1], with concurrent_connects [10]
[2015-09-15 19:37:35,477][DEBUG][org.elasticsearch.discovery.gce] [Agatha Harkness] usin
@ycombinator
ycombinator / gpg-agent-with-git-on-mac.md
Last active April 5, 2016 19:24
Setting up gpg-agent with git on Mac
  1. Install gpg-agent
$ brew install gpg-agent
  1. You'll want to start gpg-agent each time a shell is opened. Add the following lines to your ~/.profile or equivalent:
GPG_TTY=$(tty)
export GPG_TTY
eval $(gpg-agent --daemon --allow-preset-passphrase)
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)
06:46:59.958: tryForTime failure: expected [ 'GET _search',
'{',
' "query": {',
' "match_all": {}',
' }',
'' ] to sort of equal [ 'GET _search',
'{',
' "query": {',
' "match_all": {}',
' }',
@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
<!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),
<!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>
<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.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