Skip to content

Instantly share code, notes, and snippets.

View stritti's full-sized avatar
👨‍🏫

Stephan Strittmatter stritti

👨‍🏫
View GitHub Profile
@MaximilianKohler
MaximilianKohler / Listmonk-tutorial.md
Last active March 21, 2025 11:13
Complete Listmonk setup guide. Step-by-step tutorial for installation and all basic functions. Amazon EC2 & SES

Listmonk setup and usage guide

When I first set up Listmonk it was to use with Amazon SES. At the time Amazon would give you free 62,000 emails/mo if you sent them from an EC2 instance. So EC2 was the best server to use. In mid 2023 Amazon ended that, so now you can use whatever server you like, which makes things much easier. It shouldn't be too hard to convert these directions to another server host of your choice.

I used Hetzner with another build, and once my free EC2 year ended the AWS t2.micro cost me $14/mo. Hetzner has better specs and costs me $5/mo, so I added an nginx vhost and moved listmonk to the same server. Here's a $20 credit for Hetzner.

There is also the possibility to use the 1-click installers for their featured hosts: https://listmonk.app/ - listed under "Hosting providers". I'm not familiar with any of them but there are lots of new guides

@Beormund
Beormund / daylightsaving.py
Last active January 11, 2025 16:33
Micropython module for converting UTC to local time using daylight saving policies.
import utime
# hemisphere [0 = Northern, 1 = Southern]
# week [0 = last week of month, 1..4 = first..fourth]
# month [1 = January; 12 = December]
# weekday [0 = Monday; 6 = Sunday] (day of week)
# hour (hour at which dst/std changes)
# timezone [-780..780] (offset from UTC in MINUTES - 780min / 60min=13hrs)
class Policy:
def __init__(self, hemisphere, week, month, weekday, hour, timezone):
@IchHabRecht
IchHabRecht / widget.js
Created May 3, 2021 18:05
iOS Scriptable Widget für aktuellen 7-Tage-Inzidenzwert + realer 7-Tage-Inzidenzwert der letzten 5 Tage
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
// Thanks to @kevinkub (https://github.com/kevinkub), @rphl (https://github.com/rphl) and @tzschies (https://github.com/tzschies) for their inspiring work on this widget.
// See https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664, https://gist.github.com/rphl/0491c5f9cb345bf831248732374c4ef5 and https://gist.github.com/tzschies/563fab70b37609bc8f2f630d566bcbc9.
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,EWZ&geometry=${location.longitude.toFixed(3)},${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
@guiliredu
guiliredu / 0_NestJS-Cheatsheet.md
Last active February 24, 2025 00:04
Nest.js Cheatsheet

Nest.js Cheatsheet

Nest CLI

  • npm i -g @nestjs/cli

Packages

  • yarn add class-validator class-transformer
  • yarn add @nestjs/mapped-types
@aspose-com-gists
aspose-com-gists / convert-epub-pdf-java.java
Last active June 20, 2024 07:14
Java Convert EPUB to PDF Programmatically | Page Setup Password PDF
// Open an existing EPUB file for reading
try (FileInputStream fileInputStream = new FileInputStream(dataDir + "input.epub")) {
// Initialize PdfSaveOptions class object
PdfSaveOptions options = new PdfSaveOptions();
// Call the ConvertEPUB method to convert the EPUB to PDF
Converter.convertEPUB(fileInputStream, options, dataDir + "output.pdf");
}
@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;
@andreas-becker
andreas-becker / update-nextcloud-19-to-20.sql
Created December 21, 2020 18:36
Beim Update von #Nextcloud 19.x auf 20.x müssen einige Datenbankänderugen durchgeführt werden. Bei Shared-Hosting-Anbietern lässt sich das oftmals nicht per occ Kommando in der Shell durchführen. Deshalb hier die nötigen SQL-Kommandos zum ausführen in z.B. #phpmyadmin
# Fehlender Index "cards_abiduri" in der Tabelle "oc_cards".
ALTER TABLE `oc_cards` ADD INDEX `cards_abiduri` (`addressbookid`, `uri`) USING BTREE;
# Fehlender Primärschlüssel auf Tabelle "oc_federated_reshares".
ALTER TABLE `oc_federated_reshares` ADD PRIMARY KEY (`share_id`) USING BTREE;
# Fehlender Primärschlüssel auf Tabelle "oc_systemtag_object_mapping".
ALTER TABLE `oc_systemtag_object_mapping` ADD PRIMARY KEY (`objecttype`, `objectid`, `systemtagid`) USING BTREE;
# Fehlender Primärschlüssel auf Tabelle "oc_comments_read_markers".
ALTER TABLE `oc_comments_read_markers` ADD PRIMARY KEY (`user_id`, `object_type`, `object_id`) USING BTREE;
#Fehlender Primärschlüssel auf Tabelle "oc_collres_resources".
ALTER TABLE `oc_collres_resources` ADD PRIMARY KEY (`collection_id`, `resource_type`, `resource_id`) USING BTREE;
// 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: Robert Koch-Institut (RKI), dl-de/by-2-0
//
// -------------
// Configuration
// -------------
@kevinkub
kevinkub / incidence.js
Last active December 4, 2024 22:48
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 = {
@HollisTech
HollisTech / espdecode.ps1
Created December 18, 2019 16:12
espdecode: decode raw esp32 backtrace data from a log file. Requires PlatformIO.
<#
.SYNOPSIS
Decode raw esp32 backtraces in a log file.
Requires PlatformIO build environment.
.DESCRIPTION
Capture a log file with raw 'Backtrace:' data and pass it to this script.
The script filters the file, replacing the raw backtrace entries with decoded entries.
The filtered data is written to stdout.