Skip to content

Instantly share code, notes, and snippets.

View jakzal's full-sized avatar

Jakub Zalas jakzal

View GitHub Profile
@jakzal
jakzal / build.yml
Last active July 14, 2025 11:24
Build, package, deploy a versioned service (example)
name: Build
on:
push:
branches: ["main"]
tags: ["*"]
pull_request:
jobs:
version:
@jakzal
jakzal / 01 - LearnPostgresListenNotifyTest.cs
Last active December 12, 2024 11:55
Learn how to use LISTEN/NOTIFY in PostgreSQL
using KaffeineLabs.MQ.Outbox;
using KaffeineLabs.Testcontainers.PostgreSql;
using FluentAssertions;
using Microsoft.EntityFrameworkCore;
using Npgsql;
using Xunit.Abstractions;
namespace KaffeineLabs.MQ.Tests.Outbox;
public class LearnPostgresListenNotifyTest(PostgreSqlFixture postgreSql, ITestOutputHelper testOutputHelper)
@jakzal
jakzal / 01 - exposed - ExposedPaymentRepository.kt
Created August 24, 2024 11:24
Using Testcontainers with Kotlin Exposed
package payment.exposed
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.transactions.transaction
import org.junit.jupiter.api.BeforeEach
import org.testcontainers.containers.PostgreSQLContainer
import org.testcontainers.junit.jupiter.Container
import org.testcontainers.junit.jupiter.Testcontainers
import org.testcontainers.utility.DockerImageName
import payment.Payment
@jakzal
jakzal / 1 Readme.md
Last active December 13, 2023 21:18
Nextcloud behind Cloudflare on a Raspberry PI
@jakzal
jakzal / 00 - Object-oriented event sourcing.adoc
Last active June 3, 2025 14:10
Object-oriented event sourcing
@jakzal
jakzal / 00 - Deriving state from events.adoc
Last active June 3, 2025 14:09
Deriving state from events
@jakzal
jakzal / Singleton.java
Created March 23, 2023 10:32
Singleton Supplier
package com.kaffeinelabs.function;
import java.util.function.Supplier;
public class Singleton<T> implements Supplier<T> {
private final Supplier<? extends T> factory;
private T instance = null;
private Singleton(final Supplier<? extends T> factory) {
this.factory = factory;
@jakzal
jakzal / DebeziumContainers.java
Created January 9, 2023 13:19
Learn how to run Debezium with PostgreSQL and Kafka with Junit 5
package com.kaffeinelabs.debezium;
import io.debezium.testing.testcontainers.DebeziumContainer;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.KafkaContainer;
import org.testcontainers.containers.Network;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.lifecycle.Startable;
import org.testcontainers.utility.DockerImageName;
@jakzal
jakzal / README.md
Created January 12, 2022 14:42
OpenSearch terraform configuration for local development