Skip to content

Instantly share code, notes, and snippets.

View dchambers's full-sized avatar

Dominic Chambers dchambers

View GitHub Profile
@dchambers
dchambers / zha_ikea_tradfri_4button_remote_color.yaml
Last active December 2, 2022 22:35 — forked from orcema/zha_ikea_tradfri_4button_remote_color.yaml
blueprint zha_ikea_tradfri_4button_remote_color
blueprint:
name: ZHA - IKEA TRADFRI - 4 Button Remote - Color Lights
description:
This automation simulates the use of the IKEA TRADFRI remote control
connected through ZHA.
domain: automation
input:
remote:
name: IKEA TRADFRI remote control 4 buttons
description: Select the remote control you wish to use.
@dchambers
dchambers / package.json
Created January 29, 2020 16:44
Copy non JavaScript assets for all TypeScript project references in specified `tsconfig.json`
{
"name": "@babylon/tscopy",
"version": "0.0.0",
"bin": {
"tscopy": "./src/tscopy.js"
},
"dependencies": {
"cpy": "^8.0.0"
}
}
@dchambers
dchambers / shipcat-git-diff
Last active February 14, 2024 02:57
Perform a diff of the Shipcat region values between two Git branches: `Usage: shipcat-git-diff service branch1 branch2`
#!/bin/sh
function verifyService {
local service=$1
if [ ! -f "services/$service/shipcat.yml" ]; then
echo "No such service $service"
exit 1
fi
}
@dchambers
dchambers / importNode-polyfill.js
Created March 18, 2015 14:02
importNode() polyfill for IE8
'use strict';
if(!window.DocumentFragment && window.HTMLDocument) {
window.DocumentFragment = HTMLDocument;
}
if(!document.ELEMENT_NODE) {
document.ELEMENT_NODE = 1;
document.ATTRIBUTE_NODE = 2;
document.TEXT_NODE = 3;