Skip to content

Instantly share code, notes, and snippets.

View dittodhole's full-sized avatar

Andreas Niedermair dittodhole

View GitHub Profile
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@davidfowl
davidfowl / Example1.cs
Last active September 2, 2024 12:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)

Advanced

editorconfig name possible values
dotnet_sort_system_directives_first true , false

Indentation Options

editorconfig name possible values
csharp_indent_block_contents true , false
csharp_indent_braces true , false
@skarllot
skarllot / net35-cf.md
Last active February 26, 2025 20:28
Build .NET Compact Framework 3.5

Install

Force MSBuild support

  • Copy files and directories from 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\*' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5';
  • Copy files from 'C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\Debugger\BCL\*' to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\CompactFramework' directory;
  • Create 'RedistList' directory inside created 'CompactFramework' directory;
  • Create 'FrameworkList.xml' inside 'RedistList' directory and type the following:
@ubergesundheit
ubergesundheit / readme.md
Last active May 19, 2025 18:11
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 17, 2025 06:10
set -e, -u, -o, -x pipefail explanation
@greenmoss
greenmoss / certbot-dns-mailcow
Last active April 13, 2025 10:34
This script renews letsecnrypt SSL certificates using Cloudflare dns-1 renewal. It assumes you are using Mailcow.
#!/usr/bin/env bash
# This script renews letsecnrypt SSL certificates using Cloudflare dns-1 renewal
# It assumes you are using Mailcow
set -euo pipefail
# REQUIRED set these:
[email protected]
your_domain=mail.your.domain # only tested with single domain
cloudflare_ini_path=/root/.cloudflare # add your Cloudflare file here, called cloudflare.ini
@andreibosco
andreibosco / yubikey-windows10.md
Last active February 19, 2025 21:19
Setting up Yubikey with SSH and Git on Windows 10 + Powershell
@phiresky
phiresky / tune.md
Last active December 7, 2024 08:34
SQLite performance tuning

You can scale a SQLite database to multiple GByte in size and many concurrent readers by applying the below optimizations.

Run these every time you connect to the db

(some are applied permanently, but others are reset on new connection)

pragma journal_mode = WAL;

Instead of writing directly to the db file, write to a write-ahead-log instead and regularily commit the changes. Allows multiple concurrent readers, and can significantly improve performance.

@martinsam16
martinsam16 / docker-wsl2.md
Last active July 14, 2025 02:48
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu