Skip to content

Instantly share code, notes, and snippets.

View justinlawrence's full-sized avatar

Justin Lawrence justinlawrence

View GitHub Profile
@sbyx
sbyx / deconz-hue-dimmer-switch.yaml
Created January 10, 2021 15:44
Home Assistant Blueprint - deCONZ - Philips Hue Dimmer Switch - Custom Actions
blueprint:
name: "deCONZ - Philips Hue Dimmer Switch - Custom Actions"
description: Freely customizable actions for Philips Hue Dimmer Switch buttons.
domain: automation
input:
remote:
name: Dimmer Switch
selector:
device:
integration: deconz
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery.
default: 20
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active November 18, 2024 07:43
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@joshuataylor
joshuataylor / app.js
Created October 23, 2017 12:31
Preact component to notify user when a change has been made, and on route change reload the page.
import { h, Component } from 'preact';
import { Router } from 'preact-router';
import Header from './header';
import Home from '../routes/home';
import Profile from '../routes/profile';
import NotifyChange from "./NotifyChange/index";
// import Home from 'async!../routes/home';
// import Profile from 'async!../routes/profile';

Set rz and sz on Mac

There are a mess of troubles in sending and receiving files from my macbook to dev server, since I had no permission to excute command scp on dev server. Here is a lightweight, quick, and convenience tools which related with ssh, called lrzsz. lrzsz is a unix communication package providing the XMODEM, YMODEM, ZMODEM file transefer protocol which usually has been already installed in most of servers.

Prerequisites

  • iTerm2 is necessary. [Here][] is the official website.