Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working on changing the world.

Anthony Eden anthonyeden

💭
Working on changing the world.
View GitHub Profile
@anthonyeden
anthonyeden / example.json
Created Apr 12, 2022
MetaRadio: Station Guide API Endpoint Example
View example.json
{
"generated": "Tue, 12 Apr 2022 06:37:18 GMT",
"guide": [
{
"programId": "1",
"name": "Anthony's Music",
"presenter": "Mr Eden",
"image_600": "https://amrap-pages-image.s3.amazonaws.com/profile/8773.jpg?cacbeb=3703307",
"image_post_featured": null,
"image_post_featured_square": null,
@anthonyeden
anthonyeden / readme.md
Last active Jan 7, 2022
MetaRadio PlayIt Live Template
View readme.md
@anthonyeden
anthonyeden / example.json
Created Apr 7, 2021
MetaRadio: Station Now API Endpoint Example
View example.json
{
"station": {
"name": "Test Station",
"shortName": "test-station",
"playerUrl": "https://example-com-10.mediarealm.dev/radioplayer/test-station/",
"programguideUrl": "https://example-com-10.mediarealm.dev/guide/",
"streams": [
{
"url": "https://stream1.hopemedia.com.au/hope-mp3",
"format": "audio/mp3",
@anthonyeden
anthonyeden / qsys-esp32-tally.ino
Created Mar 6, 2021
Q-SYS Camera Tally - ESP32 M5StickC
View qsys-esp32-tally.ino
/*****************
ESP32 Tally Light for Q-SYS
Version 1.0
A wireless (WiFi) tally light for Q-SYS, based on the M5StickC ESP32 development board and the Arduino IDE.
Based on: https://github.com/oneguyoneblog/tally-light-esp32-for-blackmagic-atem-switcher/blob/master/tally-light-esp32-for-blackmagic-atem-switcher.ino
******************/
#include <M5StickC.h>
#include <WiFi.h>
@anthonyeden
anthonyeden / example.html
Created Jun 4, 2020
MetaRadio: Now Playing JS Example
View example.html
<span id="metaradio-now-title"></span>
<span id="metaradio-now-artist"></span>
<span id="metaradio-now-artwork"></span>
<script>
// Setup our HTTP request
var xhr_metaradio_now = new XMLHttpRequest();
// Setup our listener to process completed requests
xhr_metaradio_now.onload = function () {
@anthonyeden
anthonyeden / MetaRadio-Myriad-Template.xml
Last active Sep 4, 2020
MetaRadio Myriad OCP Template
View MetaRadio-Myriad-Template.xml
<?xml version="1.0"?>
<MetaRadioNow>
<Title><OCP_NOW_ITEMTITLE></Title>
<Artist><OCP_NOW_ARTISTNAMES></Artist>
<Duration><OCP_NOW_DURATIONSECS></Duration>
<StartTimestamp><OCP_SPECIAL_NOW_yyyy-mm-dd hh:nn:ss></StartTimestamp>
<Type><OCP_NOW_ITEMTYPEDESCRIPTION_1></Type>
<PlayoutId><OCP_NOW_ITEMNUMBER></PlayoutId>
</MetaRadioNow>
@anthonyeden
anthonyeden / template.xml
Created Apr 24, 2020
MetaRadio Generic File & IP Templates
View template.xml
<?xml version="1.0"?>
<MetaRadioNow>
<Type><![CDATA[SONG]]></Type>
<StartTimestamp><![CDATA[YYYY-MM-DD HH:MM:SS]]></StartTimestamp>
<Duration>240</Duration>
<Title><![CDATA[Song Title]]></Title>
<Artist><![CDATA[Artist Name]]></Artist>
<Album><![CDATA[Album Name]]></Album>
<PlayoutId><![CDATA[Unique ID / Filename]]></PlayoutId>
<ExternalId><![CDATA[Scheduling system ID - optional]]></ExternalId>
@anthonyeden
anthonyeden / facebook-live-video-scraper.txt
Last active Jun 27, 2021
Facebook Live Embed Scraper
View facebook-live-video-scraper.txt
This script allows you to scrape a Facebook page for live videos, and generate a iframe embed code for your website. It uses Selenium Firefox web driver. You may get banned if you run this too often - this is yet to be seen.
The file `livestream-data.json` will be updated with extra fields if/when a live video is found.
@anthonyeden
anthonyeden / blockeditor_enableperpage.php
Created Feb 14, 2020
Wordpress: Selectively enable Block Editor per-page
View blockeditor_enableperpage.php
<?php
// Disable the Block Editor on all pages, except specific pages
add_filter('use_block_editor_for_post', '__return_false', 5);
add_filter('use_block_editor_for_post', function($can_edit, $post) {
// Conditionally allow the block editor per-page
if (empty($post->ID)) return $can_edit;
if (get_post_meta($post->ID, 'use_block_editor', true) == true) {
@anthonyeden
anthonyeden / MetaRadioTemplate.xml
Created Feb 13, 2020
MBStudio MetaRadio Template
View MetaRadioTemplate.xml
<?xml version="1.0"?>
<MetaNow>
<Type><![CDATA[%code0%]]></Type>
<StartTimestamp><![CDATA[%time0%]]></StartTimestamp>
<Duration><![CDATA[%duration0%]]></Duration>
<Title><![CDATA[%title0%]]></Title>
<Artist><![CDATA[%artist0%]]></Artist>
<Album><![CDATA[%album0%]]></Album>
<Filename><![CDATA[%file0%]]></Filename>
</MetaNow>