Open ~/.bash_profile
in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<appender class="ch.qos.logback.core.ConsoleAppender" name="stdout"> | |
<encoder> | |
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %5p [appName:%thread:%X{X-B3-TraceId}:%X{X-B3-SpanId}] %logger{40} - %msg%n | |
</pattern> | |
</encoder> | |
</appender> | |
<appender class="ch.qos.logback.core.ConsoleAppender" name="jsonstdout"> | |
<encoder class="net.logstash.logback.encoder.LogstashEncoder"> |
{ | |
"trigger": { | |
"schedule": { | |
"interval": "1m" //how frequently you want the alert to run | |
} | |
}, | |
"input": { | |
"search": { | |
"request": { | |
"search_type": "query_then_fetch", |
const MongoClient = require('mongodb').MongoClient; | |
let s3Client = require('aws-sdk/clients/s3'); | |
//brute force method loading all the data into an array | |
exports.copyData = async (event, context) => { | |
//this is required for node js mongodb connection pooling | |
context.callbackWaitsForEmptyEventLoop = false; | |
'use strict'; | |
const winston = require('winston'); | |
const MESSAGE = Symbol.for('message'); | |
const jsonFormatter = (logEntry) => { | |
const base = { timestamp: new Date() }; | |
const json = Object.assign(base, logEntry) | |
logEntry[MESSAGE] = JSON.stringify(json); | |
return logEntry; |
version: '3' | |
services: | |
elastic: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.0 | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
environment: | |
- discovery.type=single-node |
{ | |
"format": "graph-model", | |
"generatedBy": "2.3.0", | |
"convertedBy": "TensorFlow.js Converter v2.4.0", | |
"userDefinedMetadata": { | |
"signature": { | |
"inputs": { | |
"input_tensor:0": { | |
"name": "input_tensor:0", | |
"dtype": "DT_UINT8", |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"github.com/fullstorydev/grpcurl" | |
"golang.org/x/net/context" | |
"google.golang.org/grpc" | |
"google.golang.org/grpc/codes" | |
"google.golang.org/grpc/credentials" |
{ | |
"$defs": | |
{ | |
"MapStringToString": | |
{ | |
"type": "object", | |
"additionalProperties": | |
{ | |
"type": "string" | |
} |