Skip to content

Instantly share code, notes, and snippets.

View rafaelmaeuer's full-sized avatar

Rafael M. rafaelmaeuer

View GitHub Profile
@rafaelmaeuer
rafaelmaeuer / .wakeup
Last active June 26, 2022 11:13 — forked from ralph089/.wakeup
Restarts Bluetooth Module on Mac OS X. You can use the script as shortcut to restart Bluetooth on demand or you can use it with "SleepWatcher" to automatically restart Bluetooth on wakeup (See README.md).
#!/bin/bash
#
# Restart Bluetooth Module after wake on Mac OS X
#
# Requires Blueutil to be installed: http://brewformulas.org/blueutil
BT="/usr/local/bin/blueutil"
log() {
echo "$@"
@rafaelmaeuer
rafaelmaeuer / schnelltest-availability.js
Last active May 31, 2022 04:09 — forked from marco79cgn/schnelltest-availability.js
Shows the available amount of Covid Tests in your local drug store and online
// 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];
@rafaelmaeuer
rafaelmaeuer / vaccination-stats.js
Last active April 22, 2023 13:23 — forked from marco79cgn/vaccination-stats.js
A Scriptable widget that shows the amount of people who have received the corona vaccination in Germany
// Version 1.4.3
// 30.05.2022
//
// Mit Caching und Fallback
// Neue API mit TSV-Parsing
// Dark-Mode Unterstützung
const resetCache = false;
const cacheMinutes = 60;
const today = new Date();
@rafaelmaeuer
rafaelmaeuer / dm-toilet-paper.js
Last active May 31, 2022 04:03 — forked from marco79cgn/dm-toilet-paper.js
iOS Widget, das die Anzahl an Klopapier Packungen in deiner nächsten dm Drogerie anzeigt (für die scriptable.app)
// dm Klopapier Widget
//
// Copyright (C) 2020 by marco79 <[email protected]>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
@rafaelmaeuer
rafaelmaeuer / incidens_and_newcases.js
Last active March 8, 2023 09:15
Kombination der Covid-19 Neuinfektionen und der Inzidenz-Zahl für die aktuelle Location. Inspiriert von https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664
// COVID-19 iOS-Widget for Incidence and Newcases in Germany and current geo-location
// Modified: https://gist.github.com/oliverandrich/0f34c8d4e6de4b6ff32937c584009a65
// Inspired by: https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664
// Added Data Source: https://api.corona-zahlen.org/docs/
const GEO = {
latitude: 49.87,
longitude: 8.65
}
@rafaelmaeuer
rafaelmaeuer / 0_reuse_code.js
Created December 11, 2016 19:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console