This file contains hidden or 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
FROM gcr.io/distroless/base | |
COPY ./dist/linux/amd64/changeme /changeme | |
ENTRYPOINT ["/changeme"] |
This file contains hidden or 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
#!/bin/bash | |
set -euxo pipefail | |
# Override loaded extensions | |
cat << EOF >> /usr/lib/druid/conf/druid/_common/common.runtime.properties | |
# Override | |
druid.extensions.loadList=["druid-histogram", "druid-datasketches", "druid-lookups-cached-global", "mysql-metadata-storage", "druid-hdfs-storage", "druid-google-extensions"] | |
EOF | |
# Restart |
This file contains hidden or 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
#!/bin/bash | |
set -euxo pipefail | |
# Add router config | |
mkdir -p /usr/lib/druid/conf/druid/router/ | |
cat << EOF > /usr/lib/druid/conf/druid/router/runtime.properties | |
druid.service=druid/router | |
druid.port=8888 | |
druid.processing.numThreads=1 | |
druid.processing.buffer.sizeBytes=1000000 |
This file contains hidden or 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
{ | |
"stage": "train-display-board", | |
"data": { | |
"refresh_rate": 30, | |
"origin": "NCL", | |
"response_time": "2019-12-11", | |
"valid_for": 60, | |
"departures": [ | |
{"departure_time": "14:25", "destination": "Edinburgh Waverley", "platform": "Plat 2", "status": "On time", "calling_at": ["Dunbar"]}, | |
{"departure_time": "14:25", "destination": "Metro Centre", "platform": "Plat 2", "status": "On time", "calling_at": ["Dunbar"]}, |
This file contains hidden or 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
{ | |
"stage": "metrics", | |
"metrics": [ | |
{"value": "7", "label": "Days to go"}, | |
{"value": "2", "label": "Naughty"}, | |
{"value": "312", "label": "Presents"}, | |
{"value": "9", "label": "Reindeer"} | |
] | |
} |
This file contains hidden or 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
package com.github.alexjreid; | |
import com.google.protobuf.Message; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.WebApplicationException; | |
import javax.ws.rs.core.MediaType; | |
import javax.ws.rs.core.MultivaluedMap; | |
import javax.ws.rs.ext.MessageBodyWriter; | |
import javax.ws.rs.ext.Provider; |
This file contains hidden or 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
AWSDynamoDBAttributeValue *dbav = [AWSDynamoDBAttributeValue new]; | |
dbav.S = _userID; | |
update.key = @{@"UserID": dbav}; | |
// can be boiled down to: | |
update.key = @{@"UserID": [AWSDynamoDBAttributeValue withString:_userID]}; | |
/* ----------------- */ |
This file contains hidden or 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
var express = require('express'), | |
simpledb = require('simpledb'), | |
Step = require('step'), | |
sdb = new simpledb.SimpleDB({ | |
keyid: 'your aws key', | |
secret: 'your aws secret' | |
}), | |
app = express.createServer(express.logger()), |