Skip to content

Instantly share code, notes, and snippets.

@buffuwei
buffuwei / self-signed-certificate-with-custom-ca.md
Created April 9, 2024 10:01 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@buffuwei
buffuwei / ThreadPoolTaskExecutorWithMdcPropagation.java
Created December 17, 2021 03:55 — forked from pismy/ThreadPoolTaskExecutorWithMdcPropagation.java
SLF4J Tool: ThreadPoolExecutor that propagates MDC from calling thread to executor thread
import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;