Skip to content

Instantly share code, notes, and snippets.

@kidhasmoxy
kidhasmoxy / yet_another_motion_automation.yaml
Created January 20, 2022 16:10 — forked from networkingcat/yet_another_motion_automation.yaml
Homeassistant blueprint for motion-activated light scene
blueprint:
name: Yet Another Motion Automation
description: >
# YAMA V10
Turn on lights or scenes when motion is detected.
Four different scenes can be defined depending on time of day.
@kidhasmoxy
kidhasmoxy / frigate_notification.yaml
Last active September 29, 2022 20:12 — forked from hunterjm/frigate_notification.yaml
Frigate Notification Blueprint
blueprint:
name: Frigate Notification (0.10.0) with Actions
description: |
## Frigate Mobile App Notification
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but include an actionable notification allowing you to view the clip and snapshot.
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1].
### Software Version Requirements
@kidhasmoxy
kidhasmoxy / docker-compose.yml
Created July 11, 2019 19:20
multicast relay docker compose example
version: '2'
services:
multicast-relay:
container_name: multicast-relay
image: kidhasmoxy/multicast-relay
hostname: mdnsrelay
networks:
iot_network:
# ipv4_address: 192.168.20.240 # Not needed if you use a tight ipam
lan_network:
@kidhasmoxy
kidhasmoxy / RESTRequestHelper.js
Created August 17, 2016 21:01
ServiceNow REST Request helper for dealing with non-standard content types in a Scripted REST API
var RESTRequestHelper = Class.create();
RESTRequestHelper.prototype = {
initialize: function() {
},
type: 'RESTRequestHelper'
};
RESTRequestHelper.getRequestStreamString = function(requestBody){
var sb = ''+ GlideStringUtil.getStringFromStream(requestBody.dataStream);
@kidhasmoxy
kidhasmoxy / DataGenerator Close Date Sample
Created May 6, 2015 13:38
Quick snippet to use for setting a close date based on the open date for the Data Generator
if (target.state == 3 || target.state == 4 || target.state == 7){
var opened = new GlideDateTime(target.opened_at);
var end = opened.addDaysUTC(5);
answer = DataGeneratorUtils.generateRandomDate( opened, end);
}