Skip to content

Instantly share code, notes, and snippets.

View walterra's full-sized avatar
💭
Refactor Refactor Refactor!

Walter Rafelsberger walterra

💭
Refactor Refactor Refactor!
View GitHub Profile
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>vega-brush-info</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
@walterra
walterra / landeck.json
Last active March 27, 2020 00:43
landeck.json
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"background": "white",
"padding": 5,
"data": [
{
"name": "data-b7a0909663af312f9c279ddca350c314",
"values": [
{"date": "2018-11-21T00:00:00", "location": "Strengen", "count": 1},
{"date": "2018-11-27T00:00:00", "location": "Ischgl", "count": 1},

How to install Elasticsearch & Kibana on Windows

Elasticsearch

@walterra
walterra / gist:c6397055405a80b9e8ae3431d0161d4b
Created August 2, 2019 10:24
flare.json as Kibana Dev Console bulk index
POST _bulk
{ "index" : { "_index" : "flare" } }
{ "id": 1, "name": "flare" }
{ "index" : { "_index" : "flare" } }
{ "id": 2, "name": "analytics", "parent": 1 }
{ "index" : { "_index" : "flare" } }
{ "id": 3, "name": "cluster", "parent": 2 }
{ "index" : { "_index" : "flare" } }
{ "id": 4, "name": "AgglomerativeCluster", "parent": 3, "size": 3938 }
{ "index" : { "_index" : "flare" } }
{
"trigger": {
"schedule": {
"interval": "5s"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
@walterra
walterra / anomaly-explorer-event-graph.dot
Created January 24, 2019 10:14
Anomaly Explorer Event Graph
digraph G {
graph [fontname = "helvetica" pad=".5"];
node [fontname = "helvetica" shape="underline"]
edge [fontname = "helvetica" color="grey"];
"explorer_controller.js" -> "$scope" -> "$scope.appState"
"$scope.appState" -> "ACTION.INITIALIZE"
"timerangeListener" -> "ACTION.RELOAD"
@walterra
walterra / typescript_interface.md
Last active November 22, 2018 18:05
TypeScript Interfaces

TypeScript Interface

While working on annnotations, I thought about how TypeScript Interfaces could be valuable for validating js objects like an annotation itself.

TS's Interface can be thought of in analogy to PropTypes, but Interfaces can be applied everywhere, they don't work during run- but compile-time and are tightly integrated with VSCode's TS features.

So looking at the spec of the annotation format here, an Interface for an annotation can look like this:

export interface Annotation {
@walterra
walterra / benchmark.js
Created October 4, 2018 07:48
JavaScript Benchmarking Utility
export const benchmarker = {
benchmarks: [],
getAverage() {
return this.benchmarks.reduce((p, c) => p + c, 0) / this.benchmarks.length;
},
start() {
return (+new Date());
},
end(start) {
this.benchmarks.push((+new Date()) - start);
@walterra
walterra / .block
Last active January 3, 2018 16:32
Quentin Tarantino Movie Timeline
license: Apache-2.0
border: no
height: 200