Skip to content

Instantly share code, notes, and snippets.

@sk22
sk22 / spotify-download-manager-concept.md
Last active October 3, 2018 21:03
Imagine Spotify had an npm-like download manager...
$ sdm add album Green Day - Revolution Radio
sdm add v0.1.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Day Date From To Location Act
Friday 2018-06-22 17:00 17:20 Radio FM4/Planet.tt Bühne Brandig
Friday 2018-06-22 17:30 17:50 Radio FM4/Planet.tt Bühne Siebzig Prozent
Friday 2018-06-22 18:00 18:25 Radio FM4/Planet.tt Bühne Negroman
Friday 2018-06-22 18:40 19:05 Radio FM4/Planet.tt Bühne Kreiml & Samurai
Friday 2018-06-22 19:25 20:05 Radio FM4/Planet.tt Bühne Yasmo & Die Klangkantine
Friday 2018-06-22 20:30 21:15 Radio FM4/Planet.tt Bühne Haiyti
Friday 2018-06-22 21:35 22:25 Radio FM4/Planet.tt Bühne Mavi Phoenix
Friday 2018-06-22 22:45 23:55 Radio FM4/Planet.tt Bühne Antilopen Gang
Friday 2018-06-22 17:00 20:00 EUTOPIA DJ/VJ Bühne G-Spot Sound & Friends
@sk22
sk22 / export-google-play-music.js
Last active June 3, 2018 14:07
Export Google Play Music playlist
// Copy this into Chrome's debugger console
// This will output all (loaded/visible) songs to the console.
// Format: Title - Artist
// You can use this to port the playlist to another service,
// for example using http://spotlistr.herokuapp.com or http://www.playlist-converter.net
// Warning: Only the visible songs will be in the list,
// so a workaround is to click the "toggle device toolbar" button on the
// upper left of the debugger and set the device height really high (like 5000px), as needed.
// This will force Google Play Music to load all songs visible in the viewport.
@sk22
sk22 / slug.regex
Created December 13, 2017 19:18
Regex to match a slug
^[a-z0-9]+(?:-[a-z0-9]+)*$
@sk22
sk22 / webuntis-save-password.md
Last active September 15, 2017 07:57
WebUntis prompt to save the password

Chrome WebUntis password save prompt

The Problem

When logging into WebUntis, Chrome doesn't prompt to save your username and password as it does on other websites. So whenever you open up WebUntis (for some reason the session doesn't last long), you have newly enter your username and password every time. So why do this if Chrome could just enter it for you?

Now I tried to alter that code so Chrome can save the username-password

[{"title":"I Am From Austria","artist":"Rainhard Fendrich"},{"title":"Bohemian Rhapsody","artist":"Queen"},{"title":"Auf Uns","artist":"Andreas Bourani"},{"title":"Eine Ins Leben","artist":"Pizzera & Jaus"},{"title":"Don't Stop Believin'","artist":"Journey"},{"title":"Despacito","artist":"Luis Fonsi feat. Daddy Yankee"},{"title":"Tage Wie Diese","artist":"Toten Hosen"},{"title":"Summer Of '69","artist":"Bryan Adams"},{"title":"Das Beste","artist":"Silbermond"},{"title":"Narcotic","artist":"Liquido"},{"title":"Grossvater","artist":"Sts"},{"title":"Nothing Else Matters","artist":"Metallica"},{"title":"Ist Da Jemand","artist":"Adel Tawil"},{"title":"Bed of Roses","artist":"Bon Jovi"},{"title":"Weus'd a Herz Hast Wia a Bergwerk","artist":"Rainhard Fendrich"},{"title":"The Sound of Silence","artist":"Disturbed"},{"title":"Amoi Seg' Ma Uns Wieder","artist":"Andreas Gabalier"},{"title":"What's Up","artist":"4 Non Blondes"},{"title":"Dann Kommt Die Musik","artist":"Flowrag"},{"title":"Hotel California","artist":"Eagl
@sk22
sk22 / bwm2-2017-05-30-notes.md
Last active May 30, 2017 05:59
BWM2-Test am 30.05.2017
@sk22
sk22 / bwm1-2017-05-18-notes.md
Last active May 17, 2017 18:18
BWM1-Test am 18.05.2017

Forderungsbewertung

S. 174 - 200, Übungen S. 303 - 307

Schritte

  1. Bestandsaufnahme: Ausfindigmachen problematischer Kunden (Mahnungen erfolglos, Insolvenzdatenbank, ...)
  2. Bewertung: Grundsatz der kaufmännischen Vorsicht
@sk22
sk22 / lastfm-remove-duplicates.js
Last active September 28, 2025 21:33
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()
})
@sk22
sk22 / bwm2-2017-04-04-notes.md
Last active April 4, 2017 06:57
BWM2-Test am 4.4.2017

Produkt- und Sortimentspolitik

Lebenszyklus von Produkten

Lebensdauer eines Produkts ist begrenzt. Altern durch

  • technischen Fortschritt
    • Handys → Smartphones
    • Kameras mit Filmen → Digitalkameras
  • Intensität des Wettbewerbs
  • Fernreisen statt Inlandsurlaub