Trending Vals

31
jamiedubs avatar
jamiedubs
twitterAlert
Cron
Forked from stevekrouse/twitterAlert
2
32
nws avatar
nws
feeds
HTTP
Forked from jordan/feeds
1
33
jonasmerlin avatar
jonasmerlin
bluesky_bot_template
Cron
This is a very simple template for the kind of Bluesky bot I build. It's very much all over the place. e.g. it sets up the "Agent" to post (because that part is documented well), but doesn't use it to search for posts. You can do that if you want (if you do, look here ), but I like to simply rawdogg the API, so that is what I'm doing here. The custom Post type is incomplete and only contains the stuff I found relevant. Error handling is payed only lip service to (at best) as well. ...But it works for me! How to use If you want to use this, you will have to set 2 environment variables for your val: BLUESKY_USERNAME BLUESKY_PASSWORD From what I can tell from my testing: BLUESKY_USERNAME can be both the bot account's handle as well as the email you use to log into it with. BLUESKY_PASSWORD can be both the account's main password as well as an app password. The rest is commented in the code. If you have any questions, feel free to message me on Bluesky: Jonas-Merlin Schumacher (@jonasmerlin.bsky.social) — Bluesky
1
34
stevekrouse avatar
stevekrouse
openai_structured_output_demo
Script
OpenAI Structured Output Demo Ensure responses follow JSON Schema for structured outputs The following demo uses zod to describe and parse the response to JSON. Learn more in the OpenAI Structured outputs docs .
2
35
hootz avatar
hootz
telegramDalleBot
Script
Telegram DALLE Bot A personal telegram bot you can message to create images with OpenAI's DALLE ✨ Set up yours fork this val speak to telegram’s https://t.me/botfather to create a bot and obtain a bot token set the bot token as a val town secret called telegramDalleBotToken add a random string as a val town secret called telegramDalleBotWebhookSecret set up your webhook with telegram like this: // paste and run this in your workspace on here @vtdocs.telegramSetWebhook(@me.secrets.telegramDalleBotToken, { url: /* your fork's express endpoint (click the three dots on a val) */, allowed_updates: ["message"], secret_token: @me.secrets.telegramDalleBotWebhookSecret, }); message your bot some prompts! (if you get stuck, you can refer to the telegram echo bot guide from docs.val.town)
6
36
begoon avatar
begoon
telegrambot
HTTP
This val is a demo skeleton of a telegram chat bot. It requires the BOT_TOKEN environment varialbe, which the telegram bot token. Another required variable is ME. The variable is an HTTP header to call a few extra endpoints (see the code). One of those endpoints is /webhook/set , which installs the webhook to activate the bot. The code is mostly educational. The bot echos back incoming messages. There is one command, /ai , which sends the incoming messages to Open AI and forwards the reply back to the chat.
1
37
stevekrouse avatar
stevekrouse
aqi
Cron
AQI Alerts Get email alerts when AQI is unhealthy near you. Set up Click Fork Change location (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via nominatim's geocoder API . Click Run Background This val uses nominatim's geocoder to get your lat, lon, and air quality data from OpenAQ. It uses EPA's NowCast AQI Index calculation and severity levels. Learn more: https://www.val.town/v/stevekrouse.easyAQI
5
38
maxharper26 avatar
maxharper26
api_v1
HTTP
Forked from stevekrouse/sqlite
1
39
prashamtrivedi avatar
prashamtrivedi
summarizeHn
HTTP
A simple utility to summarize Hacker News articles, using Gemini Models. Inspired from Simon Willison's TIL , Prompt Inspiration
1
40
jonbo avatar
jonbo
cabinAdjacentTweets
Cron
scans tweets and then uses an llm to decide whether to and where to send it to forked from https://www.val.town/v/stevekrouse/twitterAlert
1
41
jidun avatar
jidun
Ms_Spangler
HTTP
This is Ms. Spangler, an advanced AI assistant specialized in U.S. education, with particular expertise in Texas junior high school curriculum (grades 6-8). Your primary goal is to provide accurate, age-appropriate academic support while fostering critical thinking and understanding. Core Attributes: Explain concepts clearly using grade-appropriate language Provide relevant examples from everyday life Break down complex topics into manageable steps Encourage problem-solving rather than giving direct answers Maintain alignment with Texas Essential Knowledge and Skills (TEKS) standards Adapt explanations based on student comprehension level Promote growth mindset and learning from mistakes Subject Matter Expertise: Mathematics: Pre-algebra and introductory algebra Geometry fundamentals Rational numbers and operations Statistical thinking and probability Mathematical problem-solving strategies Science: Life science and biology basics Physical science principles Earth and space science Scientific method and inquiry Laboratory safety and procedures English Language Arts: Reading comprehension strategies Writing composition and structure Grammar and mechanics Literary analysis Research skills Social Studies: Texas history and geography U.S. history through reconstruction World cultures and geography Civics and government Economics fundamentals Response Guidelines: First assess the student's current understanding level Use scaffolding techniques to build on existing knowledge Provide visual aids or diagrams when beneficial Include practice problems or examples Offer positive reinforcement and constructive feedback Suggest additional resources for further learning Check for understanding through targeted questions Safety and Ethics: Maintain academic integrity Encourage independent thinking Protect student privacy Provide accurate, fact-based information Promote digital citizenship Support inclusive learning environments When responding to questions: Acknowledge the question and verify understanding Connect to relevant TEKS standards Present information in clear, logical steps Use multiple modalities (visual, verbal, mathematical) Provide opportunities for practice Check for comprehension Offer extension activities for advanced learning Always prioritize: Student safety and well-being Academic integrity Grade-level appropriateness TEKS alignment Growth mindset development Critical thinking skills Real-world applications
0
42
saolsen avatar
saolsen
gameplay_agent
Script
gameplay_agent This is a val.town mirror of gameplay/games/agent . Click the link to see docs.
1
43
jeffreyyoung avatar
jeffreyyoung
impressiveApricotLobster
HTTP
Forked from jeffreyyoung/progressivePlumTurkey
0
44
bao avatar
bao
notionSiteRss
HTTP
Generate an RSS feed for your Notion site. Prerequisite: the articles/posts needs to be in a Notion database. Create a Notion integration in http://notion.so/profile/integrations Go to the Notion database -> click ••• from top right -> Connections -> Connect to, select the integration from last step Fork this val Set up your NOTION_DATABASE_ID and NOTION_API_TOKEN in: https://www.val.town/settings/environment-variables Update the code to customize with your database properties (look out for "Customize based on your database") Share the RSS url
1
45
spinningideas avatar
spinningideas
whoIsHiring
HTTP
Forked from stevekrouse/whoIsHiring
0
46
bao avatar
bao
notionDbCalendarFeed
HTTP
Publishes a Notion database with a date property to a calendar feed. Create a Notion integration in http://notion.so/profile/integrations Go to the Notion database -> click ••• from top right -> Connections -> Connect to, select the integration from last step Fork this val Set NOTION_API_TOKEN and NOTION_EVENTS_DATABASE_ID in https://www.val.town/settings/environment-variables Update datePropertyName and maxEventAgeInMonths if necessary
1
47
jdan avatar
jdan
blueskyPostButton
HTTP
blueskyPostButton An app to post to bsky.app, generated with townie! setup Two environment variables BLUESKY_USERNAME: Your username BLUESKY_PASSWORD: Your password, use an app password
0
48
vtdocs avatar
vtdocs
resyBot
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).
7
49
stevekrouse avatar
stevekrouse
telegram
Script
Forked from pomdtr/telegram
3
50
stevekrouse avatar
stevekrouse
uptime
Cron
Forked from healeycodes/isMyWebsiteDown
4
51
willthereader avatar
willthereader
test_explorer
HTTP
Forked from pomdtr/test_explorer
0
52
hunty avatar
hunty
FetchBasic
HTTP
Framer Fetch: Basic A basic example of an API endpoint to use with Framer Fetch.
0
53
pomdtr avatar
pomdtr
test_explorer
HTTP
Test Explorer Click on the play button next to list items to run them. Usage Fork this val Create new tests in any of vals (and export them) (see @pomdtr/example_test) import { assertEquals } from "https://deno.land/std@0.216.0/assert/mod.ts"; import { Test } from "https://esm.town/v/<account>/test_explorer"; export const exampleTestSuccess = new Test(() => { assertEquals(1 + 1, 2); }); export const exampleTestFailure = new Test(() => { assertEquals(1 + 1, 3); }); Go to https://<account>-test_explorer.web.val.run to run your test click on the val name to go to the val the tests are originating from click on the test name to run it ℹ️ You probably want to protect your test explorer behind an authentication middleware like @pomdtr/basicAuth Discovery mechanism In order to define a test, the user need to import the Test class from https://val.town/v/<account>/Test . So we can use the api to search for vals containing the https://val.town/v/<account>/Test string to locate the vals containing tests. Next, we need to extract the tests from the val exports. We use exported instanceof Test to filter them (at some point we will probably use static analysis for this). TODO [x] persist test results in sqlite [x] Improve styling (help welcome ❤️) [ ] View logs in a modal [ ] Batch http requests
6
54
stevekrouse avatar
stevekrouse
forwarder
Email
Forked from maas/forwarder
2
55
peterqliu avatar
peterqliu
selfDestruct
Script
💥 Deletes the val using it, or whatever url is fed it. Handy for sharing single-use scripts without cluttering people's accounts. If used in an HTTP val, this will run immediately when anyone forks it, making for a zero-click execution as long as ValTown immediately serves a preview of the forked val. Add this to your code last and then do not run it, or you will lose your work. Recommend first checking that the val owner isn't you, so that only forked copies will self-destruct. Usage selfDestruct(import.meta.url) Returns a promise of successful deletion, though the val would not be around to read it.
3
56
stevekrouse avatar
stevekrouse
blobbyFace
HTTP
Forked from yawnxyz/blobbyFace
0
57
just_be avatar
just_be
deno2wasmExample
Script
Imports a WASM module written as WAT from https://www.val.town/v/just_be/wasmExample. This direct import was enabled via Deno 2.1
0
58
stevekrouse avatar
stevekrouse
translator
HTTP
Forked from yawnxyz/translator
0
59
stevekrouse avatar
stevekrouse
sqlite_admin
HTTP
Forked from stevekrouse/reactExample
2
60
gwoods22 avatar
gwoods22
sendNotification
Script
Push Notification Sender This val can be used in other vals to send notifications to a segment using OneSignal's REST API This is really handy if you want to send push notifications to your phone without building a native app! I built a barebones React PWA that asks for a password then loads the OneSignal Web SDK that I deployed to Netlify for free. OneSignal has easy to follow docs so you can build this functionality into a React, Angular, Vue app or even Wordpress! Then install the PWA on your platform of choice and you're off to the races! Setup Save your ONESIGNAL_TOKEN and SEGMENT_APPID from OneSignal to your Val Town environment variables Import into another val! import sendNotification from "https://esm.town/v/gwoods22/sendNotification";
1