Skip to content

Instantly share code, notes, and snippets.


Kyle Manna kylemanna

View GitHub Profile
kylemanna /
Last active March 26, 2023 05:46
Bug notes for gluetun multiple networks issue.



The gluetun container doesn't work correctly with multiple networks attached.

This is an example of a working and broken config with only minor differences.

Expected Output

kylemanna /
Last active March 16, 2023 05:32 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
kylemanna /
Last active March 14, 2023 23:30 — forked from drmalex07/
An example network service with systemd-activated socket in Python. #systemd #python #socket #socket-activation


The example below creates a TCP server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.

An example server

Create an simple echo server at ~/tmp/foo/

kylemanna /
Last active March 14, 2023 20:57
FriendlyElec NanoPi R5S Linux PTP Support

Build Notes


Use systemd-nspawn on Arch Linux with debootstrap:

sudo debootstrap --include=systemd-container --components=main,universe jammy ubuntu22.04-rk3568
kylemanna /
Last active March 13, 2023 00:45
Connmanctl Cheat Sheet
kylemanna / gist:1376913
Created November 18, 2011 16:16
Reverse endianess on a binary file
View gist:1376913
# Following command will reorder 32 bit words from little endian to big endian
# This is needed on TI81xx platforms to convert a standard LE bootloader/SPL/MLO
# to a byte ordering the works via SPI flash
arm-none-linux-gnueabi-objcopy -Ibinary --reverse-bytes=4 MLO MLO.spi
# Output:
# $ hexdump -C MLO | head -n2
kylemanna /
Last active February 18, 2023 19:18
Archive with tar + 7z + max compression


7-zip doesn't preserve the Linux/Unix owner/group of files and possibly other details. Use tar instead because it's designed to preserve these things, then just 7zip the tar archive.

Create the archive

tar cf - --exclude=\*.o -v directory | 7z a -si -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on directory.tar.7z
kylemanna / purge.wolfram-engine.txt
Created August 2, 2014 21:46
Raspberry Pi + wolfram-engine => Wasted Space
View purge.wolfram-engine.txt
pi@rpi0 ~ $ sudo apt-get purge wolfram-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 454 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 77272 files and directories currently installed.)
kylemanna / ingress.nft
Last active February 4, 2023 09:21
ATT UVerse Disable Drop DHCP for temproary address on BGW320 and block Bogons/DDoS packets using nftables
View ingress.nft
#!/usr/sbin/nft -f
# Can't block DHCP like a normal service beacuse it use raw sockets and bypasses nftables filter chains. Instead use and ingress chain.
flush table netdev filter
table netdev filter {
# Earliest filtering chain
chain ingress {
type filter hook ingress device wan0 priority -500;
kylemanna /
Created November 30, 2012 00:03
Serial Proxy Server
#!/usr/bin/env python
This python script opens two serial ports, specified with arguments 1 and 2
on the command line. It forwards data between the two serial ports as if it's
just a wire.
Usage: ./ /dev/ttyUSB0 /dev/ttyUSB1
import sys