Skip to content

Instantly share code, notes, and snippets.

View Moonbase59's full-sized avatar
😊
Every ★ you give matters—thanks!

Matthias C. Hormann Moonbase59

😊
Every ★ you give matters—thanks!
View GitHub Profile
@Moonbase59
Moonbase59 / spec
Last active March 26, 2024 21:07
spec - Quick-n-dirty spectrogram display for audio files
#!/bin/bash
# spec - Copyright (c) 2024 Matthias C. Hormann
# 2024-03-26
# Show spectrogram for an audio file, using ffmpeg's showspectrumpic
# Add this to the "Open with…" context menu of your file manager!
# define me
me=`basename "$0"`
version="0.2"
@Moonbase59
Moonbase59 / iframe-resizer.html
Created December 22, 2023 11:18
Responsive AzuraCast Embed Widget iframes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Iframe widget resizing test</title>
</head>
<body>
<h1>Iframe widget resizing test</h1>
@Moonbase59
Moonbase59 / sse_cf_demo.html
Last active March 21, 2024 21:59
AzuraCast HPNP (High-Performance Now Playing) example for station websites, using SSE (Server-Sent Events)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Server-sent events demo (Centrifugo)</title>
<!-- style the indicators: -isonline, -islive, isrequest, progress bar -->
<style>
.label { border-radius: 0.1rem; padding: .1rem .2rem; background: #f0f1f4; color: #5b657a; display: inline-block; }
.label.label-success { background: #32b643; color: #fff; }
@Moonbase59
Moonbase59 / azuracast_xmltv
Created October 14, 2023 21:28
Proof of concept: XMLTV.xml for AzuraCast. Quick-n-dirty.
#!/usr/bin/env python3
# encoding: utf-8
# azuracast_xmltv.py
# 2023-10-14 - Moonbase - initial version - QUICK-N-DIRTY!
#
# Parses station 1’s schedule into XMLTV.xml format,
# writes to stdout (or a file).
#
# Depending on your Python installation, you might need to install
@Moonbase59
Moonbase59 / pl-copyfiles
Last active August 20, 2023 02:35
pl-copyfiles – Copies media files from M3U playlists to a destination folder, keeping folder structure and file attributes. Avoids unneeded copying.
#!/bin/bash
# pl-copyfiles
#
# Copies media files from M3U playlists to a destination folder,
# keeping folder structure and file attributes.
#
# Can use .m3u, .m3u8 (or actually any text file containing a newline-
# separated list of files) with absolute or relative file paths,
# both simple (one line per file) and #EXTM3U formats.
@Moonbase59
Moonbase59 / ql-playlists
Last active August 20, 2023 14:20
ql-playlists – Export Quod Libet saved searches to M3U playlists. Bash script with many options.
#!/bin/bash
# ql-playlists
#
# Generate radio playlists from Quod Libet saved searches.
# Quod Libet must be running before starting this script,
# and the library should be up-to-date.
# The "Include Saved Search" plugin MUST be activated for this to work!
#
# This may not be the fastest way to do it (~250 songs/s on my system),
@Moonbase59
Moonbase59 / # open-mpi - 2019-08-11_07-05-50.txt
Created August 11, 2019 05:18
open-mpi on Linux Mint 19.2 Tina - Homebrew build logs
Homebrew build logs for open-mpi on Linux Mint 19.2 Tina
Build date: 2019-08-11 07:05:50