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
| http://mobile.localdomain/artlight.bin |
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
| Param | |
| ( | |
| [Parameter(Position=0)] | |
| [ValidateSet('play', 'stop')] | |
| [String] | |
| $Operation = $(throw "Operation is required (play or stop)."), | |
| [alias("Device")] | |
| [String] | |
| $DeviceName = $env:COMPUTERNAME, |
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
| # Adapted from: https://community.home-assistant.io/t/motion-activated-light-but-with-conditions/466228 | |
| # | |
| # Works better with presence sensors by using a helper boolean | |
| blueprint: | |
| name: Motion-activated Light for Presence Sensors | |
| description: Turn on a light when motion is detected. | |
| domain: automation | |
| input: | |
| motion_entity: |
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
| blueprint: | |
| name: ZHA - Moes Smart Knob for lights | |
| description: 'Control lights with a Moes Smart Knob. | |
| You can set functions for a single press. This allows you to assign, e.g., a scene | |
| or anything else. | |
| Rotating left/right will change the brightness smoothly of the selected light. | |
| Not all functionality of the device is available at time of writing, e.g. double | |
| press, long press and press and rotate. | |
| Original blueprint by seamus65 (https://gist.github.com/seamus65/939a147634942dd885c8704334627f93). |
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
| load("render.star", "render") | |
| load("encoding/base64.star", "base64") | |
| load("hash.star", "hash") | |
| # Author: Taneli Leppä <[email protected]> | |
| # PNG encoder from: https://github.com/miloyip/svpng | |
| # Base64 encoder from: https://gist.github.com/caseyscarborough/8467877 | |
| def generate_png(w, h): | |
| t = [ 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c ] # CRC32 table |
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
| import argparse | |
| import json | |
| import tempfile | |
| import sys | |
| import os | |
| parser = argparse.ArgumentParser( | |
| description='Validate a Terraform plan file against deletions.') | |
| parser.add_argument('file', type=str, help='file to validate') | |
| args = parser.parse_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
| 1. Install community Terminal & SSH addon, disable protection | |
| 2. Log into home assistant via SSH | |
| 3. ls -l /dev/serial/by-id | |
| total 0 | |
| lrwxrwxrwx 1 root root 13 Dec 15 09:56 usb-Nabu_Casa_SkyConnect_v1.0_34b60e0f8318ec11a66ef69a47486eb0-if00-port0 -> ../../ttyUSB0 | |
| lrwxrwxrwx 1 root root 13 Dec 15 09:56 usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001CDD4956-if00 -> ../../ttyACM0 | |
| 4. pip install git+https://github.com/zigpy/zigpy-cli.git | |
| 5. Disable CC2531 in Home Assistant | |
| 5. Make backup: zigpy -vv radio znp /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001CDD4956-if00 backup znp.json | |
| 6. Restore backup: zigpy -vv radio znp /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_34b60e0f8318ec11a66ef69a47486eb0-if00-port0 restore znp.json |
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
| [Service] | |
| Environment=GOOGLE_SERVICE_CREDENTIALS=/etc/google/auth/application_default_credentials.json | |
| ExecStartPre=/bin/sed -i "s/gce_instance/generic_node\\n location europe-west3\\n namespace example\\n node_id host.example.com/g" ${RUNTIME_DIRECTORY}/fluent_bit_main.conf |
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
| from requests.api import request | |
| from Crypto.Cipher import PKCS1_OAEP, PKCS1_v1_5 | |
| from Crypto.Cipher import AES | |
| from Crypto.PublicKey import RSA | |
| from Crypto.Util.Padding import pad | |
| from Crypto.Util.number import bytes_to_long | |
| import base64 | |
| import requests | |
| import string | |
| import random |
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
| # To build and deploy: | |
| # | |
| # docker build -t gcr.io/YOUR-PROJECT/gsc2bq-cloudrun:latest . | |
| # docker push gcr.io/YOUR-PROJECT/gsc2bq-cloudrun:latest | |
| # | |
| # gcloud run deploy gcs2bq --image=gcr.io/YOUR-PROJECT/gsc2bq-cloudrun:latest \ | |
| # [email protected] \ | |
| # --timeout=60m --set-env-vars=GCS2BQ_PROJECT=YOUR-PROJECT,... \ | |
| # --region=europe-west4 | |
| # |
NewerOlder