Skip to content

Instantly share code, notes, and snippets.

@muhdiboy
muhdiboy / mediamarkt-handy-tarife-calculator.md
Last active June 21, 2023 02:06
Mediamarkt Handy Tarife On-Site Calculator script

Mediamarkt Handy Tarife Kalkulation

Dies ist ein UserScript, mit dem auf der Mediamarkt Tarifwelt "Smartphones mit Vertrag" Seite (https://tarife.mediamarkt.de/smartphones/) die Gesamtsumme von jedem angebotenen Vertrag eines Smartphones berechnet wird.

Funktion

Es wird die monatliche Grundgebühr, der einmalige Anschluss- und Gerätepreis inkl. Versand sowie jeglicher Bonus (z.B. Rufnummernmitnahme) mit einbezogen. Daraus wird dann eine neue Summe (für 2 Jahre) und ein neuer monatlicher Durchschnittspreis ermittelt.

Anhand dessen können alle Verträge neu sortiert werden, indem sie nach Gesamtpreis aufsteigend geordnet werden. Es ist außerdem möglich, einen Verkaufspreis einzugeben, falls man vorhat, das Gerät zu verkaufen. Daraus ergibt sich dann eine neue Summe und ein neuer monatlicher Durchschnittspreis.

Voraussetzungen

@linderd
linderd / README.md
Last active October 25, 2026 14:11 — forked from timlinux/README.md
Linux on Thinkpad P14s Gen2 AMD / T14 Gen2 AMD

Linux (Fedora 35) on a Thinkpad P14s [T14] Gen2 AMD

These are my installation-tricks and notes for running Linux on a 2021 Thinkpad P14s Gen2 with AMD Ryzen 7 5850U. It should also be suitable for the Thinkpad T14 Gen2 AMD as they are technically the same modell.
Meanwhile there is also a good test on youtube and an entry in the arch-wiki, which also comments some points mentioned here.

Detailed specs

Shipped:

@muhdiboy
muhdiboy / lastfm-automated-remove-duplicates.md
Last active September 24, 2026 20:23
LastFM automated duplicate scrobble deletion script

Why would I need this?

Your scrobbler might have decided to scrobble every song hundreds of times, and you can't really remove those scrobbles efficiently. Or you might have accidentally installed multiple scrobbler extensions at the same time - wondering why multiple scrobbles appear for every song played at a time - and you want to clear them after finding the issue.

Using this script still doesn't necessarily make the process quick, since Last.fm only displays a limited number of scrobbles that can be removed on each page of your library, and also rate-limits how many pages you can load in quick succession. The difference from the implementation of @sk22 and its forks - which this UserScript is derived from - is that you don't run it manually on every page. You set your options once, click START, and the rest of the process is automated: the script works its way back through your library and stops automatically at the page you choose.

Installation

Prerequisites

@sk22
sk22 / lastfm-remove-duplicates.js
Last active October 14, 2026 21:07
Last.fm duplicate scrobble deleter
var elements = Array.from(document.querySelectorAll('.js-link-block'))
elements.map(function (element) {
var nameElement = element.querySelector('.chartlist-name')
return nameElement && nameElement.textContent.replace(/\s+/g, ' ').trim()
}).forEach(function (name, i, names) {
if (name !== names[i + 1]) return
var deleteButton = elements[i].querySelector('[data-ajax-form-sets-state="deleted"]')
if (deleteButton) deleteButton.click()
location.reload()
})