Avatar

stevekrouse

mayor of val town
Likes
452
webup avatar
chatSampleReverseTokenDelim
@webup
Script
An interactive, runnable TypeScript val by webup
pdebie avatar
syncCommentToLemmy
@pdebie
Script
This allows copying specific comments from Reddit to a Lemmy thread. Might be super specific to my use case, but we use this for example to copy over some content from the r/SpaceX Starship thread to the one on the Lemmy community (with their blessing).
ericlee4 avatar
eclipseStreamData
@ericlee4
HTTP (deprecated)
List of Risk of Rain 2 eclipse streamers Data updated every 15 minutes viewerCount is the highest viewer count detected for the last stream Detects the tags "Eclipse" and "E8" in the title and tags (case insensitive)
ryanguill avatar
roamForm
@ryanguill
Express
An interactive, runnable TypeScript val by ryanguill
vtdocs avatar
supabaseInsertIntoMyFirstTable
@vtdocs
Script
Inserting into a table on Supabase using the Postgres. Part of the Supabase guide on docs.val.town .
pdebie avatar
publishYoutubeToLemmy
@pdebie
Script
Publish a Youtube feed to Lemmy This allows you to automatically publish a Youtube channel to to a Lemmy community. Example usage: async function publishMyFeed() { try { return @pdebie.publishYoutubeToLemmy({ instance: "lemm.ee", auth: @me.secrets.lemmee, communityId: 23316, youtubeChannelId: "UChZgikssAJkmiQOv_sO-ngQ", lastSyncTime: @pdebie.spacexLemmyDb.lastSync, }); } finally { @pdebie.spacexLemmyDb.lastSync = new Date().toISOString(); } } Get a Youtube channel ID here . Make sure to set your lastSync properly, since otherwise you'll keep publishing new posts!
vtdocs avatar
supabaseCreateMyFirstTable
@vtdocs
Script
Creating a table in Supabase via Postgres. Part of the Supabase guide on docs.val.town .
vtdocs avatar
supaBaseQuery
@vtdocs
Script
A helper for writing parameterized Postgres queries for Supabase. Part of the Supabase guide on docs.val.town .
jlast avatar
visitMetabase
@jlast
Cron
An interactive, runnable TypeScript val by jlast
pdebie avatar
youtubeFeed
@pdebie
Script
Fetches all videos for a Youtube channel, by using its RSS feed.
pdebie avatar
fetchRss
@pdebie
Script
This is an RSS parser val, similar to @stevekrouse.fetchRSS, but uses an NPM parsing library so it can support multiple RSS feed types easily.
vtdocs avatar
sha256
@vtdocs
Script
// Copied from https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
vtdocs avatar
resyBot
@vtdocs
Script
Resy bot This bot books restaurant reservations via Resy. Use it to snipe reservations at your favorite restaurant! How to use it Set up a scheduled val to call it like this: import { resyBot } from "https://esm.town/v/stevekrouse/resyBot?v=2"; import { email } from "https://esm.town/v/std/email?v=13"; export default async function (interval: Interval) { const bookingInfo = await resyBot( { slug: 'amaro-bar', city: 'ldn', day: '2023-07-05', start: '19:00', end: '21:00', partySize: 2, // Use https://www.val.town/settings/secrets for these! email: Deno.env.get("resyEmail"), password: Deno.env.get("resyPassword"), }) // If the val doesn't error, it successfully made a booking! // Send yourself an email like this: await email({ text: bookingInfo, subject: 'resy bot made a booking for you!' }) } How it works This val makes the same requests that your browser would make when you reserve a slot on Resy (that's why it needs your login info – to request an auth token). When there isn't a matching slot, this val errors and nothing else happens. When a booking is available, this val books it and returns a description of the booking so you can email it to yourself (Resy will also email you). This val will then stop attempting bookings for you until you change one of the arguments you're passing (it concats the non-sensitive arguments and uses this as a key). Credit to @rlesser and @alp for their existing Resy vals (search for resy on here).
vtdocs avatar
resyBookSlot
@vtdocs
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Given a valid booking token, this val attempts to make a reservation for the booking token's slot. There is some retry logic as the API route (rarely) returns an internal server error.
vtdocs avatar
resyGetMatchingSlot
@vtdocs
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) This val attempts to return a single valid slot (per the time range requirements). If there are no valid slots, it throws an error. When there are multiple valid slots, it picks the middle slot (by ordering, not necessarily by time).
tr3ntg avatar
untitled_silverGoose
@tr3ntg
Script
An interactive, runnable TypeScript val by tr3ntg