Skip to content

Instantly share code, notes, and snippets.

View sahas-'s full-sized avatar

Sahas sahas-

  • Chicago, IL
View GitHub Profile
POST quality
{
"mappings": {
"functional":{
"_timestamp": {
"enabled": true,
"store": true
},
"properties": {
"division": {
GET quality/functional
{
"division":"finance",
"product":"payroll",
"application":"portal",
"results":[
{
"environment":"dev",
"name":"User login to the app",
"result":"fail"
POST simpleindex
{
"mappings":{
"games":{
"properties":{
"continents":{
"type":"nested",
"properties":{
"name":{"type":"string"},
"countries":{
GET simpleindex/games
{
"continents": [
{
"name": "South America",
"countries": [
{
"name": "Chili",
"states": [
{
GET simpleindex/games/_search
{
"query": {
"nested": {
"path": "continents",
"query": {
"match": {
"continents.name": "south"
}
}
{
"took": 10,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
var es = require('elasticsearch');
module ejs{
export class Ops{
update(){
let action = {'update': {'_id': 'AVBjrkfgjt6ZxwHlJ1w5'}};
let data = {"doc":{"more data":{"dob":1981,"place":"TN"}}};
let _client = new es.Client({host:"http://192.168.99.111:9200"});
_client.bulk({
index:'elasticsearch',
type:'hack',
--
Recursive: go thru recursion everytime.
class test{
fib(n: number){
if (n<= 2) return 1;
return this.fib(n-1) + this.fib(n-2);
}
}
var f = new test()
// Overwrite settings by placing them into your settings file.
{
//-------- Editor configuration --------
// Controls the font family.
"editor.fontFamily": "",
// Controls the font size.
"editor.fontSize": 0,
BRIDGE_NET = "192.168.1."
INTERNAL_NET="192.168.100."
DOMAIN ="test.com"
RAM=524
CPU=1
servers=[
{
:hostname => "app1." + DOMAIN,
:box => "ubuntu/trusty64",
:ip => INTERNAL_NET + "10",