Skip to content

Instantly share code, notes, and snippets.

@joshenders
joshenders / meta_portal_plus_landscape_apk_patch.md
Last active June 21, 2026 02:34
Force-landscape Sideload of a Portrait-Locked Play Store App on Meta Portal Plus (2021)

Force-landscape Sideload of a Portrait-Locked Play Store App on Meta Portal Plus (2021)

The 2021 Meta Portal Plus (codename cipher) has a panel fixed in landscape orientation with no rotation, only a tilt mechanism. Some apps are locked to portrait-only mode and these instructions outline how to download and modifify apps from the Google Play Store to force landscape mode.

Note

The Target app in this example is jp.or.nhk.nhkworld.tv (NHK WORLD TV), versionCode 21259021. These instructiosn were preapred on macOS, so sed uses the BSD -i '' form; substitute -i for GNU sed.

Dependencies

@joshenders
joshenders / tailscale_udp_optimization.md
Last active June 17, 2026 22:26
How to improve tailscale throughput via transport layer offloading in OpenWrt 24.10

How to improve tailscale throughput via transport layer offloading in OpenWrt 24.10

Tailscale version 1.54 or later used with OpenWrt 24.10 or later (which uses kernel 6.6) enables UDP throughput improvements via transport layer offloading.

Namely, tuning two features may show improved throughput:

  • rx-udp-gro-forwarding: Enables UDP Generic Receive Offload (GRO) forwarding, which aggregates incoming UDP packets to reduce CPU overhead on receive.
  • rx-gro-list: If disabled (off), it prevents multiple flows from being aggregated simultaneously which simplifies flow handling and performance on some workloads.

[!NOTE]

@joshenders
joshenders / openwrt_incus_multiwan.md
Last active August 2, 2025 08:58
OpenWrt 24.10 Setup Under Incus 6.0.x on Debian 12 with PCI Passthrough

OpenWrt 24.10 Setup Under Incus 6.0.x on Debian 12 with PCI Passthrough

Install lxd via apt and configure

apt install incus

Configure lxd

The example config below uses the dir storage driver and no bridging since we'll be using PCI passthrough.

@joshenders
joshenders / flatcar_incus_setup.md
Last active June 1, 2025 05:27
Flatcar Container Linux UEFI Setup Under Incus on Debian

Flatcar Container Linux Setup Under Incus on Debian

In case you missed it, Canonical relicensed LXD under AGPLv3 in December 2023 with a mandatory CLA. The LXD project was hard forked as Incus and licensed under an Apache 2.0 License.

Incus is maintained by the same team of developers that first created LXD and is recommended for new users going forward.

Install and configure

Borrowed from here.

@joshenders
joshenders / swap.md
Last active June 19, 2026 13:11
Stop making swap partitions

Stop making swap partitions—use swap files instead!

Swap files have had the same performance characteristics as swap partitions for more than 20 years and yet, linux distributions continue to encourage the use of swap partitions during install.

Swap files are easier to use/add/remove/modify/extend after installation. They're better in every way––use swap files!

  1. Create a swap file.

💡 You can use dd for this too but if your filesystem supports it, fallocate is faster.

@joshenders
joshenders / openwrt_lxd_multiwan.md
Last active July 30, 2025 18:22
OpenWrt 23.05.x Setup Under LXD 5.x on Debian 12 with PCI Passthrough
@joshenders
joshenders / lldb-hand-rolled-headers.md
Created October 18, 2020 21:05 — forked from zcutlip/lldb-hand-rolled-headers.md
Importing Hand-Rolled C Header Files in LLDB

Importing Hand-Rolled C Header Files in LLDB

Scenario

  • We're debugging a dylib, libhello.dylib
  • The dylib is linked from hello
  • The exported function is helloworld()
  • We do not have source, but have reversed a struct from the library and created a hand-crafted header file

Header File

@joshenders
joshenders / devkitpro_setup_macos.md
Last active November 17, 2025 19:29
Getting started with Nintendo Switch Development using devkitpro on macOS

Getting started with Nintendo Switch Development using devkitpro on macOS

Prerequsite: Ensure Xcode command line tools are installed

xcode-select --install

Install the devkitpro Package Manager

@joshenders
joshenders / make_ipxe_uefi_usb.md
Created August 29, 2017 08:10 — forked from AdrianKoshka/make_ipxe_uefi_usb.md
Making a UEFI bootable iPXE USB drive

Making a UEFI bootable iPXE USB drive

Build the UEFI executable for iPXE

# First we'll clone iPXE
$ git clone git://git.ipxe.org/ipxe.git
# Go into the src directory of the cloned git repo
$ cd ipxe/src
# Compile the UEFI iPXE executable
@joshenders
joshenders / varnish.init.patch
Last active December 13, 2016 01:22
Patch for varnish-3.0.2-0ubuntu0.1 to enable safe stop
--- debian/varnish.init 2016-12-13 01:13:34.465123880 +0000
+++ debian/varnish.init.new 2016-12-13 01:18:50.215749771 +0000
@@ -88,8 +88,10 @@
log_daemon_msg "Reloading $DESC" "$NAME"
if /usr/share/varnish/reload-vcl -q; then
log_end_msg 0
+ return 0
else
log_end_msg 1
+ return 1