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 / ytrbg.user.js
Last active March 29, 2024 21:31
Tampermonkey script to rewind videos on load. Videos should start at the beginning.
// ==UserScript==
// @name Youtube rewind but good
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Auto rewind all youtube videos on open. Don't ever start videos in the middle!
// @author Marcsello
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@marcsello
marcsello / treebomb.py
Last active February 17, 2022 12:07
Create a directory with full of random files and directories. Ideal for inode related tests and benchmarks.
import sys
import os
import os.path
import random
import string
WORDS = [
"condition", "set", "against", "legislation", "solar", "dad", "rating", "machine", "swim", "distribute",
"payment", "basically", "gold", "prosecutor", "poverty", "profession", "tail", "psychological", "dimension",
"jail", "suppose", "efficient", "party", "quit", "approval", "cloud", "settle", "offer", "everywhere", "famous",
@marcsello
marcsello / Numark MIXTRACK (marcsello).midi.xml
Last active July 30, 2022 23:48
Edited Numark MIXTRACK Mixxx mapping
<?xml version='1.0' encoding='utf-8'?>
<MixxxControllerPreset mixxxVersion="1.9.0+" schemaVersion="1">
<info>
<name>Numark MIXTRACK (marcsello)</name>
<author>Matteo ([email protected]), RAWRR, uncleeugene and Marcsello</author>
<description>Numark MixTrack Mapping v1.0b (customized by Marcsello)</description>
</info>
<controller id="Numark">
<scriptfiles>
<file filename="Numark-MixTrack-scripts-marcsello.js" functionprefix="NumarkMixTrack"/>
@marcsello
marcsello / wd-net-ghetto-udev-firmware-loader.sh
Created April 23, 2021 20:23
Firmware loader for the Gen1 WD MyCloud network interface when there is no udev available
#!/bin/ash
# Written for Alpine 3.13 userland
# The sleep stuff isn't necessary... it's just there to stand as safe guards
echo "Start loading of PFE kernel module"
modprobe pfe lro_mode=1 tx_qos=1 alloc_on_init=1 disable_wifi_offload=1 &
WAITPID=$!
sleep 1
@marcsello
marcsello / yaml.nanorc
Last active January 17, 2024 13:38
A bit more moderate YAML highlighting for GNU nano
# Original: https://ourcodeworld.com/articles/read/796/how-to-enable-syntax-highlighting-for-yaml-yml-files-in-gnu-nano
# Modified by Marcsello
# Supports `YAML` files
syntax "YAML" "\.ya?ml$"
header "^(---|===)" "%YAML"
## Keys
color brightblue "^\s*[\$A-Za-z0-9_-]+\:"
color brightmagenta "^\s*@[\$A-Za-z0-9_-]+\:"
@marcsello
marcsello / ezobackup.sh
Created October 20, 2020 19:42
Script that safely creates the backups for the EZO.TV Minecraft server
#!/bin/bash
# Requirements:
# - mcrcon: https://github.com/Tiiffi/mcrcon
# - sentry-cli: https://github.com/getsentry/sentry-cli
# configure
SENTRY_DSN=
export SENTRY_DSN
@marcsello
marcsello / README.md
Created April 15, 2020 15:28
NETLOCK

NETLOCK

This is a simple application that can broadcast cryptographically signed commands to all computers in the same broadcast domain using a pre-shared key.

Usage

Daemon

The Daemon should run on computers which should execute the commands. The pre-shared key should be provided as an evironmental variable NETLOCK_PSK. Optionally a --debug argumentum could be provided to the daemon so that it will print out debug messages.

@marcsello
marcsello / bettersocket.py
Created December 26, 2019 02:52
Better socket handling for python
#!/usr/bin/env python3
import socket
import select
from typing import Optional
class BetterSocketReader():
"""
This socket reader is designed to read delimited chunks from the socket efficently
"""
@marcsello
marcsello / influxdumper.py
Created November 8, 2019 17:10
InfluxDB to CSV dumper
#!/usr/bin/env python3
from influxdb import InfluxDBClient # <- install this first
import csv
import os
import argparse
#
# This script dumps all avliliable measurements into separate CSV files from InfluxDB
#
@marcsello
marcsello / my_fucking_data_visualizer.py
Created November 8, 2019 13:59
My fucking data visualizer
#! /usr/bin/env python3
#
# I seriously had to write this, to have an easy to use data explorer...
# It's not quick, or flexible, but it get's the job done, with minimal memory footprint. (achieved by a lot of disk access, sorry...)
#
# Usage:
# 1) Install matplotlib and pythondialog (later may be provided by your distribution)
# 2) run `python3 my_fucking_data_visualizer.py my_data.csv` where my_data.csv is a CSV file with the following properties:
# - The first row is the column headers