I hereby claim:
- I am riston on github.
- I am riston (https://keybase.io/riston) on keybase.
- I have a public key ASAXJmK3h-xIPLvliDr3pTrO67IQQ1M_A7QJizLfqcV85go
To claim this, I am signing this object:
| echo '2-57/5 * * * * HA_TOKEN=OOOO HA_HOST=tik.tok.org python3 $HOME/temperature.py >> $HOME/temperature.log 2>&1' | crontab - |
| load('api_config.js'); | |
| load('api_events.js'); | |
| load('api_gpio.js'); | |
| load('api_mqtt.js'); | |
| load('api_net.js'); | |
| load('api_sys.js'); | |
| load('api_esp8266.js'); | |
| load('api_dht.js'); | |
| load('api_timer.js'); |
| import t, { | |
| array, type, string, number, mixed, boolean, union, | |
| null as Null, undefined as Undefined, Type, literal, | |
| success, failure, | |
| } from 'io-ts'; | |
| import { ThrowReporter } from 'io-ts/lib/ThrowReporter' | |
| import { PathReporter } from 'io-ts/lib/PathReporter' | |
| import { reporter } from 'io-ts-reporters'; |
| const ACTORS = { | |
| N: 1, | |
| S: 2, | |
| E: 4, | |
| W: 8, | |
| SP: 16, | |
| EP: 32, | |
| } |
I hereby claim:
To claim this, I am signing this object:
| from io import BytesIO | |
| import requests | |
| import dropbox | |
| import time | |
| import sys | |
| import os | |
| IMG_PATH = "/var/images" | |
| MS_VISION_BASE_URL = "https://api.projectoxford.ai/vision/v1.0/analyze" |
| const _promiseFn = fn => { | |
| return function promisified(...args) { | |
| const self = this; // promisification if performance critical | |
| return new Promise((resolve, reject) => { | |
| const cbFn = (error, result) => { | |
| if (error) { | |
| return reject(new Error(error)); | |
| } | |
| if (result && false === result.success) { |
| const bluebird = require("bluebird"); | |
| const cop = bluebird.coroutine; | |
| const exec = (time) => bluebird.delay(time).then(() => { | |
| console.log("Time done", time); | |
| return time; | |
| }); |
| d=(x,n)=>x%n==0 | |
| f="Fizz" | |
| b="Buzz" | |
| for(i=0;++i<101;) console.log(d(i,3)&&d(i,5)?f+b:d(i,3)?f:d(i,5)?b:i) | |
| d=x=>n=>x%n==0 | |
| f="Fizz" | |
| b="Buzz" | |
| for(i=0;++i<101;) console.log((a=d(i))&&a(3)&&a(5)?f+b:a(3)?f:a(5)?b:i) |
| #!/bin/bash | |
| # | |
| # .config.sh application-name change the NODE_CONFIG value | |
| set -euo pipefail | |
| cd "$(dirname "$0")/.." | |
| APPLICATION="${1:-}" | |
| TMPFILE="$(mktemp /tmp/config.XXXX.json)" |