Skip to content

Instantly share code, notes, and snippets.

View Solarflame5's full-sized avatar

Solarflame Solarflame5

  • Turkey
  • 22:57 (UTC +03:00)
View GitHub Profile
@Solarflame5
Solarflame5 / stupidwindows.reg
Created January 1, 2025 17:13
Re-add "New text document" to Windows context menu after uninstalling notepad.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.txt\ShellNew]
"ItemName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,2c,00,2d,00,34,00,37,00,30,00,00,00
"NullFile"=""
[HKEY_CLASSES_ROOT\txtfilelegacy]
@="Text Document"
@Solarflame5
Solarflame5 / batchconvert.py
Last active March 17, 2024 09:53
Python script to batch convert media files with ffmpeg
import sys
import os
import subprocess
arguments = sys.argv[1:] # py batchconvert.py [input directory] [output directory] [target file extension] [additional arguments]
if(arguments == []):
print(
""" Usage:
py batchconvert.py [input directory] [output directory] [target file extension] [additional arguments]"""
@Solarflame5
Solarflame5 / cups_hplj1020_tutorial.md
Last active July 15, 2025 06:49
How to set up an HP LaserJet 1020 printer server using CUPS on Raspberry Pi OS Bullseye

How to set up an HP LaserJet 1020 printer server using CUPS on Raspberry Pi OS Bullseye

Set up the Raspberry Pi

Note: This probably also works in Raspberry Pi OS Bookworm, but I have only tested this on my Pi 1 B+ that doesn't support Bookworm. It should also probably work on most Debian based distros including Ubuntu.

  • Flash the Raspbian Bullseye Lite image to the SD card
  • Configure the user account, network and SSH settings while imaging to make setup easier.

Install the required packages

You need to install CUPS, HPLIP, and the foo2zjs printer drivers, use the following commands:

sudo apt update
sudo apt install cups hplip printer-driver-foo2zjs
@Solarflame5
Solarflame5 / ublock-filters.txt
Last active June 13, 2023 18:44
Some uBlock Origin filters I use
! This filter removes the super thanks and clip buttons on the youtube player.
! Replace "Teşekkürler" with whats written on the super thanks button and "Klip" with whats written on the clip button in your native language
www.youtube.com##ytd-button-renderer.ytd-menu-renderer.style-scope:has-text(/Teşekkürler/)
www.youtube.com##ytd-button-renderer.ytd-menu-renderer.style-scope:has-text(/Klip/)
! Block ads disguised as things on thingiverse
www.thingiverse.com##div[class^="AdCard__card--"]
www.thingiverse.com##[class^="AdCard__leaderboard--"]
www.thingiverse.com##div[class^="CardGrid__cardGridItem"]:has([class^="AdCard__card--"])