Skip to content

Instantly share code, notes, and snippets.

View belst-n's full-sized avatar
🏠
Can't chat, in IRL.

BCE belst-n

🏠
Can't chat, in IRL.
  • AETNET
View GitHub Profile
@belst-n
belst-n / Excel_MessageBoxMonitor.bas
Created December 24, 2025 18:19
VBA code for Office to monitor and automatically dismiss MessageBox windows that appear in Excel. Monitoring is performed from a separate Word document process.I did not write this code. The code was authored originally by A.S.H. and was copied from https://stackoverflow.com/a/41826510/22859713.
' Author: A.S.H; Source: https://stackoverflow.com/a/41826510/22859713
' Excel - Class Module VBA
Private killerDoc As Object
Private Sub Class_Initialize()
On Error Resume Next
Set killerDoc = CreateObject("Word.Application").Documents.Open(Filename:="C:\BElston\Office\Custom\MessageBoxMonitor.docm", ReadOnly:=True)
If Err.Number <> 0 Then
If Not killerDoc Is Nothing Then killerDoc.Close False
Set killerDoc = Nothing
@belst-n
belst-n / disable-highlighting-trailing-whitespace-nano.sh
Created September 17, 2025 01:06
Remove stupid green highlighting for trailing whitespace in nano........
# sed -i 's/^\(color ,green \"\[\[\:space:\]\].."\)/# \1/' /usr/share/nano
@belst-n
belst-n / settings.json
Created May 22, 2025 11:00
Windows Terminal - Config to clear all default actions from all keyboard shortcuts (key bindings),
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"keybindings": [
{ "keys": "alt+f4", "id": null },
{ "keys": "alt+enter", "id": null },
{ "keys": "f11", "id": null },
{ "keys": "ctrl+shift+space", "id": null },
{ "keys": "ctrl+,", "id": null },
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.answer:has(+ :not(.answer)):style(border-bottom: 0 !important;)
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.aside-cta
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.bottom-notice
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.comment-text > .comment-body > .ai-center > .comment-user
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.comments-link
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.js-suggest-edit-post
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.s-pagination > .s-pagination--item
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.s-btn:has-text(Browse more Questions)
/([a-z]+\.stackexchange|serverfault|superuser|askubuntu|stackoverflow).com$/##.fs-caption
/([a-z]+\.stackexchange|serverfault|superuser|as
#!/usr/bin/env python
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>"
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/"
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/"
import leveldb
import sys
import re
@belst-n
belst-n / privacy-google-host-domains-list.md
Last active December 16, 2025 16:11
List of Google domains and hostnames along with a description of their purpose. Please assist with growing this list over time.

androidtvchannels-pa.googleapis.com - Android TV, promoted channels autodiscover.googleapis.com - ?? clientmetrics-pa.googleapis.com - ?? Tracking jnn-pa.googleapis.com - Consent management (third-parties) ad-creatives-public.commondatastorage.googleapis.com - ?? Advertising creatives related? gds.google.com - Google Data Studio ogads-pa.clients6.google.com - Appears to involve logging and Play store (play.google.com/log). Also: " I have been using OGAds for few years to monetize my traffic and I can say that it is one of the best mobile content locking networks in the market" signaler-pa.clients6.google.com

Note: client6. indicates a client (Android?) API endpoint.

@belst-n
belst-n / registry-diff.ps1
Created December 31, 2024 16:56 — forked from aadityabhatia/registry-diff.ps1
PowerShell script to create and compare snapshots of Windows Registry sections
[CmdletBinding()]
Param(
[Parameter(Position=1, Mandatory=$True)]
[string]$dataFile1,
[Parameter(Position=2, Mandatory=$True)]
[string]$dataFile2
)
$dataObj1 = cat -raw "$dataFile1.json" | ConvertFrom-Json
$dataObj2 = cat -raw "$dataFile2.json" | ConvertFrom-Json
@belst-n
belst-n / brave - Procedural strategy led.txt
Created December 12, 2024 06:10
Brace 1.73 Procedural Cosmetic Filter Rules Test Examples 12/11/2024
!
! Title: brave-core PR #24688
!
! Filter to be used for testing purposes
! https://testcases.agrd.dev
!
! Customized for https://github.com/brave/brave-core/pull/24688
!
! Hide warning
antonok.com,testcases.agrd.dev,pages.dev###subscribe-to-test-extended-css-rules-filter
#!/bin/bash
# This file will be sourced in init.sh
# https://raw.githubusercontent.com/ai-dock/comfyui/main/config/provisioning/flux1-dev.sh
# Packages are installed after nodes so we can fix them...
if [ -z "${HF_TOKEN}" ]; then
echo "HF_TOKEN is not set. Exiting."
@belst-n
belst-n / remove-hidden-civitai-users.js
Created July 16, 2024 05:17
Quick script to iterate over all hidden users on Civitai.com and remove them.
function clickAndWait(index) {
const elements = document.querySelectorAll('.mantine-Group-root.mantine-1u5ck20 button.mantine-UnstyledButton-root.mantine-ActionIcon-root.mantine-1nf78q7');
if (index >= elements.length) return;
elements[index].click();
setTimeout(() => clickAndWait(index + 1), 1000);
}
clickAndWait(0);