Skip to content

Instantly share code, notes, and snippets.

@dschanoeh
dschanoeh / db-connections.js
Last active July 13, 2022 10:09
A Scriptable Widget That Displays Deutsche Bahn Connections and Their Delay
/*
* This script queries the API documented at https://docs.marudor.de
* to retrieve the next Deutsche Bahn connections between two given
* stations. Only direct connections are supported.
*/
// ====== Configuration ======
/* Eva Number of the stations
* Find yours here https://download-data.deutschebahn.com/static/datasets/haltestellen/D_Bahnhof_2020_alle.CSV
*/
@dschanoeh
dschanoeh / config.toml
Last active August 12, 2020 14:37
Displaying Exif Tags using Hugo
[imaging.exif]
includeFields = ".*"
@dschanoeh
dschanoeh / livingroom_lights_alone_off.yaml
Last active May 8, 2021 09:55
Home Assistant Light Control Pattern
- alias: 'Livingroom lights alone off'
trigger:
- platform: state
entity_id: binary_sensor.hallway_motion
to: 'on'
- platform: state
entity_id: binary_sensor.bedroom_motion
to: 'on'
condition:
condition: and
<script type="text/javascript" src="exif/binaryajax.js"></script>
<script type="text/javascript" src="exif/exif.js"></script>
<script type="text/javascript" src="exif/replaceImages.js"></script>
<link rel='stylesheet' href='exif/style.css' type='text/css' media='all' />
@dschanoeh
dschanoeh / imapfilter-conf.lua
Last active December 9, 2021 06:00
My imapfilter configuration
options.timeout = 20
options.subscribe = true
account1 = IMAP {
server = 'server',
username = 'username',
password = 'password',
}
-- Twitter
@dschanoeh
dschanoeh / EchoService.java
Created October 10, 2011 13:00
EchoService
public class EchoService {
/* Configuration settings */
private static final String HOST = "192.168.0.21";
private static final int PORT = 28602;
private static final String BUS = "vcan0";
private static final int REQUEST_ID = 0x12;
private static final int RESPONSE_ID = 0x13;
private static Bus bus = new Bus();
public class KayakLibraryTest {
/* FrameReceiver that will print out every Frame it receives */
private static FrameReceiver receiver = new FrameReceiver() {
public void newFrame(Frame frame) {
System.out.println(frame.toLogFileNotation());
}
};