Skip to content

Instantly share code, notes, and snippets.

@sanderdewijs
sanderdewijs / IceCastPlaylist.php
Created March 22, 2020 16:34
This is an idea to create a playlist from an Icecast server storing the songdata and cover image into a database.
<?php
/**
* Class IceCastPlaylist
* See https://stackoverflow.com/questions/60502076/how-to-get-icecast-server-songs-history/60798774#60798774 for context
*
* This class can be used as follows:
* global $wpdb
* $playlistClass = new IceCastPlaylist($wpdb);
* $playlistClass->fetchSongInfo();
@daliborgogic
daliborgogic / sw.js
Last active January 24, 2019 16:29
sw.js
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js')
if (workbox) {
console.log(`Workbox is loaded`)
workbox.setConfig({ debug: true })
workbox.core.setLogLevel(workbox.core.LOG_LEVELS.log)
workbox.core.setCacheNameDetails({
prefix: 'localhost',