Avatar

wilt

Joined January 12, 2023
Public vals
27
wilt avatar
wilt
emailToDiscordWebhook
Script
Email to Discord Forwarder Usage First, create a Discord Webhook and add it to your Val.town environment variables . Then create an Email Val: import { getEmailHandler } from "https://esm.town/v/wilt/emailToDiscordWebhook?v=19"; // e.g. ["email@example.com", "otherEmail.address.biz"] const senderAllowlist = JSON.parse(Deno.env.get("DISCORD_EMAIL_ALLOWLIST") || "[\"*\"]"); const webhookUrl = Deno.env.get("MY_DISCORD_WEBHOOK")!; export default getEmailHandler({ replyToSender: false, senderAllowlist, webhookUrl, }); Now, whenever you send an email to your email val, it will be forwarded to your Discord webhook
0
wilt avatar
wilt
npmProxy
HTTP
// import tsBlankSpace from "npm:ts-blank-space";
0
wilt avatar
wilt
competentBlushPuffin
HTTP
An interactive, runnable TypeScript val by wilt
0
wilt avatar
wilt
serializeRequest
Script
// Adapted from https://stackoverflow.com/a/57451139
0
wilt avatar
wilt
arcGISHonoMiddleware
Script
Copy of ArcGISIdentityManager.authorize() , OAuth2 authentication for the ESRI ArcGIS API which is implemented as Express middleware, ported to Hono.
0
wilt avatar
wilt
dotProduct
Script
Find the dot product between two arrays of numbers (representing 1-dimensional vectors). Requires that both arrays be the same length, but for speed doesn't actually check this - be sure to check yourself if there's a possibility they might not be.
0
wilt avatar
wilt
hash
Script
Take in any javascript object and return the sha-256 representation of that object as a hex-encoded string.
0
wilt avatar
wilt
monthDayYear
Script
An interactive, runnable TypeScript val by wilt
0
wilt avatar
wilt
miniWidget
HTTP
Did you know that in recent versions of Windows 11, PWAs can add themselves as desktop widgets? This is a demo of that. Because this PWA isn't published to the Microsoft Store, if you want to try this out for yourself you'll first need to install WinAppSDK version >= 1.2 , enable Developer Mode in settings following the instructions here , and visit https://wilt-miniWidget.web.val.run to install using a recent version of Edge.
3
wilt avatar
wilt
notFound
Script
An interactive, runnable TypeScript val by wilt
0
wilt avatar
wilt
artICGetRandom
HTTP
Get limit random public domain images from the Art Institute of Chicago
0
wilt avatar
wilt
thisUrl
Script
Programmatically get the API URLs for the val that calls this val. For example: // @wilt.myCoolVal: const myCoolVal = @wilt.thisUrl("web"); } // returns: // https://wilt-myCoolVal.web.val.run If targetVal is passed as entry , returns the URL of the very first val in the current call stack. For example: // @wilt.myFirstCoolVal: const myFirstCoolVal = @wilt.mySecondCoolVal()); } // @wilt.mySecondCoolVal: const mySecondCoolVal = () => { return @wilt.thisUrl("web", "entry"); } // Running @wilt.myFirstCoolVal returns: // https://wilt-myFirstCoolVal.web.val.run
0
wilt avatar
wilt
getYoutubeLinkFromPageAPI
Script
An interactive, runnable TypeScript val by wilt
0
wilt avatar
wilt
apiTest
HTTP
An interactive, runnable TypeScript val by wilt
0
wilt avatar
wilt
getYoutubeLinkFromPage
Script
An interactive, runnable TypeScript val by wilt
0
wilt avatar
wilt
untitled_tealYak
Script
An interactive, runnable TypeScript val by wilt
0