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
#!/bin/bash | |
# | |
# Restart Bluetooth Module on Mac OS X | |
# | |
# Requires Blueutil to be installed: http://brewformulas.org/blueutil | |
BT="/usr/local/bin/blueutil" | |
log() { | |
echo "$@" |
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
#!/usr/bin/env bash | |
# Sometimes mac os assigns different ids to external monitors. The ids can swap back and forth (based on | |
# the order in which they are attached?). When the ids of two displays are switched, it's impossible | |
# (as far as I know) to determine which external monitor id goes with which physical device. Instead, | |
# this script just assumes the ids are backwards and switches the configuration for them. | |
# After all, you are calling the scripit, so something must be wrong... | |
# | |
# Note that this script depends heavily on the text output of displayplacer, so it may be somewhat brittle... |
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
let country = "de"; // replace with 'at' for shops in Austria | |
let storeId = 251; | |
let param = args.widgetParameter; | |
if (param != null && param.length > 0) { | |
if (param.indexOf(";") > 0) { | |
const paramSplit = param.split(";"); | |
storeId = paramSplit[0]; | |
country = paramSplit[1].toLowerCase(); | |
} else { | |
storeId = param; |
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
// https://gist.github.com/marco79cgn/685804b731e2c8e466501e4b88341286 | |
// https://gist.github.com/tofi86/5e95708cff0b1746b57806a78bdb2eda | |
let country = "de"; // replace with 'at' for shops in Austria | |
let storeId = 251; | |
let param = args.widgetParameter; | |
if (param != null && param.length > 0) { | |
if (param.indexOf(";") > 0) { | |
const paramSplit = param.split(";"); | |
storeId = paramSplit[0]; |