Skip to content

Instantly share code, notes, and snippets.

export const countries = {
"Afrika": {
"DZ": "Algerien",
"AO": "Angola",
"BJ": "Benin",
"BW": "Botsuana",
"BF": "Burkina Faso",
"BI": "Burundi",
"CI": "Côte d’Ivoire",
"CD": "Demokratische Republik Kongo",
{
"AF": "Afghanistan",
"EG": "Ägypten",
"AL": "Albanien",
"DZ": "Algerien",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarktis",
"AG": "Antigua und Barbuda",
@HendrikRunte
HendrikRunte / vaccinations.js
Last active January 16, 2021 19:52
Scriptable.app widget for displaying the quota of vaccinations in Germany.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: green; icon-glyph: sun;
///////////////////////////////////////////////////////////////////////
// vaccinations.js
// Origin:
// https://gist.github.com/HendrikRunte/4efed5a7f68f73c6c4553742991a58de
// Take it and have fun.
// Hendrik Runte, Jan 16, 2020, 20:48.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: yellow; icon-glyph: sun;
///////////////////////////////////////////////////////////////////////
// yesteryear.js
// Origin:
// https://gist.github.com/HendrikRunte/8a17fcab2ff1c6ffbef0bd4d6011663f
// Take it and have fun.
// Hendrik Runte, Dec 14, 2020, 14:36.
@HendrikRunte
HendrikRunte / dawn2dusk.js
Last active January 8, 2024 19:40
Scriptable.app widget displaying the exact time of today's sunrise and sunset. Which comes in handy in the wintertime …
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: sun;
///////////////////////////////////////////////////////////////////////
// dawn2dusk.js
// Origin:
// https://gist.github.com/HendrikRunte/4b5d03cb26e31508bc96553ad3c10f47
// Take it and have fun.
// Hendrik Runte, Nov 12, 2020, 17:33.
@HendrikRunte
HendrikRunte / debian-setup.sh
Created October 23, 2020 19:57 — forked from kevinkub/debian-setup.sh
Sets up and hardens an Debian Linux server.
# Arch Linux Setup: https://gist.github.com/kevinkub/46ce7229ee4f17be710ddd7c5a80a3c3
# Change root password
echo "# Change password of root user"
passwd
# Change hostname
echo "# Change hostname"
hostname
sudo hostnamectl set-hostname $hostname
@HendrikRunte
HendrikRunte / incidence.js
Created October 21, 2020 20:00 — forked from kevinkub/incidence.js
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
const apiUrl = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=GEN,cases7_per_100k&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
const apiUrlStates = 'https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/Coronaf%E4lle_in_den_Bundesl%E4ndern/FeatureServer/0/query?where=1%3D1&outFields=cases7_bl_per_100k&returnGeometry=false&outSR=4326&f=json'
const widget = await createWidget()
if (!config.runsInWidget) {
await widget.presentSmall()
}
Script.setWidget(widget)
Script.complete()
@HendrikRunte
HendrikRunte / gue.sh
Last active March 20, 2017 12:15
Process all JPGs in one folder with guetzli
#/bin/sh
for i in *.jpg; do
guetzli --quality 84 --verbose "$i" $(basename "${i/.jpg}").gli.jpg
echo "Done with compressing $i by using guetzli/84."
done
echo "Finished converting all files"
exit 1
@HendrikRunte
HendrikRunte / gist:54673940516bf7be7d1b
Created January 28, 2015 10:07
RouterJS: Simple hashbang router for single page apps.
/**
* router.js
*
* Hendrik Runte, 2015
*/
/**
* Simple hashbang router for single page apps.
*
* Expects URIs like
@HendrikRunte
HendrikRunte / Google Closure.sublime-build
Last active October 17, 2018 01:41
Sublime Build System for Google Closure Compiler with JS Source Maps
{
"cmd": [
"java",
"-jar",
"${packages}/Google Closure/compiler.jar",
"--js",
"$file",
"--js_output_file",
"$file_path/$file_base_name-compiled.js",
"--compilation_level",