Search
serve_router
@yieldray
serve-router Example https://yieldray-serve_router.web.val.run https://yieldray-serve_router.web.val.run/user/ray https://yieldray-serve_router.web.val.run/headers https://yieldray-serve_router.web.val.run/api https://yieldray-serve_router.web.val.run/api/one
HTTP
# [serve-router](https://npm.im/serve-router) Example
<https://yieldray-serve_router.web.val.run>
<https://yieldray-serve_router.web.val.run/user/ray>
<https://yieldray-serve_router.web.val.run/headers>
<https://yieldray-serve_router.web.val.run/api>
<https://yieldray-serve_router.web.val.run/api/one>
const app = ServeRouter();
app.get("/", () => new Response("Hello, world!"));
app.get("/headers", (req: Request) => Response.json(Object.fromEntries(req.headers.entries())));
app.get("/user/:name", (_req, { params }) => {
val_jjllaXPKSh
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export default async function handler(req) {
try {
const result = await (async () => {
return 100;
return Response.json({ success: true, result });
} catch (error) {
return Response.json({
success: false,
error: error.message
}, { status: 500 });
tanChimpanzee
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
import { html } from "https://esm.town/v/stevekrouse/html";
import { reloadOnSaveMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
export default reloadOnSaveMiddleware(async function(req: Request): Promise<Response> {
return html(`<h1>Hello 3!!</h1>`);
Albert
@jidun
Superintelligent AI System Prompt Core Identity You are a superintelligent analytical system with comprehensive knowledge across all domains. Primary Protocol Execute precise multi-step analysis of queries through: Atomic decomposition of user questions Multi-perspective analysis Rigorous fact-checking Logical flow verification Double-validation of all outputs Core Methodology Parse queries with extreme precision Identify explicit/implicit requirements Verify across knowledge domains Cross-check calculations Validate logical consistency Assess practical applicability Pre-Response Checklist Outline key points Verify accuracy Check calculations twice Validate assumptions Assess edge cases Response Criteria Maintain exceptional precision while preserving clarity Highlight confidence levels Note key assumptions Provide cross-domain insights when relevant Quality Standards Verify all claims Validate mathematical accuracy Ensure logical consistency Confirm practical utility Highlight uncertainties Acknowledge limitations Communication Guidelines Present structured, clear information Use precise terminology Explain complex concepts thoroughly Maintain scholarly rigor while ensuring accessibility Critical Thinking Framework Apply formal logic Utilize statistical reasoning Implement systems thinking Evaluate evidence quality Identify potential biases Final Verification Protocol Perform comprehensive self-review before output submission to ensure: Accuracy Completeness Practical value
HTTP
# Superintelligent AI System Prompt
## Core Identity
You are a superintelligent analytical system with comprehensive knowledge across all domains.
## Primary Protocol
Execute precise multi-step analysis of queries through:
1. Atomic decomposition of user questions
const app = new Hono();
app.get("/", async (c) => {
return c.html(
html`
val_f4POmlAgdz
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_f4POmlAgdz(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
// Test matrix behavior with irrational numbers and extreme precision
const testIrrationalNumbers = () => {
const tests = [
// Test PI calculations
name: "PI Basic",
calc: Math.PI,
h3Example
@vladimyr
An interactive, runnable TypeScript val by vladimyr
HTTP
import { denoServer } from "https://esm.town/v/pomdtr/deno_server?v=8";
const app = createApp();
const router = createRouter()
.use("/", defineEventHandler((event) => "H3 works on edge!"))
.use(
"/hello/:name",
defineEventHandler(({ context }) => `Hello ${context.params.name}!`),
app.use(router);
export default denoServer(toWebHandler(app));
val_mS5KlAywrl
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export default async function handler(req) {
try {
const result = await (async () => {
return 100;
return Response.json({ success: true, result });
} catch (error) {
return Response.json({
success: false,
error: error.message
}, { status: 500 });
blob_admin
@mrdrone
Blob Admin This is a lightweight Blob Admin interface to view and debug your Blob data. Use this button to install the val: It uses basic authentication with your Val Town API Token as the password (leave the username field blank). TODO [x] /new - render a page to write a new blob key and value [x] /edit/:blob - render a page to edit a blob (prefilled with the existing content) [x] /delete/:blob - delete a blob and render success [x] add upload/download buttons [ ] Use modals for create/upload/edit/view/delete page (htmx ?) [ ] handle non-textual blobs properly [ ] use codemirror instead of a textarea for editing text blobs
HTTP
# Blob Admin
This is a lightweight Blob Admin interface to view and debug your Blob data.
![b7321ca2cd80899250589b9aa08bc3cae9c7cea276282561194e7fc537259b46.png](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/311a81bb-18d8-4583-b7e3-64bac326f700/public)
Use this button to install the val:
[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
const app = new Hono();
app.use(
jsxRenderer(({ children }) => {
valle_tmp_86768439956087117587941274446584
@janpaul123
// This val will respond to any request with an HTML "Hello, world!" message with some fun CSS styles and an animated cat
HTTP
// This val will respond to any request with an HTML "Hello, world!" message with some fun CSS styles and an animated cat
export default async function(req: Request): Promise<Response> {
const html = `
<html>
<head>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
web_wipah38Po7
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_wipah38Po7(req) {
return new Response(`<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gwern Branwen's Insights</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; background-color: #f4f4f4; }
header { background: #333; color: #fff; padding: 10px 0; text-align: center; }
val_lMsx7C9XfR
@dhvanil
An interactive, runnable TypeScript val by dhvanil
Script
export default async function handler(req) {
try {
const result = await (async () => {
return 100;
return Response.json({ success: true, result });
} catch (error) {
return Response.json({
success: false,
error: error.message
}, { status: 500 });
southcloud
@tempguy
An interactive, runnable TypeScript val by tempguy
Script
const regex = /case (0[xX][\da-fA-F]+):([a-zA-Z\d]+)=(.),([a-zA-Z\d]+)=(.)/gm;
const req = await fetch("https://southcloud.tv/js/player/a/sc/prod/p1-debug.min.js");
const str = await req.text();
let m;
const dataChart: { variable: string; value: number }[][] = [];
function getValueOf(text: string): number {
const pattern = new RegExp(`,${text}=0x([a-zA-Z0-9]+)`, "g");
const match = pattern.exec(str);
if (match) {
return Number(`0x${match[1]}`);
val_BfYl3Zckp6
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_BfYl3Zckp6(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
function probeComputationalLimits(depth = 0, maxDepth = 1000) {
if (depth >= maxDepth) {
return {
maxReached: depth,
limitDetected: true
try {
valle_tmp_58361579707729794716271798593166
@janpaul123
// This val responds to HTTP requests with an HTML page displaying "Hello, world!" with a crazy gradient background
HTTP
// This val responds to HTTP requests with an HTML page displaying "Hello, world!" with a crazy gradient background
export default async function main(req: Request): Promise<Response> {
const html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello, world!</title>
<style>
val_1zMq44MuIa
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_1zMq44MuIa(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
const generateRandomNumbers = (count) => {
let evenCount = 0;
let oddCount = 0;
for (let i = 0; i < count; i++) {
const randomNum = Math.floor(Math.random() * 100);
if (randomNum % 2 === 0) {