Skip to content

Instantly share code, notes, and snippets.

View robertkirkman's full-sized avatar
🇮🇪

Robert Kirkman robertkirkman

🇮🇪
View GitHub Profile
@robertkirkman
robertkirkman / Android14-pointerlocationisshowtapsclone.patch
Last active July 28, 2025 01:02
"Show taps" cosmetic skin for the "Pointer location" Android developer mode widget
diff --git a/core/java/com/android/internal/widget/PointerLocationView.java b/core/java/com/android/internal/widget/PointerLocationView.java
index e65b4b65..6e6a9517 100644
--- a/core/java/com/android/internal/widget/PointerLocationView.java
+++ b/core/java/com/android/internal/widget/PointerLocationView.java
@@ -18,7 +18,10 @@ package com.android.internal.widget;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
@robertkirkman
robertkirkman / a-README.md
Last active May 23, 2026 03:46
Gentoo Mod: wayland-free Gentoo.

Warning

This is a downstream solution to https://bugs.gentoo.org/923305. Upstream should continue to focus on supporting systems where wayland is unmasked because this masked-wayland configuration is NOT necessary for normal users. Do not ask for support with this in Gentoo channels, instead use the comments section here.

How to use Gentoo without installing Wayland - period.

  1. Add the package.mask and package.use lines below to their respective locations in /etc/portage/
  2. Save each X-Y.patch file in a new folder in /etc/portage/patches/ following the pattern /etc/portage/patches/X/Y/ - you can reference Gentoo Package Search and Gentoo Wiki if you are unsure how to use /etc/portage/patches/
  3. Save emerge-sync-purge-wayland.sh anywhere with any filename and from now on, run it instead of emerge --sync
  4. Run emerge-sync-purge-wayland.sh, then perform a world upgrade with `emerge -avuDU
@robertkirkman
robertkirkman / README.md
Last active September 25, 2024 22:36
How to get 100% uncompromising GNU/Linux graphics stability on RDNA1

My stable AMD Radeon RX 5700 XT settings

Note

This is my personal workaround to the nebulous [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx_0.0.0 timeout which I have not experienced since the first day, after many months of trial and error, that I started using these exact settings, albeit with older versions of Gentoo's LTS kernel and stable graphics packages, on May 7th 2023, 1 year and 4 months ago. Some people claim that the situation on RDNA2 and RDNA3 is different, so if you have a similar but non-RDNA1 GPU, you might be able to find similar but slightly different workarounds for your system in that freedesktop gitlab issue.

@robertkirkman
robertkirkman / tap0.sh
Last active May 1, 2025 06:21
get a /sys/class/net/tap0 bridge on Linux in 15 seconds no nonsense
ip a # choose physical device to bridge
brctl addbr br0
brctl addif br0 enp6s0 # physical device to bridge
ip a add 192.168.1.130/24 dev br0 # choose new ip
modprobe tun
ip tuntap add mode tap tap0
brctl addif br0 tap0
ip link set br0 up
ip link set tap0 up
ip route add default via 192.168.1.1 dev br0 # default gateway
@robertkirkman
robertkirkman / Puppeteer-on-Android.md
Last active May 17, 2026 08:32
How To Run Node.js Puppeteer or Python Selenium On Android

Puppeteer Headless Mode

pkg install x11-repo
pkg install nodejs firefox
@robertkirkman
robertkirkman / update-alternatives.c
Last active October 9, 2025 00:29
Standalone update-alternatives.c for termux-pacman
/*
* update-alternatives
*
* Copyright © 1995 Ian Jackson <ijackson@chiark.greenend.org.uk>
* Copyright © 2000-2002 Wichert Akkerman <wakkerma@debian.org>
* Copyright © 2006-2017 Guillem Jover <guillem@debian.org>
* Copyright © 2008 Pierre Habouzit <madcoder@debian.org>
* Copyright © 2009-2010 Raphaël Hertzog <hertzog@debian.org>
*
* This program is free software; you can redistribute it and/or modify