Skip to content

Instantly share code, notes, and snippets.

View DerStimmler's full-sized avatar
🎯
Focusing

Tim Schneider DerStimmler

🎯
Focusing
View GitHub Profile
@DerStimmler
DerStimmler / NewtonsoftJsonHybridCacheSerializer.cs
Created September 17, 2025 12:46
HybridCache - Newtonsoft Json.NET Serializer
using System.Buffers;
using System.Text;
using Microsoft.Extensions.Caching.Hybrid;
using Newtonsoft.Json;
public class NewtonsoftJsonHybridCacheSerializer<T> : IHybridCacheSerializer<T>
{
public T Deserialize(ReadOnlySequence<byte> source)
{
return JsonConvert.DeserializeObject<T>(Encoding.UTF8.GetString(source));
@DerStimmler
DerStimmler / GermanTimeProvider.cs
Created March 25, 2025 16:41
German TimeProvider C# / .NET
public class GermanTimeProvider : TimeProvider
{
private static readonly TimeZoneInfo GermanTimeZone = TimeZoneInfo.FindSystemTimeZoneById(
"Central European Standard Time"
);
public override TimeZoneInfo LocalTimeZone => GermanTimeZone;
}
@DerStimmler
DerStimmler / ghostty-animation-frames.json
Last active March 24, 2025 19:02
Ghostty Animation
This file has been truncated, but you can view the full file.
{
"frames": [
[
" ",
" ",
" <span class=\"c\">+++==*%%%%%%%%%%%%*==+++</span> ",
" <span class=\"c\">++****++</span> <span class=\"c\">++****++</span> ",
" <span class=\"c\">++**++</span> <span class=\"c\">++**++</span> ",
" <span class=\"c\">xx**+=</span> o+*%$@@@@@@$%*+o <span class=\"c\">=+**xx</span> ",
" <span class=\"c\">xx**oo</span> ·=$@@@@@@@$$$$$$$$@@@@@@@$=· <span class=\"c\">oo**xx</span> ",
@DerStimmler
DerStimmler / pve-host-backup-script.sh
Last active December 8, 2024 00:00
Proxmox host backup script
#!/bin/sh
BACKUP_PATH="/mnt/backups/pve-host"
BACKUP_FILE="pve-host"
KEEP_DAYS=35
LOG_PATH="/var/log/pve-host-backup.log"
PVE_BACKUP_SET="/etc/pve /etc/lvm /etc/modprobe.d /etc/network/interfaces /etc/vzdump.conf /etc/sysctl.conf /etc/resolv.conf /etc/ksmtuned.conf /etc/hosts /etc/hostname /etc/cron* /etc/aliases"
PVE_CUSTOM_BACKUP_SET="/var/lib/pve-cluster /root /var/spool/cron /etc/passwd /etc/lxc/*.conf"
# Ensure the backup directory exists
@DerStimmler
DerStimmler / reset.css
Last active April 4, 2026 21:52
CSS reset
/* makes sizing simpler */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* remove default spacing */
/* force styling of type through styling, rather than elements */
* {
@DerStimmler
DerStimmler / DynamicIvAesProvider.cs
Created January 24, 2023 13:14
Encryption Provider that supports dynamic initialization vector for EntityFrameworkCore.DataEncryption >= 4.0.0
using System.IO;
using System.Security.Cryptography;
using Microsoft.EntityFrameworkCore.DataEncryption;
using Microsoft.EntityFrameworkCore.DataEncryption.Providers;
public class DynamicIvAesProvider : IEncryptionProvider
{
/// <summary>
/// AES block size constant.
/// </summary>
@DerStimmler
DerStimmler / de.json
Created December 15, 2021 14:46
German translation for PrimeNG
{
"primeng": {
"startsWith": "Startet mit",
"contains": "Enthält",
"notContains": "Enthält nicht",
"endsWith": "Endet mit",
"equals": "Gleich",
"notEquals": "Nicht gleich",
"noFilter": "Kein Filter",
"lt": "Kleiner als",