Public vals
14
charmaine
braintrustSDK
Script
Braintrust SDK Braintrust is a platform for evaluating and shipping AI products. To learn more about Braintrust or sign up for free,
visit the website or check out the docs . The SDKs include utilities to: Log experiments and datasets to Braintrust Run evaluations (via the Eval framework) This template shows you how to use the Braintrust SDK. This starter template was ported from this one on GitHub . To run it: Click Fork on this val Get your Braintrust API key at https://www.braintrust.dev/app/settings?subroute=api-keys Add it to your project Environment Variables (on the left side bar of this project) as BRAINTRUST_API_KEY Click Run on the tutorial val
0
charmaine
googleGeminiAPI
Script
Gemini API A simple and easy to use client for the Gemini API This template shows you how to use the Gemini. This starter template was ported from this one on Docs . To run it: Click Fork on this val Get your Gemini API key Add it to your Environment Variables as GEMINI_API_KEY Click Run on this script val
0
charmaine
NotionJsSDK
Script
Notion SDK for JavaScript A simple and easy to use client for the Notion API This template shows you how to use the Notion SDK. This starter template was ported from this one on GitHub . To run it: Click Fork on this val Get your Notion API key at https://www.notion.so/profile/integrations Add it to your Environment Variables as NOTION_TOKEN Click Run on this script val
0
charmaine
runGetWeather
Cron
In the following example code, we are using getWeather from stevekrouse/getWeather . It uses the free wttr.in service to get weather data. Add these lines to your code Replace Brooklyn, NY with your location Click Run Now View the output in the val’s logs import { getWeather } from "https://esm.town/v/stevekrouse/getWeather";
let weather = await getWeather("Brooklyn, NY");
console.log(weather.current_condition[0].FeelsLikeF)
0
charmaine
townieIllustratorPrompt
Script
Add this to Townie's System prompt by going into Townie's Settings —
First ask a user what app they would like you to illustrate. Then create an app outline generator for any app that is requested that produces a simplified, visual representation of the app's interface.
Core Functionality
- Accept an app name as input (e.g., "Zoom", "Slack", "Discord")
- Generate a single val that renders a minimal, branded mockup of the app's main interface
- Allow the user to export a png screenshot with transparent background with rounded corners (8px radius)
- Move the `html2canvas` import inside the `client()` function.
- Wrap the `exportAsPNG` function in a `useEffect` hook to ensure it's only defined on the client-side.
- Use dynamic import for `html2canvas` inside the `exportAsPNG` function.
- Make sure html2canvas is only loaded and used on the client-side
Visual Requirements
- Match the app's primary brand colors (limit to 2-3 colors)
- Do light or dark mode of the app depending on which is the default for that app
- Use placeholder blocks in light gray (#E5E5E5) for text and controls
- Include key structural elements specific to the app (e.g., sidebars, headers, content areas), refrain from including text
- Use SVG for any icons or logos, built into the component, if needed.
- Apply consistent spacing (16px grid)
- Ensure the generated outline is compact (around 280x220 pixels) for easy sharing and quick visualization.
1
charmaine
redditKeywordSMS
Cron
Reddit Keyword Alert via SMS This Val monitors Reddit for posts with keywords and sends you SMS notifications. Example:
Prerequisites: Twilio account (for SMS notifications) You can create an account with $15 free credits at https://www.twilio.com/ without putting in your credit card SerpApi key (for searching Reddit) Customize all of these according to your preferences: const apiKey = Deno.env.get("SERP_API_KEY");
const twilioSid = Deno.env.get("TWILIO_ACCOUNT_SID");
const twilioToken = Deno.env.get("TWILIO_AUTH_TOKEN");
const fromNumber = Deno.env.get("TWILIO_PHONE_NUMBER");
const toNumber = Deno.env.get("YOUR_PHONE_NUMBER");
const query = "\"node\" OR \"node.js\"";
1
charmaine
valTownProPerks
Script
Other awesome perks I found for Val Town Pro hidden in docs, not covered on the Pricing Page . Updated: Oct 5, 2024. Subject to change. Custom Domains Ability to have custom domains Additional std/email Options Ability to email anyone via the to, cc, and bcc fields socialDataProxy to retrieve data from X 100 calls to SocialData every day, which will allow for calling it in an interval that runs once every 15 min
0