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
| #include "Adafruit_Si7021.h" | |
| Adafruit_Si7021 sensor = Adafruit_Si7021(); | |
| double h; | |
| double t; | |
| void setup() { | |
| sensor.begin(); |
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
| scrape_configs: | |
| - job_name: 'prometheus' | |
| scrape_interval: 5s | |
| static_configs: | |
| - targets: ['localhost:9090'] | |
| - job_name: 'particles' | |
| scheme: https | |
| scrape_interval: 5m | |
| static_configs: | |
| - targets: ['us-central1-{{YOUR-PROJECT-ID}}.cloudfunctions.net:443'] |
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
| { | |
| "name": "cloud-functions-prom-exporter", | |
| "version": "0.0.1", | |
| "description": "Cloud Functions originating Prometheus Gauge|Histogram metrics", | |
| "author": "Your Name <[email protected]>", | |
| "keywords": ["Google","Cloud Functions","Prometheus", "Particle", "Photon"], | |
| "dependencies":{ | |
| "prom-client": "10.2.2", | |
| "particle-api-js": "7.0.1", | |
| "cloud-functions-runtime-config": "0.2.0" |
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
| /* jshint strict: true */ | |
| /* jshint esversion: 6 */ | |
| /* globals exports,require */ | |
| const client = require("prom-client"); | |
| const Registry = client.Registry; | |
| const register = new Registry(); | |
| const Particle = require("particle-api-js"); | |
| const particle = new Particle(); |
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
| # -*-coding=utf-8 -*- | |
| import json | |
| from apiclient.discovery import build | |
| from datetime import datetime, date, time, timedelta | |
| from oauth2client.client import GoogleCredentials | |
| credentials = GoogleCredentials.get_application_default() |
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
| steps: | |
| - name: busybox | |
| args: ["mv", "index.js", "index.before.js"] | |
| - name: gcr.io/${PROJECT_ID}/google-closure-compiler | |
| args: [ | |
| "--js_output_file=index.js", | |
| "index.before.js" | |
| ] | |
| - name: gcr.io/cloud-builders/gcloud | |
| args: [ |
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
| { | |
| "actions": [ | |
| { | |
| "description": "Default Welcome Intent", | |
| "name": "MAIN", | |
| "fulfillment": { | |
| "conversationName": "silly" | |
| }, | |
| "intent": { | |
| "name": "actions.intent.MAIN", |
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
| /* jshint strict: true */ | |
| /* jshint esversion: 6 */ | |
| /* globals exports,require */ | |
| const ActionsSdkApp = require('actions-on-google').ActionsSdkApp; | |
| const greet = (intentName) => `Hi, I\'m a silly app. This is the ${intentName} intent. You can ask me something`; | |
| const | |
| intent = { |
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
| { | |
| "name": "silly app", | |
| "version": "0.0.1", | |
| "description": "First Google Actions SDK", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "node index.js" | |
| }, | |
| "dependencies": { | |
| "actions-on-google": "^1.7.0" |
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
| steps: | |
| - name: gcr.io/cloud-builders/gcloud | |
| args: [ | |
| 'beta', | |
| 'functions', | |
| 'deploy','test', | |
| '--source=https://source.developers.google.com/projects/${PROJECT_ID}/repos/[[YOUR-REPO]]/moveable-aliases/master/paths/', | |
| '--trigger-http', | |
| '--entry-point=test', | |
| '--project=${PROJECT_ID}' |