Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: Motion-activated Time Constraint Light
description: Turn on a light when motion is detected.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
input:
motion_entity:
name: Motion Sensor
selector:
entity:
@airmonitor
airmonitor / app.py
Created February 12, 2021 21:41 — forked from sofianhamiti/app.py
from aws_cdk import (
aws_lambda,
aws_iam,
aws_apigatewayv2,
core
)
class InferenceStack(core.Stack):
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
@airmonitor
airmonitor / cloudflare-ddns-update.sh
Created December 23, 2020 19:14 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@airmonitor
airmonitor / cloudflare-ddns-update.sh
Created December 23, 2020 19:14 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@airmonitor
airmonitor / handler.py
Created November 18, 2020 22:52 — forked from g-farrow/handler.py
Powertools Example
from typing import Optional, List
from aws_lambda_powertools.utilities.data_classes import APIGatewayProxyEvent
from aws_lambda_powertools.utilities.parser import BaseModel, parse
class Exam(BaseModel):
subject: str
result: Optional[str]