I hereby claim:
- I am weienwong on github.
- I am wwong93 (https://keybase.io/wwong93) on keybase.
- I have a public key ASA1MBOUZm_UjaSPxZQqFk0pctBFzXX3w18iRPg5uo0zhgo
To claim this, I am signing this object:
set nocompatible | |
set expandtab | |
set autoindent | |
set number | |
set cursorline | |
set hlsearch | |
set showcmd | |
set wildmenu | |
set lazyredraw | |
set showmatch |
# i3blocks config file | |
# | |
# Please see man i3blocks for a complete reference! | |
# The man page is also hosted at http://vivien.github.io/i3blocks | |
# | |
# List of valid properties: | |
# | |
# align | |
# color | |
# command |
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see https://i3wm.org/docs/userguide.html for a complete reference! |
const routes = [ | |
{ | |
method: 'GET', | |
path: '/locations', | |
handler: async (request, h) => { | |
const db = server.app.db; | |
const locationCollection = db.collection('locations'); | |
// query all locations |
require('dotenv').config() | |
const request = require('request') | |
// webhooks instances-api | |
function scheduleItemPublishWebhook () { | |
// create webhook | |
const createItemPublishWebhookOption = { | |
method: 'POST', | |
url: `${process.env.ACCOUNTS_API_HOST}/v1/webhooks`, | |
headers: { |
const SDK = require('@zesty-io/sdk') | |
const https = require('https') | |
require('dotenv').config() | |
const DEV_TOKEN = process.env.DEV_TOKEN | |
const INSTANCE_ZUID = process.env.INSTANCE_ZUID | |
const MODEL_ZUID = process.env.MODEL_ZUID | |
const sdk = new SDK(INSTANCE_ZUID, DEV_TOKEN) |
async function publishItem (instanceZUID, modelZUID, itemZUID, version) { | |
const options = { | |
method: 'POST', | |
hostname: `${instanceZUID}.api.zesty.io`, | |
path: `/v1/content/models/${modelZUID}/items/${itemZUID}/publishings`, | |
headers: { | |
'Content-Type': 'application/json', | |
Authorization: `Bearer ${DEV_TOKEN}` | |
} | |
} |
setInterval(() => { | |
const payload = { | |
data: { | |
moisture: `${Math.random() * 100}` | |
} | |
} | |
sdk.instance.createItem(MODEL_ZUID, payload).then(res => { | |
if (res.statusCode === 201) { | |
const itemZUID = res.data.ZUID |
const SDK = require('@zesty-io/sdk') | |
const https = require('https') | |
require('dotenv').config() | |
const DEV_TOKEN = process.env.DEV_TOKEN | |
const INSTANCE_ZUID = process.env.INSTANCE_ZUID | |
const MODEL_ZUID = process.env.MODEL_ZUID | |
const sdk = new SDK(INSTANCE_ZUID, DEV_TOKEN) |
I hereby claim:
To claim this, I am signing this object: