Search

Results include substring matches and semantically similar vals. Learn more
willthereader avatar
getContentFromUrl
@willthereader
getContentFromUrl Use this for summarizers. Combines https://r.jina.ai/URL and markdown.download's Youtube transcription getter to do its best to retrieve content from URLs. Usage: https://yawnxyz-getcontentfromurl.web.val.run/https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10187409/ https://yawnxyz-getcontentfromurl.web.val.run/https://www.youtube.com/watch?v=gzsczZnS84Y&ab_channel=PhageDirectory
HTTP (deprecated)
## getContentFromUrl
Use this for summarizers.
Combines `https://r.jina.ai/URL` and markdown.download's Youtube transcription getter to do its best to retrieve content from
Usage:
- https://yawnxyz-getcontentfromurl.web.val.run/https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10187409/
- https://yawnxyz-getcontentfromurl.web.val.run/https://www.youtube.com/watch?v=gzsczZnS84Y&ab_channel=PhageDirectory
/** @jsx jsx */
const app = new Hono();
export const getContentFromUrl = async (url: string) => {
try {
yawnxyz avatar
lucia_middleware
@yawnxyz
Lucia Middleware Import users. Backed by Val Town SQLite. Demo: @stevekrouse/lucia_middleware_demo If you want a version that is safe to import (but not call) on the frontend: import { luciaMiddleware } from "https://esm.town/v/stevekrouse/lucia_middleware_safe"; Usage Wrap your HTTP handler in it, ie export default luciaMiddleware(handler) In your handler, redirect to /auth/signup , /auth/login , /auth/logout to trigger those flows. Remember Response.redirect is broken in Val Town right now, so either use links or return new Response(null, { 302, headers: { Location: "/place/to/redirect" }}) In your HTTP handler, read the X-Lucia-Username header, ie const username = req.headers.get("X-Lucia-Username") If the user is logged in, you now have a username you can work with. If not, it will be empty Custom Sign Up and Log In pages By default, the middleware has very basic sign in and sign up pages. The only way to customize those right now is to fork this middleware and customize them to your liking. Todos [ ] Allow users to specify the users & sessions table [ ] Remove Hono from this middleware (attempted in this fork: @stevekrouse/lucia_middleware_vanilla) [ ] Allow users to customize the auth pages without forking the middleware Initially built by @pomdtr
Script
# Lucia Middleware
Import users. Backed by Val Town SQLite.
Demo: @stevekrouse/lucia_middleware_demo
If you want a version that is safe to import (but not call) on the frontend:
```ts
## Usage
/** @jsxImportSource npm:hono/jsx **/
// TODO - make these configurable
const userTable = "lucia_users_1";
const sessionTable = "lucia_sessions_1";
moe avatar
debug
@moe
An interactive, runnable TypeScript val by moe
HTTP (deprecated)
export default async function(req: Request) {
return Response.json({ test: "Hello, world!", "import.meta.url": import.meta.url });
stevekrouse avatar
Jumpchain_Website
@stevekrouse
@jsxImportSource https://esm.sh/hono@latest/jsx
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
export const homepage = (c: Context) => {
return c.html(
<html>
<head>
<title>What is Jumpchain?</title>
<style
dangerouslySetInnerHTML={{
__html:
`:root{--slate1: hsl(200, 7%, 8.8%);--slate2: hsl(195, 7.1%, 11%);--slate3: hsl(197, 6.8%, 13.6%);--slate4: hsl
borkdude avatar
squint
@borkdude
Run squint in val.town!
Script
Run squint in val.town!
export let dude = (async () => {
const squint = await import("npm:squint-cljs");
globalThis.squint_core = squint;
const program = `(js/console.log (+ 1 2 3))`;
let theString = squint.compileString(program, { repl: true, "elide-imports": true });
console.log(theString);
theString = theString.replace(`'squint-cljs/core.js'`, `'npm:squint-cljs/core.js'`);
const AsyncFunction = Object.getPrototypeOf(async function() {}).constructor;
await (new AsyncFunction(theString)());
jxnblk avatar
contrast_swatch
@jxnblk
@jsxImportSource https://esm.sh/preact
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/preact */
const HEXRE = /^[A-Fa-f0-9]{3,6}$/;
const toHex = str => HEXRE.test(str) ? "#" + str : str;
export default async function(req: Request): Promise<Response> {
const url = new URL(req.url);
const [a, b] = url.pathname.split("/").slice(1);
const size = 256;
const fontSize = 64;
const color = !!a ? toHex(a) : "#fff";
const bg = !!b ? toHex(b) : "#000";
chilly avatar
html
@chilly
An interactive, runnable TypeScript val by chilly
Script
export const html = () => {
return `<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><me
pomdtr avatar
github_cmdk_extension
@pomdtr
An interactive, runnable TypeScript val by pomdtr
Script
export function githubExtension({
token: string,
const app = new Hono();
app.get("/", (c) => {
return c.json({
type: "list",
list: {
items: [
"title": "Search Repositories"
app.get("/repos/search", (c) => {
pomdtr avatar
bookmarklets
@pomdtr
Bookmarklet Manager Write your bookmarklets in val.town. Usage You val should just contain your bookmarklet code. alert("Hi mom!"); Make sure that your val is either unlisted or public, and not named bookmarklets . Then navigate to https://pomdtr-bookmarklets.web.val.run/v/:author/:name to generate the bookmarklet link. Sharing a bookmarklet Make sure that your val is public, and add a #bookmarklet tag anywhere in the code. alert("Hi mom!"); // #bookmarklet It should automatically appears on https://pomdtr-bookmarklets.web.val.run . ⚠️ If you are using the Arc Browser , you can use the Powerlet extension to install bookmarklets.
HTTP (deprecated)
# Bookmarklet Manager
Write your bookmarklets in val.town.
## Usage
You val should just contain your bookmarklet code.
```typescript
alert("Hi mom!");
/** @jsxImportSource https://esm.sh/hono@3.9.2/jsx **/
const app = new Hono();
async function bookmarkletUrl(author: string, name: string) {
const resp = await fetch(`https://esm.town/v/${author}/${name}`);
janpaul123 avatar
valle_tmp_562580635116363837652861654341074
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/react */
// Set these to your own
const username = "janpaul123";
const tempValsParentFolderId = "4bb7b010-4443-11ef-8642-de64eea55b61";
const valTownToken = Deno.env.get("valtown");
const vt = new ValTown({ bearerToken: valTownToken });
const app = new Hono();
const jsxResponse = (jsx) => {
return new Response(renderToString(jsx), { headers: { "Content-Type": "text/html" } });
const systemprompt = `The conversation below is your recent interaction with the user.
janpaul123 avatar
valle_tmp_9571549127942918010434925760972602
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/react */
// Set these to your own
const username = "janpaul123";
const tempValsParentFolderId = "4bb7b010-4443-11ef-8642-de64eea55b61";
const valTownToken = Deno.env.get("valtown");
const vt = new ValTown({ bearerToken: valTownToken });
const app = new Hono();
const jsxResponse = (jsx) => {
return new Response(renderToString(jsx), { headers: { "Content-Type": "text/html" } });
const systemprompt = `The conversation below is your recent interaction with the user.
stevekrouse avatar
harlequinEmu
@stevekrouse
SQLite Explorer (Dev Branch) 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 (v81) 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 [x] 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 [x] 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 (deprecated)
# SQLite Explorer (Dev Branch)
View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stev
![image.webp](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/c8e102fd-39ca-4bfb-372a-8d36daf43900/public)
## Install
Install the latest stable version (v81) by forking this val:
[![Install Stable Release (v81)](https://stevekrouse-button.express.val.run/Install%20Stable%20Release%20(v81))](https://www.
/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
EditorSection,
MockTable,
Separator,
nbbaier avatar
readabilityHTTPProxy
@nbbaier
An interactive, runnable TypeScript val by nbbaier
HTTP (deprecated)
// @ts-expect-error
type Article = {
title: string;
content: string;
textContent: string;
length: number;
excerpt: string;
byline: string;
dir: string;
siteName: string;
jdan avatar
emojiByVersion
@jdan
An interactive, runnable TypeScript val by jdan
Script
import { allEmoji } from "https://esm.town/v/jdan/allEmoji";
export const emojiByVersion = (async () => {
const _ = await import("npm:lodash-es");
return _.groupBy(allEmoji, (emoji) => emoji.unicodeVersion);
pomdtr avatar
sqliteExplorerApp
@pomdtr
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 (v37) by forking this val that imports & exports it in your account: Authentication SQLite Explorer basic authentication with your Val Town API Token as the password (leave the username field blank). Todos / Plans [ ] fix wonky sidebar separator height problem [ ] improve error handling [ ] improve table formatting [ ] make result tables scrollable [ ] 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 [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val ) [ ] add export to sqlite [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [x] add listener for cmd+enter to submit query [ ] add views to the sidebar
HTTP (deprecated)
# SQLite Explorer
View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stev
![image.webp](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/c8e102fd-39ca-4bfb-372a-8d36daf43900/public)
## Install
Install the latest stable version (v37) by forking this val that imports & exports it in your account:
[![Install v37](https://stevekrouse-button.express.val.run/Install%20v37)](https://www.val.town/v/stevekrouse/sqlite_explorer
/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
EditorSection,
MockTable,
Separator,