Skip to content

Instantly share code, notes, and snippets.

AWSEBCWLGreetingMeanMetricFilter :
Type : "AWS::Logs::MetricFilter"
Properties :
LogGroupName: { "Ref" : "AWSEBCloudWatchLogsAppLogGroup" }
FilterPattern : '{ $.perf4j_tag = "greeting.GET"}'
MetricTransformations :
- MetricValue : $.perf4j_mean
MetricNamespace: {"Fn::Join":["/", ["elastic-beanstalk", {"Ref":"AWSEBEnvironmentName"}]]}
MetricName : greeting-mean
@monkey-codes
monkey-codes / rxjs-pull-vs-push.js
Created November 22, 2016 00:24
rxjs - Example of Pull vs Push
//Traditional imperative pull based
window.setInterval(() => {
const tweets = getNewTweets();
for(let tweet of tweets){
if(!tweet.message.contains("Greetings!")) continue;
getUserAvatar(tweet.user)
.then(avatar => {
const $avatar = $(`<img />`);
$avatar.attr('src', avatar.url);
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
"id": null,
"links": [],
@monkey-codes
monkey-codes / gist:d2908935000c754c6b87aeecb176b069
Created August 8, 2016 04:39
Gradle dependencies to setup logstash logback
dependencies {
ext {
logbackVersion = '1.1.6'
slf4jApiVersion = '1.7.15'
logStashLogbackEncoderVersion = '4.7'
}
...
compile("ch.qos.logback:logback-classic:$logbackVersion")
compile("ch.qos.logback:logback-core:$logbackVersion")
compile("ch.qos.logback:logback-access:$logbackVersion")