Avatar

tmcw

👷 Building Val Town
Joined August 31, 2022
Public vals
167
tmcw avatar
tmcw
sensibleSilverSwan
Script
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
bandcampWrappedScript
Script
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
bandcampWrapped
HTTP
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 .
1
tmcw avatar
tmcw
chatgptchess
HTTP
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.
0
tmcw avatar
tmcw
devstats
HTTP
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.
4
tmcw avatar
tmcw
errorHandler
Script
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
typeboxTest
Script
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
whenfilmed
HTTP
A game where you guess when a movie was released. Man, those Disney movies are ancient !
2
tmcw avatar
tmcw
limeBadger
HTTP
@jsxImportSource npm:hono@3/jsx
0
tmcw avatar
tmcw
hackernewstopstory
HTTP
Something
0
tmcw avatar
tmcw
brownPelican
HTTP
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
typeboxExample
Script
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.
0
tmcw avatar
tmcw
fuchsiaSnipe
HTTP
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
greenAnglerfish
HTTP
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
jsrExample
Script
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
beigeGoat
Script
title: Beige Goat category: blob This val is a quick demo of setting and getting a blob.
0