Search

Results include substring matches and semantically similar vals. Learn more
sammy avatar
scraper_template
@sammy
Website Scraper Template A basic website scraper template that can be ran on an interval to check for changes. It uses blob storage to save whatever data you'd like to compare the website to. Uses my sendNotification val to alert yourself of the change. Steps to use Add the scrapeURL you would like to scrape and pick a name for your blob storage blobKey . Change the "selector" value to fit your needs. cheerio is used to find the part of the page you'd like to check. Adjust the if statement to detect changes and update your blob Craft a message to be sent with sendNotification() function
Script
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
import * as cheerio from "npm:cheerio@1.0.0";
const [error, setError] = useState('');
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
roboninja avatar
huntTheWumpusWebVersion
@roboninja
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState, useEffect } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
// Game constants
</div>
function client() {
createRoot(document.getElementById("root")).render(<WumpusGame />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
jdan avatar
myspace
@jdan
Create your own Myspace profile, deployed to Val town. https://jdan-myspace.web.val.run Click "..." and select Fork to create your own. From there you can: Customize your own profile Or post on my wall by appending to messages and sending me a pull request
HTTP
"Middletown High School South",
"Middletown, NEW JERSEY",
"President: Computer Club",
start: "2006",
end: "2010",
kousun12 avatar
shotclip
@kousun12
SHOTCLIP Demo of embedding images with substrate , and querying them for semantic relevance. Use the query parameter prompt to control the search.
HTTP
/** @jsxImportSource npm:react **/
import process from "node:process";
import { renderToString } from "npm:react-dom@18/server";
import { QueryVectorStore, sb, Substrate } from "npm:substrate";
type ShotResult = {
kirineko avatar
orangeHello
@kirineko
@jsxImportSource npm:react
HTTP
/** @jsxImportSource npm:react **/
import { renderToString } from "npm:react-dom@18/server";
export default (req: Request) => {
return new Response(
janpaul123 avatar
valle_tmp_610457425865436710444833460520275
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import archiveVal from "https://esm.town/v/nbbaier/archiveVal?v=10";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
// Set these to your own
const username = "janpaul123";
hfu avatar
react_maplibre
@hfu
React MapLibre GL JS example Thanks: @yuiseki
HTTP
# React MapLibre GL JS example
Thanks: @yuiseki
import React from "npm:react";
import { renderToString } from "npm:react-dom/server";
export default async function(req: Request) {
vawogbemi avatar
multirouteHono
@vawogbemi
🌐 Multi-Route Website with Hono
HTTP
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>${personalData.name} | Server-side Hono</title>
<style>
${websiteStyles}
<p>{personalData.summary}</p>
<p>
<strong>This website is rendered server-side with Hono.</strong>
</p>
<p>
itsmesandip avatar
thoroughBlushHarrier
@itsmesandip
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react **/
import { renderToString } from "https://esm.sh/react-dom@18/server";
export default (req: Request) => {
return new Response(
stevekrouse avatar
valwriter
@stevekrouse
[ ] streaming [ ] send the code of the valwriter back to gpt (only if it's related, might need some threads, maybe a custom gpt would be a better fix, of course, could do it as a proxy...) [ ] make it easy to send errors back to gpt [ ] make it easy to get screenshots of the output back to gpt
HTTP
const examples = [
user: "website that shows the current time",
content: `/** @jsxImportSource npm:react */
export default function() {
return <h1>{new Date().toLocaleTimeString()}</h1>;
mahictn avatar
watchfulBlackAlligator
@mahictn
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
jxnblk avatar
valTownLogotypeReact
@jxnblk
@jsxImportSource npm:react
Script
/** @jsxImportSource npm:react */
import React from "npm:react";
export default function ValTownLogo(props: React.SVGProps<SVGSVGElement>) {
return (
postpostscript avatar
authMiddleware
@postpostscript
authMiddleware: middleware to protect your HTTP val Todo [ ] Human readable JWT claim validation errors
Script
const clientToken = qs.get("clientToken");
qs.delete("clientToken");
const [tokenPayload, clientTokenPayload] = await Promise.all([
tokenDecoded && clientToken && verifyThirdParty(clientToken, {
console.log("error validating clientToken", e, clientToken);
failReason = html`clientToken validation failed: ${e.message}`;
if (tokenPayload && clientTokenPayload) {
if (tokenPayload.clientTokenId === clientTokenPayload.jti) {
const { searchParams } = new URL(ENDPOINT + clientTokenPayload.returnTo.slice(HANDLER_NAME.length));
failReason = html`clientToken validation failed: client token id mismatch`;
manyone avatar
projectTweetGallery
@manyone
if you make a habit of announcing your projects in twitter, you can make a gallery of them by using townie to display the tweets as embedded tweets. this was the first prompt i typed... make a gallery (dark mode) of all these tweets i made: https://x.com/manyone/status/1848573330581795215 ... later, i requested the tweets to be displayed as embedded tweets and townie obliged readily.
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useRef, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const TWEET_IDS = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
dhvanil avatar
web_aoEiUErLLm
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
color: #fff;
overflow-x: hidden;
/* Side Navigation */
.control-panel {
position: fixed;