Skip to content

Instantly share code, notes, and snippets.

View oddmario's full-sized avatar

Mario oddmario

View GitHub Profile

Installing QEMU with the qemu-anti-detection patch

This procedure was done on an Ubuntu 24.04 system


Install the dependencies required for the building process:

sudo apt install git build-essential ninja-build python3-venv libglib2.0-0 libglib2.0-dev flex bison libpixman-1-dev libsdl2-dev libsdl2-image-dev mesa-common-dev libglfw3-dev libgles2-mesa-dev libgl-dev libepoxy-dev libpipewire-0.3-dev libspice-protocol-dev libspice-server-dev libvirglrenderer-dev libjson-c-dev libcmocka-dev libusbredirparser-dev libgtk-3-dev libusb-1.0-0-dev
@oddmario
oddmario / tune_go_http_server.md
Last active August 4, 2025 12:07
Tuning a Golang (Go) HTTP server

Tune a Go http.Server

by adjusting its default buffer sizes


In some situations, you may need to adjust the default buffer sizes of a Golang HTTP server.

Adjusting the default buffer sizes allows you to benefit from higher throughput and improve the performance of your HTTP servers overall.

For the cherry on the top,

@oddmario
oddmario / winefix.sh
Created July 13, 2024 11:09
Attempt to fix a corrupted Wineprefix
#!/bin/bash
killall -9 wine
mv ~/.wine ~/.winebak
wineboot
rm -rf ~/.wine/drive_*
mv -f ~/.winebak/drive_* ~/.wine
rm -rf ~/.wine/*.reg
mv -f ~/.winebak/*.reg ~/.wine
rm -rf ~/.winebak
@oddmario
oddmario / ANTI_MAGISK_ROOT_DETECTION.md
Last active February 9, 2025 13:01
Avoid Magisk root detection
@oddmario
oddmario / GRE_TUNNELS.md
Last active August 10, 2024 08:09
Setup a GRE tunnel between two Linux servers
@oddmario
oddmario / OPENVPN.md
Last active September 28, 2024 09:08
Stop routing all traffic through OpenVPN and use it on-demand using the tunnel interface name instead

Stop routing all traffic through OpenVPN and use it on-demand using the tunnel interface name instead

#!/bin/bash

# https://serverfault.com/questions/978701/setting-up-openvpn-as-an-interface-rather-than-routing-all-traffic-from-paid-vpn
# https://serverfault.com/questions/992624/vpn-client-doesnt-have-internet-connection

OVPN_TUN_INTERFACE_NAME="tun0"
@oddmario
oddmario / WARP.md
Last active April 28, 2025 15:21
Stop routing all traffic through Cloudflare WARP and use it on-demand using the tunnel interface name instead

Stop routing all traffic through Cloudflare WARP and use it on-demand using the tunnel interface name instead

#!/bin/bash

# https://serverfault.com/questions/978701/setting-up-openvpn-as-an-interface-rather-than-routing-all-traffic-from-paid-vpn
# https://serverfault.com/questions/992624/vpn-client-doesnt-have-internet-connection

WARP_INTERFACE_NAME="CloudflareWARP"
@oddmario
oddmario / extract_original_audio.sh
Last active December 10, 2024 12:23
Extract the original audio track from a video using ffmpeg + ffprobe
#!/bin/bash
# Check if the correct number of arguments is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <input_file> <output_file>"
exit 1
fi
input="$1"
output="$2"