Skip to content

Instantly share code, notes, and snippets.

#ifndef __DISPATCHER_H
#define __DISPATCHER_H
#include <functional>
#include <list>
template <typename... Args>
class Dispatcher
{
public:
@atschwarz
atschwarz / lrp-db.txt
Last active January 19, 2018 12:23
LRP-Datenbank für RelaX
-- relax URL : https://dbis-uibk.github.io/relax/calc.htm
-- gistID : ce082824e9890f7e7e36275610ae5ec5
group: LRP-Datenbank
L = {
LN:string, ORT:string, LCODE:string, MENGE:number
'L1' , 'Graz' , 'A' , 1000
'L2' , 'Wien' , 'C' , 500
'L3' , 'Wien' , 'C' , 1500
@atschwarz
atschwarz / SleepTimer.md
Last active December 3, 2017 01:27
OpenHAB2 - Generic sleep timer

OpenHAB2 - Generic sleep timer

The following describes the necessary Functions and Procedures to create a small "Sleep Timer Library" for OpenHAB (Don't know, if Library is the correct title, but you know what I mean ;-)). Using this approach, it's easy for you to create your own custom sleep timers.

NOTE: This stuff doesn't depend on any add-on.

Usage example

The usage example does not cover initialization or recovery on system start and demonstrates a VERY BASIC example. But it's not very hard for you to integrate and customize it to your needs ;-)

1. Create a rule, e.g. inside the file SleepTimer.rules and paste in the following code.