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 March 13, 2024 19:06 — 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 May 2, 2024 11:59
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. However unlike the implementation of @sk22 and its forks, this UserScript, which is derived from those scripts, is run once. The rest of the process is automated and the script will stop at the page you have set using the prompt.

Installation

Prerequisites

@sk22
sk22 / lastfm-remove-duplicates.js
Last active January 13, 2024 16:26
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()
})