This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST quality | |
{ | |
"mappings": { | |
"functional":{ | |
"_timestamp": { | |
"enabled": true, | |
"store": true | |
}, | |
"properties": { | |
"division": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET quality/functional | |
{ | |
"division":"finance", | |
"product":"payroll", | |
"application":"portal", | |
"results":[ | |
{ | |
"environment":"dev", | |
"name":"User login to the app", | |
"result":"fail" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST simpleindex | |
{ | |
"mappings":{ | |
"games":{ | |
"properties":{ | |
"continents":{ | |
"type":"nested", | |
"properties":{ | |
"name":{"type":"string"}, | |
"countries":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET simpleindex/games | |
{ | |
"continents": [ | |
{ | |
"name": "South America", | |
"countries": [ | |
{ | |
"name": "Chili", | |
"states": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET simpleindex/games/_search | |
{ | |
"query": { | |
"nested": { | |
"path": "continents", | |
"query": { | |
"match": { | |
"continents.name": "south" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"took": 10, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Overwrite settings by placing them into your settings file. | |
{ | |
//-------- Editor configuration -------- | |
// Controls the font family. | |
"editor.fontFamily": "", | |
// Controls the font size. | |
"editor.fontSize": 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
OlderNewer