Avatar

tmcw

👷 Building Val Town
Joined August 31, 2022
Public vals
167
sensibleSilverSwan
tmcw
sensibleSilverSwan
An interactive, runnable TypeScript val by tmcw
Script
bandcampWrappedScript
tmcw
bandcampWrappedScript
An interactive, runnable TypeScript val by tmcw
Script
bandcampWrapped
tmcw
bandcampWrapped
Bandcamp Wrapped It's Spotify Wrapped, but for Bandcamp! . Bandcamp is for people who buy their music and probably most of them hoard MP3s. Like me. And this val helps those people turn their Bandcamp purchases of 2024 into HTML or Markdown suitable for blog posts on their blogs, which is probably a segment that has some overlap with the people who are wacky enough to buy their music instead of streaming it from some service. Because Bandcamp doesn't have an API, this hinges on you going to your purchases page, copying the purchases, and pasting it in. Thanks to the ability of the system clipboard to contain HTML , the same technology that makes copy-and-pasted text have unpredictable and annoying font and boldness choices also lets this parse and reformat that purchases page into something shareable. I would love for this to support embeds as well, but I haven't found a strategy yet: Bandcamp embeds use album IDs in the URLs, which are not exposed in the content on the purchases page. I'd have to scrape Bandcamp for that, which would probably inevitably be blocked by some 'bot protection' system. Also read about this on macwright.com .
HTTP
chatgptchess
tmcw
chatgptchess
ChatGPT Chess Inspired by all this hubbub about chess weirdness , this val lets you play chess against ChatGPT 4 . Expect some "too many requests" hiccups along the way. ChatGPT gets pretty bad at making valid moves after the first 10 or so exchanges. This lets it retry up to 5 times to make a valid move, but if it can't, it can't.
HTTP
devstats
tmcw
devstats
Developer Statistics This val lets you post statistics from your GitHub Actions runs to build charts of change over time. We do this by having a step at the end of our actions run like this: - name: devstats run: | curl -X "POST" "https://tmcw-devstats.web.val.run/" \ -H 'Authorization: Bearer ${{ secrets.DEVSTATS_TOKEN }}' \ -H 'Content-Type: application/json; charset=utf-8' \ -d $"{ \"name\": \"node_modules_kb\", \"value\": $(du -sk node_modules | awk '{print $1}') }" And setting a DEVSTATS_TOKEN value, which could be any short random value, both in Val Town environment variables and as a secret in your GitHub Actions configuration. Currently the name you attach to a statistic can be anything, and the value is expected to be a number.
HTTP
errorHandler
tmcw
errorHandler
An interactive, runnable TypeScript val by tmcw
Script
typeboxTest
tmcw
typeboxTest
An interactive, runnable TypeScript val by tmcw
Script
whenfilmed
tmcw
whenfilmed
A game where you guess when a movie was released. Man, those Disney movies are ancient !
HTTP
limeBadger
tmcw
limeBadger
@jsxImportSource npm:hono@3/jsx
HTTP
hackernewstopstory
tmcw
hackernewstopstory
Something
HTTP
brownPelican
tmcw
brownPelican
An interactive, runnable TypeScript val by tmcw
HTTP
typeboxExample
tmcw
typeboxExample
This val demonstrates how TypeBox objects are interchangeable with JSON Schema objects - if you run JSON.stringify() on one of them, you immediately get a JSON Schema validator. They do, in memory, have additional methods and information, but their easy conversion to JSON Schema objects is a major win.
Script
fuchsiaSnipe
tmcw
fuchsiaSnipe
An interactive, runnable TypeScript val by tmcw
HTTP
greenAnglerfish
tmcw
greenAnglerfish
An interactive, runnable TypeScript val by tmcw
HTTP
jsrExample
tmcw
jsrExample
An interactive, runnable TypeScript val by tmcw
Script
beigeGoat
tmcw
beigeGoat
title: Beige Goat category: blob This val is a quick demo of setting and getting a blob.
Script