Skip to content

Instantly share code, notes, and snippets.

View marcsello's full-sized avatar
🐧
Compiling Gentoo....

Marcell Pünkösd marcsello

🐧
Compiling Gentoo....
View GitHub Profile
@marcsello
marcsello / grub_search_partuuid.patch
Last active April 11, 2026 21:36
Resurrected/updated patch by Glenn Washburn from the mailing lists: https://lists.gnu.org/archive/html/grub-devel/2022-02/msg00090.html . This patch adds the partuuid based search functionality to GRUB2. Applies against the 2.14 and the latest master version. Use: search --partuuid
:100644 100644 0cf155128 000000000 M grub-core/Makefile.core.def
:100644 100644 49b679e80 000000000 M grub-core/commands/search.c
:000000 100644 000000000 000000000 A grub-core/commands/search_partuuid.c
:100644 100644 5f536006c 000000000 M grub-core/commands/search_wrap.c
:100644 100644 3eabaf0cc 000000000 M include/grub/search.h
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 0cf155128..68caf8532 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@marcsello
marcsello / usb_gadget_setup.sh
Created March 2, 2026 10:07
Simple script for testing USB gadget on Linux devices. Tested on F1C100s SoC, should work on Pi Pico as well
#!/bin/bash
# Usage
# ./usb_gadget_setup.sh mass_storage <device> -> set up a mass storage gadget exposing <device> (it can be a block device, or a file). MAKE SURE IT'S NOT MOUNTED!!!
# ./usb_gadget_setup.sh eth -> setup an ethernet gadget
#
# /sys/kernel/config should be already mounted
mkdir /sys/kernel/config/usb_gadget/g1
pushd /sys/kernel/config/usb_gadget/g1
@marcsello
marcsello / winsniff.sh
Created August 26, 2025 18:46
Simple Bash script to figure out the windows version installed on local disk(s) from Linux
#!/bin/bash
# This script tries to sniff the Windows version present on local disks.
# It does so by mounting ntfs partitions, and tries to read the version from the registry
# requires hivexget and lsblk
# install hivexget on Debian: apt install libhivex-bin
if [[ $EUID -ne 0 ]]; then
echo "root pls"
exit 1
@marcsello
marcsello / i-paid-for-the-edges.user.js
Created August 1, 2025 12:58
Remove rounded corner from youtube videos
// ==UserScript==
// @name I paid for the edges
// @namespace http://tampermonkey.net/
// @version 2025-08-01
// @description Remove rounded corner from youtube videos
// @author Marcsello
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@marcsello
marcsello / ser2sock.sh
Created July 18, 2025 14:24
Simple script to expose /dev/ttyUSB* on a TCP socket using socat with some hacks
#!/bin/ash
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
while sleep 1; do
# search for a sutiable device
# this is a bit lame match, it tries to find the last device,
# but if that last device is not suitable, it will not step back to the previous ones
@marcsello
marcsello / picoscope_debian.md
Created March 14, 2025 20:25
Running picoscope software on Debian

Running picoscope software on debian

The only problem with running picoscope on debian, are some missing/incompatible packages/libraries.

A kindof easy way to overcome this is using chroot. This rough guide shows the steps to how to do that.

Well, this should work on most distros, which has deboostrap, I just happen to ran this on Debian. But this should only work on X11! (Maybe it works on wayland, dunno, not tried)

Howto

@marcsello
marcsello / extra-volume-changer.user.js
Created August 22, 2024 13:29
Adds an extra input box to youtube to set the real volume of the video
// ==UserScript==
// @name Extra volume changer for YouTube
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author Marcsello
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@marcsello
marcsello / unshorter.user.js
Last active July 21, 2025 12:15
Un-shorter: Automatically redirect youtube shorts to the actual videos.
// ==UserScript==
// @name Un-shorter
// @namespace http://tampermonkey.net/
// @version 2024-02-23
// @description Automatically redirect youtube shorts to the actual videos.
// @author Marcsello
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@marcsello
marcsello / e2-extra-input-client_v1.txt
Last active October 16, 2023 11:24
Expression 2 code for my extra-input project
@name E2 Extra Input v1 by Marcsello
@inputs
@outputs A B C D E F Connections ConnectionQuality EventCounter EventsSkipped
@persist Last
@trigger
@strict
# Designed to work with https://github.com/marcsello/e2-extra-input-server
# I've also written a blog post about all this: https://blog.marcsello.com/posts/2023/wiremod-input-from-the-real-world/
@marcsello
marcsello / README.md
Last active January 16, 2023 19:44
Un-shit Nextcloud 25 - Fix the ugly and bloated theme for the new Nextcloud release.

Un-shit Nextcloud 25

Fix the ugly and bloated theme for the new Nextcloud release.

I didn't like the new all-round and animated UI of Nextcloud introduced in Nextcloud 25, so I hacked together something to make it a little more bearable. It's no more of a hack, than most other parts of Nextcloud, so I guess it's okay.

Requirements

The followings require the installation of the following two addons: