Skip to content

Instantly share code, notes, and snippets.

View r0xsh's full-sized avatar
:shipit:
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

Antoine Bagnaud r0xsh

:shipit:
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
View GitHub Profile
@r0xsh
r0xsh / How to use a TPM on Linux.md
Created March 15, 2025 18:18 — forked from kmille/How to use a TPM on Linux.md
How to use a TPM on Linux

How to use a TPM on Linux

Prerequisites

  • I use it on Arch Linux (systemd 257.3-1)
  • Install dependency: yay tpm2-tools (5.7-1)

Do I have a TPM 2.0?

kmille@linbox:~ journalctl --boot --dmesg --grep=tpm_tis
@r0xsh
r0xsh / elixir-hls-server-demo.livemd
Created February 11, 2025 12:05 — forked from xorvo/elixir-hls-server-demo.livemd
Elixir HLS Server Example

HLS Server Demo - My TV Station

Mix.install([
  {:plug_cowboy, "~> 2.6"}
])
@r0xsh
r0xsh / README.md
Created August 12, 2024 10:15 — forked from markuman/README.md
๐Ÿ—บ๏ธ OSM - self host the entire planet ๐ŸŒŽ in ~30 minutes ๐Ÿš€

๐Ÿ—บ๏ธ OSM - self host the entire planet ๐ŸŒŽ in ~30 minutes ๐Ÿš€

TL;DR

mkdir osm
wget -O osm/planet.mbtiles https://hidrive.ionos.com/api/sharelink/download?id=SYEgScrRe
podman run -ti --rm -p 9000:9000 --name sms -v $(pwd)/osm/:/data/ registry.gitlab.com/markuman/sms:latest
firefox http://localhost:9000
@r0xsh
r0xsh / Dockerfile
Created January 14, 2024 13:25 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@r0xsh
r0xsh / gist:6ccea438559f83e7c1bfefd1863d90e5
Created October 23, 2023 19:56 — forked from Fusl/gist:3a708b8c32c9d5264fa0
Streaming audio output from Linux (Pulseaudio) to Windows
# Windows (receiver) side:
.\ffplay.exe -nodisp -ac 2 -acodec pcm_u8 -ar 48000 -analyzeduration 0 -probesize 32 -f u8 -i udp://0.0.0.0:18181?listen=1
# Linux (transmitter) side:
pactl load-module module-null-sink sink_name=remote
ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_u8 -ar 48000 -f u8 "udp://RECEIVER:18181"
pavucontrol # Change the default output to the Null sink or move single applications to this "output" device.

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@r0xsh
r0xsh / dyn_arr.h
Created February 28, 2023 19:27 — forked from nicebyte/dyn_arr.h
dyn_arr
#pragma once
#define DYN_ARR_OF(type) struct { \
type *data; \
type *endptr; \
uint32_t capacity; \
}
#if !defined(__cplusplus)
#define decltype(x) void*