Skip to content

Instantly share code, notes, and snippets.

View mio-19's full-sized avatar
๐Ÿ˜€
happy

Mio mio-19

๐Ÿ˜€
happy
  • Australian National Univerisity
  • Aotearoa New Zealand and Australia
  • 22:12 (UTC +13:00)
View GitHub Profile
@mio-19
mio-19 / shell.nix
Last active September 15, 2025 14:37 — forked from Arian04/shell.nix
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 21.0 for redfin (Google Pixel 5)
#
# IMPORANT NOTE: I had to use a pure shell for my builds to work, i.e: `nix-shell --pure` rather than `nix-shell`
#
# The build instructions are here: https://wiki.lineageos.org/devices/redfin/build
#
# Warning (from forked gist, was added August 1st 2018):
# The hardened NixOS kernel disables 32 bit emulation, which made me run into multiple "Exec format error" errors.
# To fix, use the default kernel, or enable "IA32_EMULATION y" in the kernel config.
#
@mio-19
mio-19 / force-inet4-or-inet6.c
Created May 7, 2024 07:20 — forked from winny-/force-inet4-or-inet6.c
Force IPv4 or IPv6 in applications such as Lynx
/*
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c
usage: LD_PRELOAD=/path/to/library.so program args ...
This file is in the public domain.
*/