Skip to content

Instantly share code, notes, and snippets.

View TrafeX's full-sized avatar

Tim de Pater TrafeX

View GitHub Profile
@sbyx
sbyx / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active April 27, 2024 18:33
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').
export const fetchAddress = (
fieldName: string,
): Function =>
async (dispatch, getState) => {
const state = getState();
const zipcode = selector(state, `${fieldName}.zipcode`);
const housenumber = selector(state, `${fieldName}.housenumber`);
if (!zipcode || !housenumber) {
return;
@biern
biern / RouteTest.js
Created May 28, 2017 17:30
Render Route with enzyme shallow() proof of concept
import React from 'react';
import { Route } from 'react-router-dom';
export default class RouteTest extends React.PureComponent {
render() {
return (
<div>
<Route path="/hello" render={() => (<div>Hello world!</div>)} />
</div>
@KonradIT
KonradIT / readme.md
Last active September 25, 2023 01:55
GoPro Studio for Linux
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active April 1, 2024 11:21
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.