Skip to content

Instantly share code, notes, and snippets.

View lretq's full-sized avatar
🐢

lretq

🐢
  • Germany
View GitHub Profile
@kassane
kassane / std_log.md
Last active April 14, 2025 11:21 — forked from leecannon/std_log.md
Quick overview of Zig's `std.log`

A simple overview of Zig's std.log for Zig v0.12.0 or higher

Logging functionality that supports:

  • If a log message should be printed is determined at comptime, meaning zero overhead for unprinted messages (so just leave the code peppered with debug logs, but when it makes sense scope them; so downstream users can filter them out)
  • Scoped log messages
  • Different log levels per scope
  • Overrideable log output (write to file, database, etc.)
  • All the standard std.fmt formatting magic

Basic Usage:

@nathan818fr
nathan818fr / haproxy.cfg
Last active April 2, 2025 06:23
Decoding the Minecraft handshake with HAProxy (protocol version, hostname, next-state) to choose which backend to use.
global
lua-load /path/to/haproxy_minecraft.lua
[...]
defaults
[...]
frontend mc_listener
bind *:25565
mode tcp
@Obydux
Obydux / Fabric-Quilt-Server-Optimization.md
Last active April 21, 2025 17:14
Fabric/Quilt Server Optimization

Fabric/Quilt Server Optimization

This has updated for 1.20.4, all of the optimization mods mentioned here are compatible with each other and don't affect vanilla behaviour by default.

Mods

@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active April 16, 2025 07:20
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@sfan5
sfan5 / alpine-container.sh
Last active February 15, 2025 13:49
Create bootable systemd-nspawn containers with Alpine, Arch Linux or Ubuntu
#!/bin/bash -e
# Creates a systemd-nspawn container with Alpine
MIRROR=http://dl-cdn.alpinelinux.org/alpine
VERSION=${VERSION:-v3.21}
APKTOOLS_VERSION=2.14.6-r3
wget_or_curl () {
if command -v wget >/dev/null; then
@mbbx6spp
mbbx6spp / pdsh.md
Last active February 13, 2025 04:27
Tutorial on pdsh. I am revising this for pdsh from my previous tutorial on dsh from 2013 found here: https://gist.github.com/mbbx6spp/6181003

Parallel Distributed SHell (pdsh)

Similar to ansible command but allows you to use any command that will work in your shell. Not tied to specific configuration management tooling, just SSH and your default shell on remote systems. Just works. I <3 it :)

What does it do?

Runs commands across potentially many machines. Allows you to organize your servers/VMs/instances into groups very easily.

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main