Skip to content

Instantly share code, notes, and snippets.

@dhjw
dhjw / orange-pi-tun-module.md
Last active April 21, 2026 12:31
Compiling the tun.ko module on Orange Pi for OVPN clients, etc.

First, you need the linux-headers for your kernel. I spent a long time searching the net before finding a .deb in /opt. Try to install the .deb sudo dpkg -i linux-headers*deb. Likely some things will be missing. I had to install the obvious and also lirc. Finally the deb will install.

Now get tun.c and compile the module tun.ko

Go to https://github.com/orangepi-xunlong/linux-orangepi and click your exact kernel under branches (see uname -r)

Navigate to drivers/net and click the file tun.c

Copy the raw link and use it in place of URL below.

# pip install sdbus-notifications
from sdbus_block.notifications import FreedesktopNotifications
iface = FreedesktopNotifications() # default bus works, but could do `from sdbus import sd_bus_open_user` and pass sd_bus_open_user()
app_name = ''
replace_id = 0 # new
app_icon = ''
summary = 'title'
body = 'body'
@dhjw
dhjw / twitter-unmute-or-unblock-all
Last active May 2, 2024 05:56
Console Javascript to unblock or unmute all Twitter/X accounts
# TODO: loop until b is empty, automatically scroll down with a short delay
# click all visible Unblock buttons
var b = document.querySelectorAll("div[aria-label='Blocked']")
for (i = 0; i < b.length; i++) b[i].click();
# click all visible Unmute buttons
var b = document.querySelectorAll("div[aria-label^='Unmute']")
for (i = 0; i < b.length; i++) b[i].click();
@dhjw
dhjw / donate2.php
Last active May 2, 2024 05:54
Accept BCH donations and display message instantly
<?php
// address used throughout page and script. could also just be hardcoded without PHP.
$addr = 'qqvppp5pe4sce8qyvyncdrhekgkxcyw2hczvervmp8';
?>
<html>
<head>
<title>Donate BCH</title>
<style>
body { font:16pt arial; }
#address { font:18pt arial; }
@dhjw
dhjw / donate.php
Last active September 23, 2019 02:42
Accept BCH donations
<?php
// address used throughout page and script. could also just be hardcoded without PHP.
$addr = 'qqvppp5pe4sce8qyvyncdrhekgkxcyw2hczvervmp8';
?>
<html>
<head>
<title>Donate BCH</title>
<style>
body { font:16pt arial; }
#address { font:18pt arial; }