Skip to content

Instantly share code, notes, and snippets.

View siwonpawel's full-sized avatar
🏠
Working from home

Paweł Siwoń siwonpawel

🏠
Working from home
  • CDQ Poland Sp. z o.o.
  • Poland, Szczecin
  • 16:02 (UTC +02:00)
View GitHub Profile
@plamentotev
plamentotev / jq_cheat_sheet.adoc
Last active August 13, 2025 20:54
jq Cheat Sheet

jq Cheat Sheet

jq is useful utility, but I use it infrequently and each time I have to check what was the filters syntax. This cheat sheet helps we to recall what is the expression that I need. Hopefully it would help others too. For full guide refer to the official jq manual.

All the jq you (usually) need

Given the following JSON:

@jdoss
jdoss / LUKS_and_TPM2_with_Fedora.md
Last active August 27, 2025 05:39
Decrypt LUKS volumes with a TPM on Fedora Linux

Decrypt LUKS volumes with a TPM on Fedora Linux

This guide allows you to use the TPM on your computer to decrypt your LUKS encrypted volumes. If you are worried about a cold boot attack on your hardware please DO NOT use this guide with your root volume!

Preflight Checks

Verify that you have a TPM in your computer:

# systemd-cryptenroll --tpm2-device=list
PATH DEVICE DRIVER

Hello, Diagrams!

GitHub recently added support for including Mermaid diagrams in Markdown files. The good news is that it works for AsciiDoc files as well. Here is an example:

sequenceDiagram
    participant Alice
    participant Bob
@Nydan
Nydan / gracefull_webserver.go
Last active December 21, 2020 19:19
Golang http server with gracefull exit.
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"syscall"