Skip to content

Instantly share code, notes, and snippets.

View emendir's full-sized avatar

emendir

View GitHub Profile
@emendir
emendir / download_youtube_playlist.md
Last active July 27, 2024 13:54
Download YouTube Playlist

Download YouTube Playlist Script

This script downloads videos from a YouTube playlist, either the full video or audio-only in MP3 format. The produced files' names include the track number and title, and the following media info is stored in the files' metadata:

  • title
  • track number
  • album (YouTube playlist title)
  • publisher (name of the YouTube channel)

Usage:

@emendir
emendir / Create-PyQt5-Venv-Kvantum.md
Last active July 23, 2024 06:11
PyQt5 & Kvantum Themes in Python Virtual Environment

PyQt5 & Kvantum Themes in Python Virtual Environment

Problem

Kvantum is a useful theme manager to style the themes of any Qt Apps without touching their code. When running a PyQt5 application from source using my OS' python installation, the kvantum theme is applied correctly. However, when using a python virtual environment, it isn't, producing the following error:

QApplication: invalid style override 'kvantum' passed, ignoring it.
@emendir
emendir / create_raspi_vm.md
Last active April 11, 2025 20:55
Create Raspberry Pi OS Virtual Machine with GUI

VM Running Raspberry Pi OS Desktop or Lite with GUI

Here's a script that creates and runs a virtual machine running Raspberry Pi OS Desktop or Lite with a GUI. It is based on cGandom's guide on setting up a Raspberry Pi OS Lite VM without a GUI. Quoting that guide:
"This isn't full-blown hardware emulation of the Raspberry Pi 4, but more about creating a virtual environment for the OS."

The main improvements made by this script over that guide are:

  • working GUI (tested with Raspberry Pi OS Desktop, as well as frame-buffer and X-Server on Raspberry Pi OS lite)
@emendir
emendir / PulsarInstallHydrogenPlugin.md
Created May 20, 2024 10:34
Install Hydrogen Plugin for Pulsar Editor in 2024

Install Hydrogen for Pulsar in 2024

Since the sunset of the Atom text editor, getting some of its plugins to work in its successor Pulsar has been a bit tricky.

For me the Hydrogen plugin was the most critical issue. After collection partial solutions from many forums, I compiled a script for manually installing it that has worked reliably for me for several months now, on both x86 and arm architectures.

Sorry for the delay in publishing, I hope this helps other Pulsar users.

Tested with Pulsar v1.109.0 on:

@emendir
emendir / InstallBlenderUbuntu24Raspi.md
Last active May 20, 2024 09:59
Install Blender 3.6.2 on Raspberry Pi with Ubuntu 24

Install Blender 3.6.2 on Raspberry Pi with Ubuntu 24

When upgrading my Raspberry Pi 5 from Ubuntu 23 to Ubuntu 24, I had an issue that the blender application stopped working. I figured out that the cause was that Ubuntu 24 came with blender version 4.0.2, which didn't work on a raspberry pi, while blender version 3.6.2, which came with Ubuntu 23, did work. So I worked out how to install blender version 3.6 on Ubuntu 24 by downloading the specific DEB packages intended for Ubuntu 23 and installing them using dpkg after installing the dependencies manually.

Tested on:

  • Raspberry Pi 5 with 8GB of RAM running Ubuntu 24.04 LTS

Install Blender 3.6.2