Trending Vals

241
saolsen avatar
saolsen
gameplay_connect4
Script
gameplay_connect4 This is a val.town mirror of gameplay/games/connect4 . Click the link to see docs.
0
242
saolsen avatar
saolsen
gameplay_games
Script
gameplay_games This is a val.town mirror of gameplay/games . Click the link to see docs.
0
243
adrienj avatar
adrienj
cors_proxy
HTTP
Forked from taras/cors_proxy
0
244
vtdocs avatar
vtdocs
resyBookSlot
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.
1
245
vtdocs avatar
vtdocs
resyGetSlotBookingToken
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Given a valid slot, this val generates the booking token that's required to place a reservation.
0
246
vtdocs avatar
vtdocs
resyGetMatchingSlot
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).
1
247
vtdocs avatar
vtdocs
resyVenueIdFromSlugAndCity
Script
(Part of: https://www.val.town/v/vtdocs.resyBot)
0
248
saolsen avatar
saolsen
gltf_torus
HTTP
Builds a torus as a gltf file and displays it with https://modelviewer.dev/ based on https://www.donmccurdy.com/2023/08/01/generating-gltf/ https://github.com/mrdoob/three.js/tree/dev/src/geometries
2
249
stevekrouse avatar
stevekrouse
ssr_react_mini
Script
Server-side Render React Mini Framework This is very experimental, more of a prototype of an architecture, than a true framework Example: https://www.val.town/v/stevekrouse/TodoApp
1
250
willthereader avatar
willthereader
fizzBuzzTest
HTTP
Forked from willthereader/test_explorer
0
251
maxm avatar
maxm
imgGenUrl
HTTP
Image generated from a path name powered by fal.ai https://maxm-imggenurl.web.val.run/firefly.jpg https://maxm-imggenurl.web.val.run/retro-computer-hacking.jpg https://maxm-imggenurl.web.val.run/100-yoyos-at-once.jpg
13
252
stevekrouse avatar
stevekrouse
newUserWelcomeEmail
HTTP
Todos [ ] write a readme [ ] change this val's name, and update the clerk webhook
2
253
stevekrouse avatar
stevekrouse
valTownInspirationEmail
Cron
Forked from rodrigotello/valTownInspirationEmail
2
254
yieldray avatar
yieldray
translate
HTTP
Translator using a public deepl api
2
255
kauri avatar
kauri
ddg_chat
HTTP
Simple AI chat app with markdown reneder utilizing DuckDuckGo Chat API
0
256
vtdocs avatar
vtdocs
resyAuth
Script
(Part of: https://www.val.town/v/vtdocs.resyBot) Get a user's auth token and payment methods.
0
257
kora avatar
kora
gemini
Script
When use, just import { flash } from "./gemini"
0
258
pomdtr avatar
pomdtr
libsqlstudio
HTTP
LibSQLStudio UI for Val Town Fork this val to get started. To authenticate, make sure to use the same email as your val town account.
3
259
torlanco avatar
torlanco
shirtGenScript
HTTP
👕 Shirtgen API Endpoint Shirtgen lets you generate AI-powered t-shirt designs with just a prompt! 🖋️ Choose between the standard "Flux Schnell" model or the enhanced "Pro" model. Perfect for creating unique custom apparel in seconds! 🚀 💡 How it Works Send a POST request to the endpoint with your design prompt. Toggle between Standard and Pro models using the useProModel flag. The AI generates a high-quality t-shirt design based on your prompt. 📥 Expected POST Data { "prompt": "A retro sunset with palm trees 🌴🌅", "useProModel": true }
0
260
yawnxyz avatar
yawnxyz
newsly
Email
Newsly inspired by https://kill-the-newsletter.com/ copy your email into a newsletter like substack read the newsletter here / store them into valtown you can set it so you can chat with it or send you alerts or whatever idk
1
261
yieldray avatar
yieldray
pushplus
Script
get token from: https://www.pushplus.plus/push1.html
2
262
kora avatar
kora
get_gemini_models
Script
Forked from cotr/get_gemini_models
0
263
stevekrouse avatar
stevekrouse
libsqlstudio
HTTP
Forked from pomdtr/libsqlstudio
0
264
stevekrouse avatar
stevekrouse
gitReleaseNotes
HTTP
Forked from kylem/gitReleaseNotes
0
265
stevekrouse avatar
stevekrouse
whoIsHiring
HTTP
Forked from vawogbemi/whoIsHiring
0
266
pomdtr avatar
pomdtr
code_search_is_easy
HTTP
Code Search is Easy Earlier this week, Tom MacWright posted Code Search is Hard . He describes the research he his doing to improve the code search experience of Val Town . It was a great read, and you might have seen it trending on Hacker News . As Val Town's most active user (behind Steve Krouse, one of the founders of Val Town), I for sure agree with Tom that the search feature needs improvements. But while reading his post, I immediately thought of a different approach to the problem. And a few hours later, Val Town Search was born. Do things that don't scale How does this new shiny search engine work? Well, it's quite simple. I wrote a Deno script that fetches all vals from the Val Town API. #!/usr/bin/env -S deno run -A import * as path from "https://deno.land/std/path/mod.ts"; const dir = path.join(import.meta.dirname!, "..", "vals"); const blocklist = Deno.readTextFileSync( path.join(import.meta.dirname!, "blocklist.txt") ) .split("\n") .map((line) => line.trim()) .filter((line) => line.length > 0); let url = `https://api.val.town/v1/search/vals?limit=100&query=+`; const vals = []; while (true) { console.log("fetching", url); const resp = await fetch(url); if (!resp.ok) { console.error(resp.statusText); Deno.exit(1); } const { data, links } = await resp.json(); vals.push(...data); if (!links.next) { break; } url = links.next; } Deno.removeSync(dir, { recursive: true }); Deno.mkdirSync(dir, { recursive: true }); for (const val of vals) { const slug = `${val.author.username}/${val.name}`; if (blocklist.includes(slug)) { console.log("skipping", slug); continue; } const userDir = path.join(dir, val.author.username); Deno.mkdirSync(userDir, { recursive: true }); Deno.writeTextFileSync(path.join(userDir, `${val.name}.tsx`), val.code); } I pushed the data to a Github Repository (now private) I added a Github Action that runs the script every hour to refresh the data. #!/usr/bin/env -S deno run -A import * as path from "https://deno.land/std/path/mod.ts"; const dir = path.join(import.meta.dirname!, "..", "vals"); const blocklist = Deno.readTextFileSync( path.join(import.meta.dirname!, "blocklist.txt") ) .split("\n") .map((line) => line.trim()) .filter((line) => line.length > 0); let url = `https://api.val.town/v1/search/vals?limit=100&query=+`; const vals = []; while (true) { console.log("fetching", url); const resp = await fetch(url); if (!resp.ok) { console.error(resp.statusText); Deno.exit(1); } const { data, links } = await resp.json(); vals.push(...data); if (!links.next) { break; } url = links.next; } Deno.removeSync(dir, { recursive: true }); Deno.mkdirSync(dir, { recursive: true }); for (const val of vals) { const slug = `${val.author.username}/${val.name}`; if (blocklist.includes(slug)) { console.log("skipping", slug); continue; } const userDir = path.join(dir, val.author.username); Deno.mkdirSync(userDir, { recursive: true }); Deno.writeTextFileSync(path.join(userDir, `${val.name}.tsx`), val.code); } I created a simple frontend on top of the Github Search API that allows you to search the data. It's hosted on Val Town (obviously). That was it. I didn't have to build a complex search engine, I just used the tools that were available to me. Is this a scalable solution for Val Town? Probably not. Am I abusing the Github API? Maybe. Does it work better than the current search feature of Val Town? Absolutely! I hope that the val.town engineers will come up with a search feature that will put my little project to shame. But for now, you won't find a better way to search for vals than Val Town Search . PS: This post was written / is served from Val Town
1
267
ashryanio avatar
ashryanio
openAiProxy
HTTP
openAiProxy Overview This val is a proxy server that interacts with the OpenAI API to generate responses based on prompts in the request body. The function handles incoming HTTP POST requests, processes the prompt, and returns a response generated by the LLM. Prerequisites Server-side: (Optional) An active OpenAI API key Client-side: Something that can make POST requests (browser code, Postman, cURL, another Val, etc) Usage Endpoint The primary endpoint for this function is designed to handle HTTP POST requests. Request Method : POST Content-Type : application/json Body : JSON object containing a prompt field (e.g. {"prompt": "Help me make a boat."} ) Example Request curl -X POST https://ashryanio-openaiproxy.web.val.run -H "Content-Type: application/json" -d '{"prompt": "Hello, OpenAI!"}' Response Content-Type : application/json Body : JSON object containing the response from the OpenAI language model. Example Response { "llmResponse": "Hi there! How can I assist you today?" } Error Handling 400 Bad Request : Returned if the prompt field is missing in the request body. 405 Method Not Allowed : Returned if any method other than POST or OPTIONS is used. 500 Internal Server Error : Returned if there is an error processing the request.
1
268
xkonti avatar
xkonti
extractHttpEndpoint
Script
Forked from pomdtr/extractValInfo
1
269
janpaul123 avatar
janpaul123
valleBlogV0
HTTP
Fork this val to your own profile. Create a Val Town API token , open the browser preview of this val, and use the API token as the password to log in.
3
270
dthyresson avatar
dthyresson
bedtimeStoryMaker
HTTP
Bedtime Story Maker Inspired from a RedwoodJS demo I mde last year, this adds generative art powered by Fal to the bedtime story maker. Start writing a story by picking a style (spooky, colofrol, adventurous an animal (penguin, mouse, unicorn, whale ...) a color for the animal and activity (befriends aliens, goes to the doctor, rides a rollercoaster, bakes a cake for friends) It uses OpenAI to write a children's bedtime story title summary story for a "fantastical story about a green whale who rides the bus" or the "spooky story about the tomato fox who explores a cave". Then using the summary, OpenAI geenrates another prompt to describe the instructions to geneate a childrens story book image. That's sent to Fal to generate an image. Stories get saved to bedtime_stories in SQLite for viewing, searching and maybe sharing. You then get a bedtime story to enjoy!
2