pushd $THIS_GIST_DIR
test -d data || mkdir data
test -d logs || mkdir logs
logstash --path.settings $THIS_GIST_DIR --path.logs $THIS_GIST_DIR/logs --path.data $THIS_GIST_DIR/data -f $THIS_GIST_DIR/pipeline.config
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
import * as d3 from 'd3'; | |
var config = { | |
width: 640, | |
height: 640, | |
plot: { | |
width: 560, | |
height: 560, | |
} | |
}; |
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
import peg from 'pegjs'; | |
(() => { | |
// Event handler | |
const button = document.getElementById('button-parse'); | |
button.addEventListener('click', (evt) => { | |
const div = document.getElementById('div-output'); | |
try { | |
// Syntax | |
const syntaxInput = document.getElementById('textarea-syntax'); |
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
import peg from 'pegjs'; | |
import pegSrc from './source.pegjs'; | |
(() => { | |
// Event handler | |
const button = document.getElementById('button-parse'); | |
button.addEventListener('click', (evt) => { | |
const div = document.getElementById('div-output'); | |
try { | |
// Input |
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
body { | |
margin-top: 10px; | |
} | |
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
const { createLogger, format, transports } = require('winston'); | |
let test = {}; | |
test.json = (args) => { | |
const logger = createLogger({ | |
format: format.combine( | |
format.timestamp(), | |
format.json() | |
), |
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
const express = require('express'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const morgan = require('morgan'); | |
const morganFormat = (tokens, req, res) => ( | |
JSON.stringify({ | |
'remote-addr': tokens['remote-addr'](req), | |
'remote-user': tokens['remote-user'](req), | |
'date': tokens.date(req, res, 'iso'), |
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
const { createLogger, format, transports } = require('winston'); | |
let test = {}; | |
const myFormat = (info) => ( | |
JSON.stringify(info) | |
); | |
test.custom = (args) => { | |
const logger = createLogger({ |
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
const { createLogger, format, transports } = require('winston'); | |
let test = {}; | |
test.common = (pretty, args) => { | |
const output = (pretty | |
? format.prettyPrint() | |
: format.simple()); | |
const logger = createLogger({ | |
format: format.combine( |
NewerOlder