Skip to content

Instantly share code, notes, and snippets.

@bruvv
bruvv / chatgpt-delete-old-chats.user.js
Last active August 1, 2026 12:38
Soft-delete ChatGPT conversations older than x months via backend API.
// ==UserScript==
// @name ChatGPT Soft-Delete Chats Older Than x Months
// @namespace https://chatgpt.com/
// @version 1.4.0
// @description Preview and soft-delete ChatGPT conversations older than a configurable number of months.
// @match https://chatgpt.com/*
// @match https://chat.openai.com/*
// @homepageURL https://gist.github.com/bruvv/c25a168271f7bda197b9a0422fdb80aa
// @supportURL https://gist.github.com/bruvv/c25a168271f7bda197b9a0422fdb80aa
// @updateURL https://gist.githubusercontent.com/bruvv/c25a168271f7bda197b9a0422fdb80aa/raw/chatgpt-delete-old-chats.user.js

We are going to use the acme.sh script to accomplish this. For authentication of the domain name, we will use the DNS option. First login to your Synology with ssh as the admin user and then sudo -i to get root access. When you login into the Synology with ssh you will end up in the /root path. I assume for the rest of the guide we run everything from that path. Now we need to get the script and change the permissions so it is executable.

wget https://raw.githubusercontent.com/Neilpang/acme.sh/master/acme.sh
chmod a+x acme.sh

Next we issue the certificate:

./acme.sh --issue -d *.website.come --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
@bruvv
bruvv / home-assistant-dashboard-rotator.user.js
Created July 24, 2026 14:45
Selecteert elke 60 seconden de volgende view van dashboard-f1111111
// ==UserScript==
// @name Home Assistant dashboard rotator
// @namespace local.home-assistant
// @version 1.0.0
// @description Selecteert elke 60 seconden de volgende view van dashboard-f1111111.
// @match http://10.92.102.75:8123/dashboard-f1111111/*
// @run-at document-idle
// @grant none
// ==/UserScript==
@bruvv
bruvv / Repair synology BTRFS volume
Created December 6, 2019 18:12
Synology BTRFS repair
btrfs fi show -d
(/dev/mapper/vg1000-lv)
syno_poweroff_task -d
(or: umount /volume1)
(or2: umount /volume1 -f -k)
Check to see if all us unmounted:
df -h
@bruvv
bruvv / world-cup-2026-kiosk.user.js
Last active July 8, 2026 16:24
world-cup-2026-kiosk.user.js
// ==UserScript==
// @name Home Assistant World Cup 2026 Kiosk
// @namespace https://github.com/bruvv
// @version 1.6.0
// @description Wisselt automatisch tussen World Cup 2026-tabs, verbergt ongewenste onderdelen en herstelt bij navigatieproblemen.
// @author bruvv
// @match *://homeassistant.local:8123/world-cup-2026*
// @match *://homeassistan.local:8123/world-cup-2026*
// @updateURL https://gist.githubusercontent.com/bruvv/94c2df5c745a8be6c685854f8b56de22/raw/world-cup-2026-kiosk.user.js
// @downloadURL https://gist.githubusercontent.com/bruvv/94c2df5c745a8be6c685854f8b56de22/raw/world-cup-2026-kiosk.user.js
@bruvv
bruvv / sync_trv_with_external_temp_sensor.yaml
Last active April 27, 2026 07:37
Sync TRV with external sensor blueprint
blueprint:
name: Sync TRV temperature
description: Sync external temperature sensor with TRV temperature
domain: automation
input:
ieeeaddressoftrv:
name: IEEE Address
description: This is the address of the TRV found in your zigbee database example 0x459877fffe1f2e83
external_temp:
name: Select the external temp sensor
@bruvv
bruvv / pwnagotchi change wlan card.md
Last active August 23, 2025 10:28
pwnagotchi change wlan card

I want to disable monitor mode for the interal wlan0 card of the pi. If you want to do that too and use wlan1 as mon0 do:

sed -i 's/phy0/phy1/g' /usr/bin/pwnlib

If you want wlan0 and wlan1 in monitor mode and want to use wlan1 as pwnagotchi device, use this ps did didn't work for me but above example

sudo su
rm /etc/network/interfaces.d/wlan1-cfg
@bruvv
bruvv / m5_airstack.yml
Created August 6, 2025 19:04
M5 AirQ esphome
substitutions:
devicename: lounge-airq
friendlyname: Lounge AirQ
location: Lounge
sensor_interval: 10s
esphome:
name: ${devicename}
friendly_name: ${friendlyname}
area: ${location}

How to use this?

  1. Install the USB drivers for your device (Google has a list of some universal USB drivers here)
  2. Download the ADB binary for your particular OS (Windows, Mac, Linux)
  3. Extract the zip file into a folder that you can quickly access.
  4. On your phone, go to Settings and tap on About Phone. Find the Build Number and tap on it 7 times to enable Developer Options.
  5. Now enter Developer Options and find USB Debugging. Enable it.
  6. On your computer, browse to the directory where you extracted the ADB binary.
  7. Launch a Command Prompt in your ADB folder. For Windows users, this can be done by holding Shift and Right-clicking then selecting the “open command prompt here” option.
  8. Once you’re in the command
@bruvv
bruvv / android tv state detection rule
Created April 19, 2025 17:43
android tv state detection rule for home assistant
# adb-state-detection-rules-home-assistant
see: https://www.home-assistant.io/integrations/androidtv#custom-state-detection
Because netflix has "previews" make sure to have a 15 second time-out to double check that the movie is playing or the preview is playing.
```json
"state_detection_rules": {
"com.android.vending": [
"idle"
],