Skip to content

Instantly share code, notes, and snippets.

View theodric's full-sized avatar
🎯
Shoobydoowop

þēodrīċ theodric

🎯
Shoobydoowop
View GitHub Profile
@theodric
theodric / nuke-residual.sh
Created May 9, 2025 10:07
Gets rid of all leftover unattached package cruft
#!/bin/bash
apt-get -yf remove --purge $(dpkg -l | awk '/^rc/{print $2}')
@theodric
theodric / kbd-backlight.service
Created April 13, 2025 18:15
systemd service file to crank 2015 MacBook Air's keyboard backlight to the max during system bringup
[Unit]
Description=set MacBook Air keyboard backlight brightness to max on boot
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo 255 > /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness'
RemainAfterExit=true
[Install]
@theodric
theodric / kernelconfig.io-dark-mode.js
Created March 22, 2025 16:59
A Violenmonkey dark mode userstyle for kernelconfig.io
// ==UserScript==
// @name kernelconfig.io Dark Mode v2
// @namespace Curses!
// @version 1.2
// @description kernelconfig.io dark mode userstyle
// @author Theodric + Cursor
// @match https://www.kernelconfig.io/*
// @grant GM_addStyle
// ==/UserScript==
@theodric
theodric / gist:a2369c2b21ff5c2ceb6c5cfa70a0b7ea
Created March 11, 2025 19:51
YouTube on mobile not saving watch history? Running Pi-Hole?
YouTube on mobile not saving watch history? Running Pi-Hole? That's why.
Whitelist:
s.youtube.com
video-stats.google.com
video-stats.l.google.com
pihole -w s.youtube.com video-stats.l.google.com video-stats.google.com
https://discourse.pi-hole.net/t/pi-hole-on-its-default-behavior-prevents-the-youtube-to-record-the-history-on-iphones-on-android-history-works-perfectly-fine/57531
@theodric
theodric / userscript-list.txt
Created March 11, 2025 19:47
Required userscripts
https://greasyfork.org/en/scripts/447614-youtube-hide-download-clip-and-thanks-including-promote-buttons
@theodric
theodric / touchegg.conf
Created March 3, 2025 05:10
~/.config/touchegg.conf for vaguely c.2012 Mac-like gestures on Linux/X11
<touchégg>
<settings>
<!--
Delay, in milliseconds, since the gesture starts before the animation is displayed.
Default: 150ms if this property is not set.
Example: Use the MAXIMIZE_RESTORE_WINDOW action. You will notice that no animation is
displayed if you complete the action quick enough. This property configures that time.
-->
<property name="animation_delay">150</property>
@theodric
theodric / [email protected]
Created January 31, 2025 13:10
TightVNC systemd unit file for Debian
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=someusername
Group=somegroupname
WorkingDirectory=/home/someusername
@theodric
theodric / LOCAL-Train_a_GPT_2_Text_Generating_Model_w_GPU.ipynb
Created January 30, 2025 16:25
A local-ized version of Max Woolf's GPT-2 training Colab notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theodric
theodric / vncserver.service
Created January 20, 2025 14:12
Simple systemd unit file to run vncserver as root on boot (lol security)
[Unit]
Description=VNC Server
After=network.target
[Service]
Type=forking
Environment="HOME=/root"
ExecStart=/usr/bin/vncserver
ExecStop=/usr/bin/vncserver -kill :1
Restart=always
@theodric
theodric / tpmorse.py
Last active January 2, 2025 10:39
ThinkPad lid dot Morse code transmitter - python3 & Linux + thinkpad_acpi required
#!/usr/bin/env python3
# theodric 2025-01-01
# ThinkPads have a red dot on the lid that lights up when the system is powered on.
# Use it to send messages in Morse code!
import sys
import time
# path to the led brightness file
LED_BRIGHTNESS_PATH = "/sys/devices/platform/thinkpad_acpi/leds/tpacpi::lid_logo_dot/brightness"