Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
FROM node:8.9.4-alpine | |
RUN apk add --no-cache git | |
RUN npm install -g yo generator-hubot | |
RUN adduser -D hubot | |
USER hubot | |
WORKDIR /home/hubot | |
RUN yo hubot --owner="Tim <timothy@fireflies.ai>" --name="hubot" --description="Hubot for slack" --adapter="slack" --defaults | |
RUN npm install --save hubot-slack | |
RUN npm install --save hubot-google-images | |
RUN npm install --save hubot-google-translate |
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
confirmations: | |
required: 4 # choose the number of confirmations you require | |
policyengine.simple: | |
fixedGasPrice: null | |
gasOracle: | |
mode: connector |
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
steps: | |
# build and push container | |
- name: "gcr.io/kaniko-project/executor:latest" | |
args: ["--cache=true", "--cache-ttl=48h", "--destination=gcr.io/$PROJECT_ID/$REPO_NAME:$BRANCH_NAME"] | |
# deploy container image to Cloud Run with env vars | |
- name: "gcr.io/cloud-builders/gcloud" | |
args: ['run', 'deploy', '$REPO_NAME', '--image', 'gcr.io/$PROJECT_ID/$REPO_NAME:$BRANCH_NAME', '--region', 'europe-west4', '--allow-unauthenticated', '--platform', 'managed', '--update-env-vars', 'NODE_ENV=prod'] | |
# set full traffic to latest revision (needed if rollback was performed) | |
- name: "gcr.io/cloud-builders/gcloud" | |
args: ['run', 'services', 'update-traffic', '$REPO_NAME', '--to-latest', '--region', 'europe-west4', '--platform', 'managed'] |
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 request = require("request"); | |
// Main function called by Cloud Functions trigger. | |
module.exports.updateCloudRunServices = (event, callback) => { | |
const build = eventToBuild(event.data); | |
// Check if push is to Dashboard source Code repo and if Cloud Build is successful | |
if (build.hasOwnProperty("source")) { | |
if ( | |
build.source.repoSource.repoName === "dashboard" && |
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
FROM python:3.7-stretch | |
RUN apt-get update -y | |
RUN apt-get install -y python-pip python-dev build-essential | |
COPY . /app | |
WORKDIR /app | |
RUN pip install -r requirements.txt | |
ENTRYPOINT ["python"] | |
CMD ["app.py"] |
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
<div id="app"> | |
<h2>Firebase List</h2> | |
<div v-for="item in items" class="item"> | |
<button @click="removeItem(item)">×</button> {{item.value}} <small>{{new Date(item.ts).toGMTString()}}</small> | |
</div> | |
<div> | |
<form><input v-model="tempItem"><button @click="addItem(tempItem); tempItem = ''" :disabled="tempItem===''"> + </button> </form> | |
</div> | |
</div> |
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
#!/usr/bin/python | |
import curses | |
import random | |
stdscr = curses.initscr() | |
curses.noecho() | |
curses.cbreak() | |
stdscr.keypad(1) | |
curses.halfdelay(1) |
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 IncomingWebhook = require('@slack/webhook').IncomingWebhook; | |
const url = "https://hooks.slack.com/services/XYZ"; | |
const webhook = new IncomingWebhook(url); | |
// Send the notification - Gets callled by Cloud Scheduler | |
module.exports.sendToSlack = () => { | |
(async () => { | |
await webhook.send({ | |
icon_emoji: ':male-police-officer:', |
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
imports: | |
- path: install-web.sh | |
name: install-web.sh | |
resources: | |
- name: default-allow-http | |
type: compute.v1.firewall | |
properties: | |
sourceRanges: ["0.0.0.0/0"] | |
targetTags: ["http-server"] | |
allowed: |
NewerOlder