Skip to content

Instantly share code, notes, and snippets.

View kylemanna's full-sized avatar

Kyle Manna kylemanna

View GitHub Profile
@kylemanna
kylemanna / build-friendlywrt.md
Last active September 11, 2023 12:24
FriendlyElec NanoPi R5S Linux PTP Support

Build Notes

Environment

Use systemd-nspawn on Arch Linux with debootstrap:

sudo debootstrap --include=systemd-container --components=main,universe jammy ubuntu22.04-rk3568 http://archive.ubuntu.com/ubuntu/
@kylemanna
kylemanna / connmanctl.md
Last active June 27, 2023 23:12
Connmanctl Cheat Sheet
@kylemanna
kylemanna / README.md
Last active May 10, 2023 13:59
Xilinx Get EFUSE DNA Device ID: vivado -mode batch -source get_dna.tcl

Vivado UI

Vivado UI

Command Line

From command line: vivado -mode batch -source get_dna.tcl

Verilog Primitive

@kylemanna
kylemanna / tailscale-default-unroute.py
Last active May 8, 2023 05:37
Tailscale Per Host Default Router Disabler
#!/usr/bin/env python3
""" Tailscale Per Host Default Router Disabler
Tailscale allows a single tailnet wide "Override local DNS" setting that works
great for mobile and random cloud machines I have. However, my more elaborate
setups require the ability to turn this off and use local DNS as the default
route.
Unfortuantely with Tailscale as of v1.40.0 there's only two options:
1. Tailnet wide "local DNS override" (Turns out tailscale's internal resolver
@kylemanna
kylemanna / PassThroughAsyncSpdifWithUSB.ino
Last active May 1, 2023 05:58
Teensy 4.0 Arduino sketchy for TOSLINK (SPDIF) Input -> USB + SPDIF Output
// Teensy Library to stream Optical TOSLINK input simultaenously to two outputs:
// * USB Audio
// * SPDIF
//
//
// Test Setup:
// * Input: Google Chromecast Audio TOSLINK Optical @ 48 KHz -> PLR135/T10 -> Teensy SPDIF_IN
// * INput: USB serial console to set gain
// * Output: Teensy SPDIF_OUT -> Khadas Tone Board RCA SPDIF input -> Analog Speaker Amp
// * Output: USB -> Arch Linux (5.10 kernel) with Pulseaudio + Audacity
@kylemanna
kylemanna / emmc_burn.c
Created March 12, 2014 21:28
EMMC Lifetime Test Utility
#include <unistd.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <stdint.h>
#include <sys/types.h>
@kylemanna
kylemanna / arch-linux-install.md
Last active April 19, 2023 04:40 — 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
kylemanna / 0_gluetun_network_bug.md
Last active March 29, 2023 01:43
Bug notes for gluetun multiple networks issue.

README

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
kylemanna / 20-radeon.conf
Created August 18, 2014 05:09
Adventures with a flaky Radeon 4200 HD GPU on Linux
#
# Xorg Config for an Integrated AMD / ATI Radeon HD 4200 on a MSI 785GTM-E45
#
#
# Use special reduced timings for 1080p HDMI output as it gets rid of screen
# corruption on the Radeon 4200 HD (Win7 never had problems with same cabling).
#
# Other symptoms included skipping audio and periodic screen corruption in XBMC
# as well as general use.
#
@kylemanna
kylemanna / gist:1376913
Created November 18, 2011 16:16
Reverse endianess on a binary file
#!/bin/sh
# 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