Skip to content

Instantly share code, notes, and snippets.

View edrohler's full-sized avatar
😎

Eric D. Rohler edrohler

😎
View GitHub Profile
@LanceMcCarthy
LanceMcCarthy / MainPage.xaml.cs
Created April 18, 2019 17:40
Creating a Pie Chart
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
CreatePieChart();
}
private void CreatePieChart()
@jeb5
jeb5 / Youtube Subs to OPML.js
Last active August 11, 2024 20:42
Youtube Subscriptions to RSS/OPML
const channels = [...document.querySelectorAll("#main-link.channel-link")].map(e => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
const feed = "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
return [feed, channelName];
});
if (channels.length == 0) {
alert("Couldn't find any subscriptions");
} else {
console.log(channels.map(([feed, _]) => feed).join("\n"));