Skip to content

Instantly share code, notes, and snippets.

@sprocktech
sprocktech / unifi-le-root-cert-fix.txt
Last active October 11, 2021 13:50
Ubiquiti UniFi - Fix for the Let's Encrypt DST Root CA X3 Expiration
# Some UniFi devices may not have the current ISRG root cert that LE uses
# Some devices also have an older version of OpenSSL
# These older versions will not validate a cert if the expired DST root cert is part of the chain
# USG
# This has an older OpenSSL version
# The current ISRG root cert is not included in the latest firmware
sudo -i
sed -i 's|^mozilla\/DST_Root_CA_X3\.crt|!mozilla/DST_Root_CA_X3.crt|' /etc/ca-certificates.conf
curl -sk https://letsencrypt.org/certs/isrgrootx1.pem -o /usr/local/share/ca-certificates/ISRG_Root_X1.crt
@marcusraitner
marcusraitner / covid-19-7-day-incidence-county.js
Last active June 6, 2023 18:12 — forked from MatzeKitt/covid-19-chart-county.js
Script for ScriptableApp displaying the 7-Day-Incidence in your county in Germany
// 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: GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007
// Author: Marcus Raitner (https://fuehrung-erfahren.de)
// Source: https://github.com/marcusraitner/COVID-19-Dashboard
// ## Changelog
// * 1.0.1: Correction of layout of label for covid-beds
// * 1.0.2: Bug-Fix for Saar-Pfalz-Kreis (using GEN instead of county for join)
// * 1.0.3: Bug-Fix for Landsberg a. Lech (now using both GEN and county)
@notjosh
notjosh / script.js
Last active January 29, 2021 16:59
COVID vaccination progress in Germany
'use strict';
const CONFIG = {
dataURL: 'https://rki-vaccination-data.vercel.app/api',
alsoDrawState: undefined,
};
const fetchJSON = async (url) => {
const request = new Request(url);
const data = await request.loadJSON()
@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();
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: teal; icon-glyph: magic;
/*Wähle das Bundesland
0 Baden-Würtemberg
1 Bayern
2 Brandenburg
3 Berlin
4 Bremen
@marco79cgn
marco79cgn / vaccination-stats.js
Last active January 11, 2023 21:47
A Scriptable widget that shows the amount of people who have received the corona vaccination in Germany
// 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;
@klaus-schuster
klaus-schuster / incidence.js
Last active May 17, 2022 10:41 — forked from rphl/incidence.js
COVID-19 Inzidenz-Widget für iOS für HAMBURG (nutzt die Daten der HH-Website und nicht die des RKI)
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-blue; icon-glyph: grimace;
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// Corona Zahlen Hamburg | https://www.hamburg.de/corona-zahlen
// Credits:
// kevinkub https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664
// rphl https://gist.github.com/rphl/0491c5f9cb345bf831248732374c4ef5
// eqsOne https://talk.automators.fm/t/widget-examples/7994/379
@masselmello
masselmello / rsg_group_mcfit_high5_johnreed_capacity_widget.js
Last active March 26, 2024 11:41
iOS widget powered by the Scriptable app that shows the current capacity of your McFit gym (RSG group)
/**
* Script for scriptable to get the current capacity of McFit Gyms
*/
let gymId = 1731068920
let param = args.widgetParameter
if (param != null && param.length > 0) {
gymId = param
}
const currentGymCapacity = await fetchGymCapacity(gymId)
@kevinkub
kevinkub / incidence.js
Last active June 27, 2023 12:53
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// 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 = {