Skip to content

Instantly share code, notes, and snippets.

Avatar

Björn Westergard bwestergard

  • Mt. Pleasant, Washington, D.C.
View GitHub Profile
View pbsnewshour.rss
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title><![CDATA[PBS NewsHour - Full Show]]></title>
<link>https://www.pbs.org/newshour/video</link>
<atom:link href="https://www.pbs.org/newshour/feeds/rss/podcasts/show" rel="self" type="application/rss+xml" />
<language>en-US</language>
<copyright>2021 NewsHour Productions LLC. All Rights Reserved.</copyright>
<description><![CDATA[Listen to the complete PBS NewsHour, specially formatted as a podcast. Published each night by 9 p.m., our full show includes every news segment, every interview, and every bit of analysis as our television broadcast. Is this not what you're looking for? Don't miss our other podcasts for our individual segments, Brooks and Capehart, Politics Monday, Brief but Spectacular, and more. Find them in iTunes or in your favorite podcasting app. PBS NewsHour is sup
View example-feed.rss
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:npr="https://www.npr.org/rss/" xmlns:nprml="https://api.npr.org/nprml" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<title>NPR News Now</title>
<atom:link href="https://gist.githubusercontent.com/bwestergard/146ec19a78d5616b497d074d4da00c44/raw/e99315314b902147f0b2a27a7db710e1e1e5971d/example-feed.rss" rel="self" type="application/rss+xml" />
<atom:link href="https://pubsubhubbub.appspot.com/" rel="hub" />
<link>http://www.npr.org/templates/topics/topic.php?topicId=1001</link>
<description><![CDATA[The latest news in five minutes. Updated hourly.]]></description>
<copyright>Copyright 2007-2019 NPR - For Personal Use Only</copyright>
<generator>NPR API RSS Generator 0.94</generator>
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@bwestergard
bwestergard / hourly-news.sh
Created Feb 17, 2021
NPR Hourly News Update
View hourly-news.sh
#!/bin/bash
# Checks to see if there is a new hourly news update, plays it if there is.
# Stores the last played newscast URL in last_newscast_url.txt
# Can be invoked with cron or: watch -n 30 ./hourly-news.sh
latest_newscast_url=$(curl -s https://feeds.npr.org/500005/podcast.xml | grep enclosure | cut -d \" -f2)
last_newscast_url=$(cat last_newscast_url.txt)
if [ "$latest_newscast_url" = "$last_newscast_url" ]; then
View expand.ts
const foo = {foo: 1}
const bar = {bar: 2}
const baz = {...foo, ...bar}
const merge = <X,Y>(a:X, b:Y): X&Y => ({...a, ...b})
class ExpandingRecord<A> {
record: A;
constructor(record: A) {
@bwestergard
bwestergard / rotation.sc
Created Aug 27, 2019
Supercollider: Scale Rotations (Modes)
View rotation.sc
~scaleA = [0,2,4,5,7,9,11];
~scaleB = ~scaleA.rotate(3);
(
a = Pbind(*[
scale: Pn( Pstep([
~scaleA,
~scaleA.rotate(1),
~scaleA.rotate(2),
~scaleA.rotate(2),
View prediction_hash.txt
MD5 (prediction.txt) = d37a6e0de93c9c909cacd5c3fe152aa2
View openrtb.js
/* @flow */
import {
type Result,
Ok,
mapOk,
andThen
} from 'minimal-result'
import {
@bwestergard
bwestergard / modal.sc
Last active Oct 12, 2018
Modal Transposition Study
View modal.sc
TempoClock.default.tempo = 90/120;
(
SynthDef(\tinn, { |amp, freq = 440, sustain = 1, startf = 20000, endf = 80, q = 0.8 |
var detune = 0.01;
var sig = Splay.ar(
VarSaw.ar(LFNoise2.ar(8).exprange(freq * (1-detune), freq * (1+detune)) * [0.99,1/2,1/2.001,1,1.01], width: LFNoise2.ar(1/2).exprange(0.5, XLine.ar(0.5,0.03,sustain/8))) * XLine.ar(1e-10,1, 0.01) * XLine.ar(1,1e-10, sustain, doneAction: 2),
XLine.ar(0.2,1,sustain/3)
);
Out.ar(0, RLPF.ar(sig, XLine.ar(startf, endf, sustain / 16), q) * amp)