Skip to content

Instantly share code, notes, and snippets.

View aditikhandalkar's full-sized avatar

Aditi Khandalkar aditikhandalkar

  • Bangalore, India
View GitHub Profile
@pramodmg
pramodmg / simple.js
Created December 5, 2017 06:44
Replacing an array with an index values of the String
// es6 syntax
var arr = ["a","b","c"];
var str = "Hello {1} is a friend of {2} and {3}";
var result_es6 = arr.reduce((str_data, replacement, idx) => {
return str_data.replace(`{${idx + 1}}`, replacement)
}, str);
console.log(result_es6); // "Hello a is a friend of b and c"
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active March 16, 2025 22:37
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@karussell
karussell / Query-DSL-elasticsearch.txt
Last active May 7, 2020 10:25
Bird's Eye View on ElasticSearch its Query DSL
Several times in a month there pop up questions regarding query structure on the ElasticSearch user group.
Although there are good docs explaining this in depth probably the bird view of the Query DSL is necessary to
understand what is written there. There is even already some good external documentation available:
http://www.elasticsearch.org/tutorials/2011/08/28/query-dsl-explained.html
And there were attempts to define a schema:
http://groups.google.com/group/json-schema/browse_thread/thread/ae498ee818155d50
https://gist.github.com/8887766ca0e7052814b0