Trending Vals

91
mattx avatar
mattx
verify_discord_signature
Script
verify_discord_signature Verify HTTP signatures coming from Discord. public_key should be the Ed25519 public key from Discord, as a hex string body should be the request body as a string. If you have a JSON object as the request body, use JSON.stringify. signature should be the X-Signature-Ed25519 header timestamp should be the X-Signature-Timestamp header You must return a 401 error and return early if this function returns false, otherwise you will pretty quickly get a big scary warning from Discord that your endpoint has been removed. Note that you'll only be able to add one once you've integrated this correctly. As this function only deals with strings, it doesn't matter whether you use an Express or web endpoint.
1
92
maxm avatar
maxm
robPikeIO
HTTP
Forked from maxm/SSEDemo
0
93
Johner avatar
Johner
idealJadeGerbil
HTTP
Forked from stevekrouse/cerebras_coder
0
94
stevekrouse avatar
stevekrouse
DenoSyntheticKV
Script
Replacement for Deno KV for Val Town on top of @std/sqlite.
1
95
iamseeley avatar
iamseeley
sendSMS
Script
💬 Email-to-SMS Send text messages on Val Town! Usage import { sendSMS } from 'https://esm.town/v/iamseeley/sendSMS'; sendSMS(phoneNumber: string, message: string, carrier: string): Promise<void> Parameters phoneNumber: The recipient's phone number (string of digits, no spaces or dashes) message: The text message you want to send carrier: The recipient's cell phone carrier. Supported carriers: 'att' (AT&T), 'tmobile' (T-Mobile), 'verizon' (Verizon), 'sprint' (Sprint) List of Email-To-SMS Addresses Comment on this val if you'd like me to add a carrier from the above list! Example import { sendSMS } from 'https://esm.town/v/iamseeley/sendSMS'; sendSMS('1234567890', 'Hello from Val Town!', 'verizon');
6
96
stevekrouse avatar
stevekrouse
pipedream
Script
Pipedream helpers Pipedream offers an Accounts API to handle OAuth for you, automatically, and for free. How to do it is covered in this guide . The helper functions below can make it easier to work with various Google API. For example, I used them like so to get all my free/busy times for this week from all my google calendars: import { pipeDreamGoogle } from "https://esm.town/v/stevekrouse/pipedream"; const accountId = "REPLACE_WITH_YOUR_GCAL_ACCOUNT_ID_FROM_PIPEDREAM"; const calendar = await pipeDreamGoogle("calendar", accountId); // Function to get free/busy information async function getFreeBusyTimes(calendarId: string) { const now = new Date(); const startOfWeek = new Date(now); startOfWeek.setDate(now.getDate() - now.getDay()); const endOfWeek = new Date(startOfWeek); endOfWeek.setDate(startOfWeek.getDate() + 6); const requestBody = { timeMin: startOfWeek.toISOString(), timeMax: endOfWeek.toISOString(), items: [{ id: calendarId }], }; const freeBusyResponse = await calendar.freebusy.query({ requestBody, }); return freeBusyResponse.data.calendars[calendarId].busy; } const calendars = (await calendar.calendarList.list()).data.items; const freeBusy = await Promise.all(calendars.map(calendar => getFreeBusyTimes(calendar.id))); console.log(freeBusy); In order for this to work you need to follow the instructions in this guide to save your pipedream API key into your Val Town Environment Variables under pipedream , then connect the google account you care about to Pipedream, and copy it's Pipedream "account id" into your val code. Let me know if you need any help by commenting on this val!
0
97
rochambeau314 avatar
rochambeau314
gsheet_call_logged
Script
Forked from mattx/gsheet_call
0
98
flymaster avatar
flymaster
cleanup
Cron
Every day, this val sends a message to NTFY.sh, causing my phone to prompt me to fill out a Google Form recording a single object that I decluttered from my house that day.
0
99
hunty avatar
hunty
spotify
HTTP
Forked from stevekrouse/spotify
0
100
tr3ntg avatar
tr3ntg
replaceEmojisWithImages
Script
Accepts an HTML string ( body.html ) and returns an emoji-escaped replacement. The purpose of this is due to official PDF spec's lack of support for emojis. This can be seen in the Anvil PDF Generation service as well - emojis are not rendered. node-emoji github here - replaces all emojis with spans emoji images for replacement are hosted at netlify (sourced from private repo)
0
101
tomas_padrieza avatar
tomas_padrieza
sendEmail
Script
Simple function to provide the Email sending capability. The internal is limited to the Pro version only.
0
102
sarahxc avatar
sarahxc
redditSearch
HTTP
Use Browserbase and Puppeteer to monitor and scrape reddit search results.
5
103
nn6n avatar
nn6n
protectiveCrimsonGalliform
Script
Forked from stevekrouse/protectiveCrimsonGalliform
1
104
stevekrouse avatar
stevekrouse
passionateScarletPrawn
HTTP
Forked from torlanco/shirtGenScript
1
105
joeljuca avatar
joeljuca
HeyVal
Script
HeyVal This is obviously a test.
1
106
postpostscript avatar
postpostscript
authMiddleware
Script
authMiddleware: middleware to protect your HTTP val Todo [ ] Human readable JWT claim validation errors
0
107
chrisagon avatar
chrisagon
cerebras_coder
HTTP
Forked from stevekrouse/cerebras_coder
1
108
browserbase avatar
browserbase
httpApiScreenshotPageExample
HTTP
Browserbase Browserbase offers a reliable, high performance serverless developer platform to run, manage, and monitor headless browsers at scale. Leverage our infrastructure to power your web automation and AI agents. Get started with Browserbase for free here . If you have any questions, reach out to developer@browserbase.com.
1
109
lisazz avatar
lisazz
Test00_getModelBuilder
Script
241219 練習 從 webup 而來
0
110
ianv avatar
ianv
blueskyAlert
Cron
Forked from stevekrouse/blueskyAlert
0
111
lime avatar
lime
ntfy
Script
Forked from xkonti/ntfy
0
112
postpostscript avatar
postpostscript
moduleHighlightValueLink
HTTP
moduleHighlightValueLink: Link to a Val With a Value or Method's Code Highlighted Examples: import { moduleHighlightValueLink, getRedirectUrl } from "https://esm.town/v/postpostscript/moduleHighlightValueLink"; console.log(await moduleHighlightValueLink("@std/email", "email")) // https://val.town/v/std/email#L6-42 console.log(await moduleHighlightValueLink("@postpostscript/moduleHighlightValueLink", "moduleHighlightValueLink")) // https://val.town/v/postpostscript/moduleHighlightValueLink#L6-20 // get URL you can imbed in an iframe console.log(getRedirectUrl("@postpostscript/moduleHighlightValueLink", "getRedirectUrl", true)); // https://postpostscript-modulehighlightvaluelink.web.val.run/?embed=1&module=%40postpostscript%2FmoduleHighlightValueLink&name=getRedirectUrl Iframe example: import { htmlResponse } from "https://esm.town/v/postpostscript/html"; import { getRedirectUrl } from "https://esm.town/v/postpostscript/moduleHighlightValueLink"; export default async function(req: Request): Promise<Response> { return htmlResponse` <iframe src="${getRedirectUrl(import.meta.url, "default", true)}" width="100%" height="100%"> </iframe> `; }
2
113
tonyesco avatar
tonyesco
cerebras_coder
HTTP
Forked from stevekrouse/cerebras_coder
0
114
defidax avatar
defidax
cerebras_coder
HTTP
Forked from stevekrouse/cerebras_coder
0
115
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
116
maxm avatar
maxm
valtowntown
HTTP
🏘️ Val Town Town Val Town implemented in Val Town. What if you want to build your own Val Town? What if you want features we haven't built yet? Val Town Town demonstrates how you can run untrusted code yourself. Extend it and see what you can build!
3
117
stevekrouse avatar
stevekrouse
protectiveCrimsonGalliform
Script
Forked from stevekrouse/getMyValId
0
118
justin2 avatar
justin2
cerebras_coder
HTTP
Forked from stevekrouse/cerebras_coder
0
119
brightspark avatar
brightspark
cerebras_coder
HTTP
Forked from stevekrouse/cerebras_coder
1
120
giglr avatar
giglr
cerebras_coder
HTTP
Forked from stevekrouse/cerebras_coder
1