This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import utime | |
# hemisphere [0 = Northern, 1 = Southern] | |
# week [0 = last week of month, 1..4 = first..fourth] | |
# month [1 = January; 12 = December] | |
# weekday [0 = Monday; 6 = Sunday] (day of week) | |
# hour (hour at which dst/std changes) | |
# timezone [-780..780] (offset from UTC in MINUTES - 780min / 60min=13hrs) | |
class Policy: | |
def __init__(self, hemisphere, week, month, weekday, hour, timezone): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0 | |
// Thanks to @kevinkub (https://github.com/kevinkub), @rphl (https://github.com/rphl) and @tzschies (https://github.com/tzschies) for their inspiring work on this widget. | |
// See https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664, https://gist.github.com/rphl/0491c5f9cb345bf831248732374c4ef5 and https://gist.github.com/tzschies/563fab70b37609bc8f2f630d566bcbc9. | |
class IncidenceWidget { | |
constructor() { | |
this.previousDaysToShow = 31 | |
this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL,EWZ&geometry=${location.longitude.toFixed(3)},${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Version 1.3.0 | |
// 27.11.2021 | |
// | |
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: red; icon-glyph: notes-medical; | |
// Mit Caching und Fallback | |
const cacheMinutes = 60; // 60 min | |
const today = new Date(); | |
const neededTotalVaccinations = 83200000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fehlender Index "cards_abiduri" in der Tabelle "oc_cards". | |
ALTER TABLE `oc_cards` ADD INDEX `cards_abiduri` (`addressbookid`, `uri`) USING BTREE; | |
# Fehlender Primärschlüssel auf Tabelle "oc_federated_reshares". | |
ALTER TABLE `oc_federated_reshares` ADD PRIMARY KEY (`share_id`) USING BTREE; | |
# Fehlender Primärschlüssel auf Tabelle "oc_systemtag_object_mapping". | |
ALTER TABLE `oc_systemtag_object_mapping` ADD PRIMARY KEY (`objecttype`, `objectid`, `systemtagid`) USING BTREE; | |
# Fehlender Primärschlüssel auf Tabelle "oc_comments_read_markers". | |
ALTER TABLE `oc_comments_read_markers` ADD PRIMARY KEY (`user_id`, `object_type`, `object_id`) USING BTREE; | |
#Fehlender Primärschlüssel auf Tabelle "oc_collres_resources". | |
ALTER TABLE `oc_collres_resources` ADD PRIMARY KEY (`collection_id`, `resource_type`, `resource_id`) USING BTREE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-gray; icon-glyph: magic; | |
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0 | |
// | |
// ------------- | |
// Configuration | |
// ------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0 | |
class IncidenceWidget { | |
constructor() { | |
this.previousDaysToShow = 31; | |
this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json` | |
this.apiUrlDistrictsHistory = (districtId) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/Covid19_hubv/FeatureServer/0/query?where=IdLandkreis%20%3D%20%27${districtId}%27%20AND%20Meldedatum%20%3E%3D%20TIMESTAMP%20%27${this.getDateString(-this.previousDaysToShow)}%2000%3A00%3A00%27%20AND%20Meldedatum%20%3C%3D%20TIMESTAMP%20%27${this.getDateString(1)}%2000%3A00%3A00%27&outFields=Landkreis,Meldedatum,AnzahlFall&outSR=4326&f=json` | |
this.stateToAbbr = { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Decode raw esp32 backtraces in a log file. | |
Requires PlatformIO build environment. | |
.DESCRIPTION | |
Capture a log file with raw 'Backtrace:' data and pass it to this script. | |
The script filters the file, replacing the raw backtrace entries with decoded entries. | |
The filtered data is written to stdout. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uint8_t blue = 2; | |
const uint8_t vbatPin = 35; | |
#include <Wire.h> // Only needed for Arduino 1.6.5 and earlier | |
#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"` | |
float VBAT; // battery voltage from ESP32 ADC read | |
SSD1306 display(0x3c, 4, 15); | |
void setup() | |
{ | |
Serial.begin(115200); | |
pinMode(blue, OUTPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.2' | |
services: | |
homieMonitor: | |
container_name: homieMonitor | |
environment: | |
- HM_MQTT_HOST=192.168.1.1 | |
- HM_MQTT_PORT=1883 | |
- HM_MQTT_SSL_ENABLE_FLAG=true | |
- HM_MQTT_USER=mqtt | |
- HM_MQTT_PASS=superSecret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Ionic App</title> | |
<base href="/" /> | |
<meta | |
name="viewport" |
NewerOlder