Skip to content

Instantly share code, notes, and snippets.

View Solarflame5's full-sized avatar

Solarflame Solarflame5

  • Turkey
  • 11:18 (UTC +03:00)
View GitHub Profile
@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
Created January 14, 2024 13:36
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

  • 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--"])