Skip to content

Instantly share code, notes, and snippets.

View bennybauer's full-sized avatar

Benny Bauer bennybauer

View GitHub Profile
@bennybauer
bennybauer / Weekly totals per event
Last active November 19, 2017 08:53
Azure Application Insights query to fetch weekly totals of all custom events
customEvents
| where timestamp between (startofweek(ago(14d))..now())
| make-series dcount(user_Id) on timestamp in range(startofweek(now()),endofweek(now()), 7d) by name
| mvexpand timestamp, dcount_user_Id
| extend Week = weekofyear(todatetime(timestamp))
| project Week, timestamp, name, toint(dcount_user_Id)
| summarize sum(dcount_user_Id) by name, Week, tostring(timestamp)
| order by Week desc, sum_dcount_user_Id desc
| evaluate pivot(name, sum(sum_dcount_user_Id))
@bennybauer
bennybauer / Running Hystrix dashboard locally.MD
Last active January 23, 2017 12:38
Running Hystrix dashboard locally with sample project

Clone Hystrix:

git clone https://github.com/Netflix/Hystrix.git

Run the sample webapp:

cd Hystrix/hystrix-examples-webapp
../gradlew appRun
@bennybauer
bennybauer / build.gradle
Last active September 15, 2016 21:15 — forked from ran488/build.gradle
Running Fortify from Gradle build. These are the snippets of code you can add to your build.gradle to run the analyzer and spit out a Fortify *.fpr file. Fortify is not F/OSS, so you (your company) will need a license, so the dependencies won't be out in public repo's. You will have to add it to your company's private repo (e.g. Artifactory).
// Fortify configuration
configurations {
fortify { extendsFrom compile }
}
// pull in the fortify libs for the new configuration
dependencies {
fortify 'com.fortify:sourceanalyzer:3.90'
}