Skip to content

Instantly share code, notes, and snippets.


Tobias Battenberg mountbatt

View GitHub Profile
mountbatt / wetter.js
Last active March 10, 2021 09:42
Scriptable Widget to get Weather Data from a weewx driven Weather-Station via JSON by weewx-json ( With Shortcodes this Widget is fully Siri compatible!
View wetter.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: sun;
// Check weewx Weather
// Script Updates:
// Version: 0.7.4
// edit:
let endpoint = ""
let prefix = "im" // im | in | at ... defines "im Waldbadviertel" oder "in Cologne" (set to "in" or "at" for good english)
mountbatt / inline-portrait.svg.php
Created February 10, 2021 09:48
Use a SVG-shape for images in WordPress
View inline-portrait.svg.php
<!-- this is our svg in /images/inline-portrait.svg.php. Make sure the filename ends with *.svg.php -->
<!-- in the "pattern" we create a unique identifier with a sanitized url of the image -->
<!-- this "id" is used as "fill" -->
<svg aria-label="<?php the_title(); ?>" role="img" viewBox="0 0 256 257" version="1.1" class="">
<title><?php the_title(); ?></title>
<pattern id="imageID-<?php echo trim(preg_replace('/[^a-z0-9]+/i',"", strtolower(htmlspecialchars_decode($url)))); ?>" width="100%" height="100%" patternUnits="userSpaceOnUse">
<image height="100%" width="100%" x="0" xlink:href="<?php echo $url;?>" y="0"></image>
mountbatt / ZOE-Widget.js
Last active March 24, 2023 06:01
Scriptable iOS widget that displays the status of your Renault ZOE on your iPhone and iPad.
View ZOE-Widget.js
/* Das Widget ist auf Grund von Beschwerden von Renault vorrübergehend entfernt */
/* Le widget a été temporairement supprimé suite à une plainte de Renault. */
/* The widget is temporarily removed due to complaints from Renault */