Skip to content

Instantly share code, notes, and snippets.

View AlexZeitler's full-sized avatar
Building stuff

Alexander Zeitler AlexZeitler

Building stuff
View GitHub Profile
AlexZeitler /
Created June 19, 2024 09:19 — forked from ebicoglu/
Implementing Passwordless Authentication in ASP NET Core Identity

Implementing Passwordless Authentication in ASP.NET Core Identity

To allow a user login with a magic URL, you need to implement a custom token provider. I'll show you how to add a custom token provider to authenticate a user with a link.


Create a class named PasswordlessLoginProvider in your *.Web project.


AlexZeitler / MartenTestDatabase.cs
Created May 3, 2024 13:07
Marten Test database setup
public class PostgresAdministration
private readonly string _connectionString;
public PostgresAdministration(
string connectionString
_connectionString = connectionString;
AlexZeitler / FanOutSample.cs
Created April 12, 2024 14:41 — forked from flew2bits/FanOutSample.cs
FanOut sample for Dates
using Marten;
using Marten.Events.Projections;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
var builder = Host.CreateApplicationBuilder();
builder.Services.AddMarten(opt => {
opt.Connection(builder.Configuration.GetConnectionString("Marten") ?? "Host=localhost; Port=5433; User Id=postgres; Password=pgsql");
AlexZeitler /
Last active November 24, 2023 07:27
Throw away / disposable email domain list with Postgres import
# download the files
curl -o file1.txt
curl -o file2.js.txt
curl -o file3.txt
# remove first and last line, remove quotes, commas and spaces
sed -e '1d;$d' file2.js.txt | awk '{ gsub(/["\, ]/, ""); print }' > file2.txt
AlexZeitler / brevo.ts
Created July 14, 2023 15:03 — forked from marentdev/brevo.ts
[Node.JS] [TypeScript] [Axios] Brevo Class API using swagger-typescript-api
/* eslint-disable */
/* tslint:disable */
* ---------------------------------------------------------------
* ## ##
* ## AUTHOR: acacode ##
* ## SOURCE: ##
* ---------------------------------------------------------------
AlexZeitler / MartenProjections.cs
Last active October 13, 2022 07:14
MartenDb projections
public abstract class AppUser
public Guid Id { get; set; }
public class RegisteredUser : AppUser
public void Apply(Registered registered)
Username = registered.Username;
AlexZeitler / Rider
Created December 31, 2021 13:29
Rider commandline launcher
#!/usr/bin/env python
# Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
import os
import socket
import struct
import sys
import traceback
# See com.intellij.idea.SocketLock for the server side of this interface.

Tenant Bridges

This document defines a mechanism to establish multiplexed, platform-level information flow between the tenant scopes of different, multitenant platform-as-a-service (PaaS) or software-as-a-service (SaaS) systems. In particular, this specification introduces the concept of a tenant-bridging “channel” that is established as a communication link between the tenants of two cooperating platforms. While the mechanism defined here is quite simple, the solved problem requires quite a bit of context setting:

What are we solving?

The "cooperating platforms" are commonly from different cloud service vendors and are addressing different customer scenarios. Examples might be enterprise resource planning (ERP) on one side and general-purpose application hosting on the other. A scenario to enable might be for the ERP system to be easily extensible with event-driven serverless functionality hosted on the other platform.

In such a scenario, it will likely be the same customer organization who is a te

AlexZeitler / vscode-italics.json
Created July 12, 2021 15:30 — forked from dev01d/vscode-italics.json
VSCode italics in (almost) any theme
// All you need to do is add a font that has pretty good itlaics support i.e Fira, Operator, etc. and then add these two params to your existing User settings.
"editor.fontFamily": "'Operator Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.tokenColorCustomizations": {
"textMateRules": [
"scope": [
AlexZeitler / set-keycloak-client-secret.groovy
Created July 11, 2021 19:02 — forked from goeh/set-keycloak-client-secret.groovy
Inject client secrets from a local file into a Keycloak Realm Export (JSON) file
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
def jsonSlurper = new JsonSlurper()
def secrets = jsonSlurper.parse(new File(args[1] ?: "secrets.json")).clients.inject([:]) { map, c -> map[c.client] = c.secret; map }
def realm = jsonSlurper.parse(new File(args[0]))
for(client in realm.clients) {
if(secrets[client.clientId]) {