Skip to content

Instantly share code, notes, and snippets.

View mortalis13's full-sized avatar

Roman mortalis13

View GitHub Profile

An example of how to write a LibreELEC OS image on a SD card.

  1. Download and unpack the image:
cd /sdcard
wget http://archive.libreelec.tv/LibreELEC-RPi2.arm-9.2.6.img.gz
gunzip -k LibreELEC-RPi2.arm-9.2.6.img.gz
  1. Enter to the super user mode, find the SD card device (usually mmcblk1),
/* -- For Profile/chrome/userChrome.css -- */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Hide tracking and security icons in address bar */
#tracking-protection-icon-container {
animation: none !important;
}
#tracking-protection-icon-container {
# Script to trigger ScrollLock key each 10 min
# Save as script.ps1 and run from PowerShell or from context menu "Run with PowerShell"
$WShell = New-Object -Com "Wscript.Shell"
while (1) {$WShell.SendKeys("{SCROLLLOCK}"); sleep 600}
# To execute the script in background, run it from the console
# To stop it, kill the powershell.exe process

To download an album from Deezer on Android, use deemix library for python:

The tool will ask for arl, which can be copied from the desktop browser (Firefox for example):

deemix.exe
--------------
-p . - download to current folder
-b 320 - download mp3 320 kbps
-b flac - download flac
config.json
--------------
"maxBitrate": "3"
@mortalis13
mortalis13 / Configure portable Python (embeddable package).md
Last active June 1, 2024 17:49
Configure portable Python (embeddable package).md
  • download code from https://github.com/Anjok07/ultimatevocalremovergui
  • set numpy==1.24.2 in the requirements.txt, as the lower version has conflicts with multiple libraries
  • create venv
  • set SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True, for the warning from the sklearn library
  • pip install wheel, for the playsound issue with OSError: could not get source code
  • pip install -r requirements.txt
  • python UVR.py

Script for changing the font of the title bar in Windows, without modifying registry directly and restarting the session.
Execute it with AutoHotkey v2 (put the code in the file font.ahk and run):

SetFont() {
    static SPI_GETNONCLIENTMETRICS := 0x0029
    static SPI_SETNONCLIENTMETRICS := 0x002A
    static SPIF_UPDATEINIFILE := 0x01
    static SPIF_SENDCHANGE := 0x02

    static StructureSize := 40 + 5 * 92  ; NONCLIENTMETRICS size: fields + 5 LOGFONT instances

Script tested on Windows 10, with all icons visible setting.
Removes an icon by process name from the system tray.

; AutoHotkey v2
; Based on https://www.autohotkey.com/boards/viewtopic.php?p=414590#p414590 "[LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit"

TrayIcon_GetTrayBar(sTray := "Shell_TrayWnd") {
  idxTB := "", nTB := ""
  dhw := A_DetectHiddenWindows
Web Scraping with Python. 3rd
Introduction to 64 Bit Windows Assembly Programming. 4th
Exam Ref AZ-900. Microsoft Azure Fundamentals. 3rd