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
{ | |
"definitions": { | |
"CreateDocumentCommand": { | |
"type": "object", | |
"required": ["eventType", "documentName"], | |
"properties": { | |
"eventType": { | |
"type": "string", | |
"enum": ["CreateDocument"] | |
}, |
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
#!/usr/bin/python2.7 | |
import sys | |
# assuming you have https://github.com/foxel/noolite-mqtt-python near | |
from noolite_serial import NooLiteSerial | |
noo_serial = NooLiteSerial('/dev/ttyS0') | |
if len(sys.argv) < 3: | |
raise Exception('Not Enough params. Usage: noo.py [ch] [cmd]') |
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 | |
import re | |
from ..Script import Script | |
class VaryTempWithHeight(Script): | |
def __init__(self): |
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 | |
import re | |
from ..Script import Script | |
class VaryTempWithHeight(Script): | |
def __init__(self): |
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
switch: | |
- platform: modem_control | |
name: Megafon Internet | |
host: !secret router_ip | |
username: !secret router_username | |
password: !secret router_password |
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
// TypeScript 4.1 deep keys extraction type | |
// combination of https://flut1.medium.com/deep-flatten-typescript-types-with-finite-recursion-cb79233d93ca | |
// and https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#key-remapping-in-mapped-types | |
type KeysPrependRecursor<T, P extends string> = { | |
[K in keyof T as `${P}.${string & K}`]: T[K] extends Object ? KeysPrependRecursor<T[K], `${P}.${string & K}`> : T[K] | |
} | |
type KeysPrepend<T> = { | |
[K in keyof T]: T[K] extends Object ? KeysPrependRecursor<T[K], `${string & K}`> : T[K] | |
} |
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
#!/bin/bash | |
# | |
# Note, to pull a file from s3 use "s3cmd get s://bucket/file destinationfile" | |
# You must have the proper .s3cfg file in place to decrypt the file. | |
# You may also use "gpg encryptedfile" and supply the encryption code if you download | |
# from the web interface. Good luck. | |
# The bucket should be set to transfer to Glacier. To retreive, you need to initiate a |
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
const beep = (date) => { | |
const context = new AudioContext(); | |
const oscillator = context.createOscillator(); | |
oscillator.type = "sawtooth"; | |
oscillator.frequency.value = 1200; | |
oscillator.connect(context.destination); | |
oscillator.start(); | |
if (confirm("Появилась запись")) { | |
oscillator.stop(); | |
document.location.href = 'https://q.midpass.ru/ru/Booking/Date?serviceId=54030d6a-e145-08e2-60fb-33344fac2455&date=' + date; |
OlderNewer