Skip to content

Instantly share code, notes, and snippets.

View ClosedPort22's full-sized avatar

ClosedPort22

View GitHub Profile
@ClosedPort22
ClosedPort22 / overnight-charging-linux.md
Created April 5, 2026 09:20
Overnight charging mode on Lenovo ThinkBook 16 G7+ IAH 21TL on Linux

Overnight charging mode on Lenovo ThinkBook 16 G7+ IAH 21TL on Linux

Warning

This works in theory but has not been tested since I usually use the conservation mode instead. It is unknown whether this needs cooperation from userspace applications to learn the user's charging habits, but it appears unlikely.

Note

This requires the acpi_call kernel module.

@ClosedPort22
ClosedPort22 / 00-README.md
Last active April 5, 2026 08:53
Dust removal (fan speed control) on Lenovo ThinkBook 16 G7+ IAH 21TL on Linux

Dust removal (fan speed control) on Lenovo ThinkBook 16 G7+ IAH 21TL on Linux

Note

  • These scripts require the acpi_call kernel module.
  • Since the scripts cannot function without root privileges, I've included sudo in the shebang line to save having to type it every time. If you don't like this, you can simply remove it.

The remove-dust.sh script turns on the laptop embedded controller's built-in dust removal functionality, which basically involves running the fan at max speed for a few seconds followed by a brief pause. This process is repeated for about two minutes. It is useful for lowering the laptop's temperature as well as removing dust.

To cancel the process before the two minute mark, simply run remove-dust-cancel.sh.

@ClosedPort22
ClosedPort22 / decode.py
Last active April 5, 2026 07:43
Script for decoding battery temperature and other info on Lenovo ThinkBook 16 G7+ IAH 21TL
#!/usr/bin/python
"""
Script for decoding battery info on certain Lenovo laptops (requires acpi_call)
Tested on Lenovo ThinkBook 16 G7+ IAH 21TL
Example output:
$ sudo ./decode.py 0x1
Current temperature: 26.9 °C
@ClosedPort22
ClosedPort22 / .nvchecker.toml
Last active August 15, 2026 09:08
nvchecker config file for checking Total Commander updates
[total-commander]
# Total Commander publishes version info via DNS
# https://ghisler.ch/board/viewtopic.php?p=439323#p439323
source = "jq"
url = "https://dns.google/resolve?name=releaseversion.ghisler.com&type=TXT"
# 10.11.56.0 (private) -> 11.56
filter = '.Answer[0].data | match("\"10\\.(\\d+\\.\\d+)\\.0").captures[0].string'
@ClosedPort22
ClosedPort22 / nptv6.sh
Created August 23, 2025 04:14
Give IPv6 access to WireGuard peers in OpenWrt using NPTv6
#!/bin/sh
# Give IPv6 access to WireGuard peers in OpenWrt using NPTv6
# This is necessary because many ISPs only assign dynamic IPv6 prefixes, which makes it impractical to configure static, globally routable addresses for peers.
# Tested on OpenWrt 24.10.2 (fw4 compatible)
#
# Adapted from https://gist.github.com/MisakaMikoto-35c5/93d7a32860bbb31b47a05a8c8a0152b8
#
# License: 0BSD
#
@ClosedPort22
ClosedPort22 / .gitignore
Created July 8, 2025 11:13
.gitignore in whitelist mode
# This file demonstrates how to effectively use Git in whitelist mode. All
# files and directories are ignored unless explicitly allowed by lines starting
# with a !.
# As an example, below is a .gitignore file that can be used to track modified
# config files in the user's home directory.
# Ignore all files and directories at the root level
# Note: * doesn't descend into subdirectories
/*
@ClosedPort22
ClosedPort22 / no-check-certificate.js
Created December 9, 2024 13:59
Frida script for disabling SSL verification for the ABC Listen app
/*
Disable SSL certificate verification for the ABC Listen app
https://www.abc.net.au/listen/listenapp
Tested on ABC listen/2024.11.5197 Android API 28 x86
*/
Java.perform(function () {
// classes4.dex