Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Krishna Sagar R solo474

🏠
Working from home
View GitHub Profile
View prometheus
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_timeout: 10s
rule_files:
# - "first.rules"
# - "second.rules"
scrape_configs:
View prometheus
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_timeout: 10s
rule_files:
# - "first.rules"
# - "second.rules"
scrape_configs:
View prometheus
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_timeout: 10s
rule_files:
# - "first.rules"
# - "second.rules"
scrape_configs:
@solo474
solo474 / express-object.js
Last active Dec 8, 2016
JavaScript function for evolution object properties with '.' notation expression
View express-object.js
var expressObject = function(object,string){
return string.split('.').reduce(function(a,b){
return a[b];
},object);
};
View flatten-function.js
var flatten = function(array) {
return array.reduce(function(a,b) {
return a.concat(Array.isArray(b)
? flatten(b)
: [b] );
},[]);
};
You can’t perform that action at this time.