Search

Results include substring matches and semantically similar vals. Learn more
mrrihanmeer avatar
zanyOrangeCow
@mrrihanmeer
@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(
iamseeley avatar
realtimeGenerateImageHandler
@iamseeley
An interactive, runnable TypeScript val by iamseeley
Script
import * as fal from "npm:@fal-ai/serverless-client";
fal.config({
credentials: Deno.env.get("FAL_KEY"),
portentouus avatar
adaptablePinkElk
@portentouus
@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(
torlanco avatar
shirtGen
@torlanco
👕 Shirtgen Shirtgen lets you generate AI-powered t-shirt designs with just a prompt! 🖋️ Choose between Flux Schnell or the Pro model for enhanced results, and watch AI bring your ideas to life in seconds. Perfect for creating custom apparel effortlessly! 🚀 How it Works Enter a prompt describing your design. Toggle between Standard and Pro models. Hit "Generate" to see your AI-crafted t-shirt design appear! Image Generation Sources With Replicate API Key : Uses Replicate Hosted Flux models for high-quality designs. Without Replicate Key : Falls back to a Val.town image generator for quick designs. Requirements Optional Replicate API Key : To use the advanced models, set REPLICATE_API_KEY in your environment.
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
interface PendingGeneration {
return <ImageGenerator />;
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
vawogbemi avatar
dateme_faq
@vawogbemi
@jsxImportSource npm:hono@3/jsx
Script
/** @jsxImportSource npm:hono@3/jsx */
import { handler } from "https://esm.town/v/pomdtr/ssr";
import date_me_faq from "https://esm.town/v/stevekrouse/dateme_faq_react";
import Layout from "https://esm.town/v/vawogbemi/dateme_layout";
let linkClass = "text-sky-600 hover:text-sky-500";
daisuke avatar
linkInBioTemplate
@daisuke
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import { renderToString } from "npm:react-dom/server";
export default async function(req: Request) {
return new Response(
nulo avatar
tweetArchiveViewer
@nulo
acá pueden ver los tweets historicos de algunas cuentas eliminadas o cuentas que podrían llegar a eliminar tweets a futuro. dumps generados con twitter-scraper y código públicamente disponible en catdevnull/milei-twitter
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
import { VariableSizeList as List } from "https://esm.sh/react-window?deps=react@18.2.0,react-dom@18.2.0";
import React, { useCallback, useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
const BASE_URL = "https://f004.backblazeb2.com/file/datos-argentina/irrelacionado-misc/";
if (rowRef.current) {
setSize(index, rowRef.current.clientHeight);
}, [index]);
if (rowRef.current) {
setSize(index, rowRef.current.clientHeight);
}, [tweet, index]);
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
Junayedchy avatar
courageousRoseSkink
@Junayedchy
@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(
stevekrouse avatar
amaranthYak
@stevekrouse
SQLite Explorer View and interact with your Val Town SQLite data. It's based off Steve's excellent SQLite Admin val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by LibSQL Studio by invisal . This is now more an SPA, with tables, queries and results showing up on the same page. Install Install the latest stable version (v66) by forking this val: Authentication Login to your SQLite Explorer with password authentication with your Val Town API Token as the password. Todos / Plans [ ] improve error handling [ ] improve table formatting [ ] sticky table headers [ ] add codemirror [ ] add loading indication to the run button (initial version shipped) [ ] add ability to favorite queries [ ] add saving of last query run for a table (started) [ ] add visible output for non-query statements [ ] add schema viewing [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [ ] add views to the sidebar [ ] add triggers to sidebar [ ] add upload from SQL, CSV and JSON [ ] add ability to connect to a non-val town Turso database [x] fix wonky sidebar separator height problem (thanks to @stevekrouse) [x] make result tables scrollable [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val . Thanks to @pomdtr for merging the initial version!) [x] add listener for cmd+enter to submit query
HTTP
- [ ] add schema viewing
- [ ] add refresh to table list sidebar after `CREATE/DROP/ALTER` statements
- [ ] add automatic execution of initial select query on double click
- [ ] add views to the sidebar
- [ ] add triggers to sidebar
- [ ] add upload from SQL, CSV and JSON
- [ ] add ability to connect to a non-val town Turso database
- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
- [x] make result tables scrollable
return c.render(
<main class="sidebar-layout">
<div class="sidebar">
<TablesList tables={tables}></TablesList>
<Separator direction="horizontal"></Separator>
<div class="not-sidebar">
<EditorSection />
jxnblk avatar
indirectionOGImage
@jxnblk
@jsxImportSource npm:react
HTTP
/** @jsxImportSource npm:react */
import { render } from "https://esm.town/v/jxnblk/reactSVG2PNG";
import wrap from "npm:word-wrap";
const MARGIN = 64;
stevekrouse avatar
cron_client_side_script_fork
@stevekrouse
CronGPT This is a minisite to help you create cron expressions, particularly for crons on Val Town. It was inspired by Cron Prompt , but also does the timezone conversion from wherever you are to UTC (typically the server timezone). Tech Hono for routing ( GET / and POST /compile .) Hono JSX HTML (probably overcomplicates things; should remove) @stevekrouse/openai, which is a light wrapper around @std/openai
HTTP
</div>
</body>
<script dangerouslySetInnerHTML={{ __html: `${clientScript}; clientScript()` }} />
</html>,
app.post("/compile", async (c) => {
const cron = content.replace("`", "");
return c.html(<Cron cron={cron} timezone={timezone} />);
function clientScript() {
// Set the timezone input
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
tmcw avatar
VALLErun
@tmcw
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import _ from "npm:lodash@4";
import { renderToString } from "npm:react-dom/server";
export default function(
const systemprompt = `All the above are example conversations and context you can refer to, but don't
consider it part of the current conversation. The conversation below is your recent interaction with the user.
Your entire response should only be TypeScript.
patodiaz avatar
worthyCoffeeEel
@patodiaz
@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(
stevekrouse avatar
dateme_layout_react
@stevekrouse
@jsxImportSource https://esm.sh/react@18.2.0
Script
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import {
NavLink,
Outlet,
useNavigation,
} from "https://esm.sh/react-router-dom@6.23.0?deps=react@18.2.0,react-dom@18.2.0";
const tabs = { "/": "Home", "/browse": "Browse", "/faq": "FAQ" };
export default function() {
willthereader avatar
mythBusterGraduationEdition
@willthereader
@jsxImportSource https://esm.sh/preact
HTTP
/** @jsxImportSource https://esm.sh/preact */
import { render } from "npm:preact-render-to-string";
export default async function(req: Request) {
return new Response(