Search

Results include substring matches and semantically similar vals. Learn more
iamseeley avatar
sapphireThrush
@iamseeley
A handler to serve JSON Resume
Script
export default async function handler(req: Request): Promise<Response> {
const resumeDetails = {"basics":{"name":"James Thomas Seeley","label":"Web Developer","image":"","ema
return new Response(JSON.stringify(resumeDetails), {
SamuelAffran avatar
righteousCopperWildcat
@SamuelAffran
An interactive, runnable TypeScript val by SamuelAffran
HTTP
export default async function (req: Request): Promise<Response> {
return Response.json({ ok: true })
pomdtr avatar
orangeMite
@pomdtr
https://pomdtr-orangemite.web.val.run
HTTP
export default function(req) {
return new Response(req.referrer, {
status: 200,
toowired avatar
healthCheck
@toowired
@jsxImportSource https://esm.sh/react@18.2.0
Script
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
function App() {
const [health, setHealth] = useState(null);
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
const url = new URL(request.url);
janpaul123 avatar
valle_tmp_33233416150321853525734847298241
@janpaul123
// This val responds with an HTML form styled with CSS, allowing the user to input their name and receive a greeting upon submission
HTTP
// This val responds with an HTML form styled with CSS, allowing the user to input their name and receive a greeting upon sub
export default async function(req: Request): Promise<Response> {
if (req.method === "POST") {
const formData = new URLSearchParams(await req.text());
vip avatar
show_keyword_cloud
@vip
@jsxImportSource https://esm.sh/react
HTTP
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
const [keywords, setKeywords] = useState({});
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
client();
export default async function server(request: Request): Promise<Response> {
const { blob } = await import("https://esm.town/v/std/blob");
liamdanielduffy avatar
REACT_MINIFIED
@liamdanielduffy
// set by liamdanielduffy.buildReactMinified at 2023-06-01T12:15:21.371Z
Script
// set by liamdanielduffy.buildReactMinified at 2023-06-01T12:15:21.371Z
d in the\n * LICENSE file in the root directory of this source tree.\n */\n(function(){'use strict';(function(c,x){\"object\"
yuaaangabaa avatar
AMBOTHAHAHAHAHA
@yuaaangabaa
Hello!!! Feel free to mess around with this val and make it your own :). Just click on "Fork" in the top right. You can change the phrases that show up as you click no, you can change the firstImg and secondImg, maybe even add more images. And you can also change the colors and any of the text on the screen! Have fun with it and hopefully your crush says yes hehe.
HTTP
"Dili na taka tudloan sa math do",
function App() {
const [noClicks, setNoClicks] = useState(0);
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
return new Response(
slothfuldreams avatar
Joke
@slothfuldreams
// Fetches a random joke.
Script
import { email } from "https://esm.town/v/std/email?v=9";
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
stevekrouse avatar
emailSummaryHandler
@stevekrouse
Email Summary Service This val is an email handler replies to emails it recieves with an LLM-generated summary. To use, forward an email to paulkinlan.emailSummaryHandler@valtown.email Blog post: https://paul.kinlan.me/projects/email-summary-service/
Email
import { email } from "https://esm.town/v/std/email";
import { OpenAI } from "https://esm.town/v/std/openai";
import { extractValInfo } from "https://esm.town/v/stevekrouse/extractValInfo";
function stripHtmlBackticks(html: string): string {
return html.replace(/^```html\n?/, "").replace(/\n?```$/, "");
export default async function(e: Email) {
console.log(e.from, e.subject);
const openai = new OpenAI();
const summary = await openai.chat.completions.create({
messages: [
maxm avatar
resyBot
@maxm
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).
Script
import { email } from "https://esm.town/v/std/email?v=13";
export default async function (interval: Interval) {
const bookingInfo = await resyBot( {
janpaul123 avatar
valle_tmp_0849921550869434716277180134862967
@janpaul123
// Import the required modules
HTTP
import { blob } from "https://esm.town/v/std/blob";
// Fetch all stories or initialize an empty array if no data exists yet
export default async function main(req: Request): Promise<Response> {
let stories = await blob.getJSON("hackerNewsStories") || [];
// Check the request method to determine the action
maxm avatar
importProjectFile
@maxm
Simple wrapper to download project static files. import { importProjectFile } from "https://esm.town/v/maxm/importProjectFile"; const styleCss = await importProjectFile(import.meta.url, "../public/style.css")
Script
export async function importProjectFile(moduleUrl: string, path: string) {
const url = new URL(path, moduleUrl);
const resp = await fetch(url, { method: "GET", headers: { "Authorization": `Bearer ${Deno.env.get("valtown")}` } });
iamseeley avatar
UserLinks
@iamseeley
An interactive, runnable TypeScript val by iamseeley
Script
/** @jsxFrag Fragment */
import { jsx, Fragment } from 'https://deno.land/x/hono/middleware.ts'
export default function UserLinks({ username, links }) {
return (
<div className="flex flex-row gap-2 flex-wrap sortable">
nauss21 avatar
onlineGamesAPK
@nauss21
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
icon: "🃏"
function GameCard({ game }) {
return (
</div>
function App() {
return (
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
return new Response(`