$ pip install click requests
$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
apiVersion: v1 | |
kind : Service | |
metadata: | |
name: prometheus-svc | |
labels: | |
name: prometheus-svc | |
kubernetes.io/name: "Prometheus" | |
spec: | |
selector: | |
app: prometheus |
FROM golang:1.8-alpine as builder | |
RUN apk update && apk upgrade && \ | |
apk add --no-cache git | |
RUN go get -u sourcegraph.com/sourcegraph/appdash/cmd/... | |
FROM alpine:3.5 | |
RUN apk --no-cache add ca-certificates | |
WORKDIR / |
apiVersion: v1 | |
kind : Service | |
metadata: | |
name: nginx | |
labels: | |
name: nginx-svc | |
kubernetes.io/name: "Nginx" | |
spec: | |
selector: | |
app: nginx |
#!/usr/bin/env bash | |
# gcloud config set project {PROJECTID} | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
HOSTNAME=asia.gcr.io | |
PROJECTID=${GCP_PROJECT} | |
IMAGE=${IMAGE_NAME} | |
TAG=`git rev-parse --short=7 HEAD` | |
cd "${DIR}/.." |
function handleImage(message, replyToken) { | |
axios.get(`https://api-data.line.me/v2/bot/message/${message.id}/content`, { | |
headers: { | |
'Authorization': `Bearer ${process.env.CHANNEL_ACCESS_TOKEN}` | |
}, responseType: 'stream' | |
}).then((res) => { | |
const tmp = tempfile(); | |
const writer = fs.createWriteStream(tmp); | |
res.data.pipe(writer); | |
writer.on('finish', () => { |