Search

Results include substring matches and semantically similar vals. Learn more
janpaul123 avatar
valle_tmp_69474411625492576302063848048847
@janpaul123
// This val will respond with a fun "Hello World" HTML page with crazy CSS style
HTTP
// This val will respond with a fun "Hello World" HTML page with crazy CSS style
export default async function(req: Request): Promise<Response> {
// CSS style for the HTML page
const cssStyle = `
<style>
body {
background: linear-gradient(to right, #FFD700, #FFA07A);
font-family: 'Comic Sans MS', cursive, sans-serif;
text-align: center;
h1 {
janpaul123 avatar
valle_tmp_5519595717424861508096128925398838
@janpaul123
// This val will respond with a fun HTML page with crazy fonts and gradients
HTTP
// This val will respond with a fun HTML page with crazy fonts and gradients
export default async function main(): Promise<Response> {
const htmlContent = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fun Page</title>
<style>
body {
janpaul123 avatar
valle_tmp_79449082377711518957085477914069
@janpaul123
// This val will serve an HTML page emulating a Hacker News clone.
HTTP
// This val will serve an HTML page emulating a Hacker News clone.
// It uses plain HTML and CSS to create the frontend. Eventually,
// we can make it interactive with additional scripts.
export default async function(req: Request): Promise<Response> {
const url = new URL(req.url);
const pathname = url.pathname;
// If the user navigates to a specific story page
if (pathname.startsWith("/story/")) {
const storyId = pathname.split("/")[2];
return new Response(renderStoryPage(storyId), {
stevekrouse avatar
Debugging_Guide
@stevekrouse
@jsxImportSource https://esm.sh/hono@latest/jsx
HTTP
/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
console.log("[Init] Starting Debugging_Guide val", new Date().toISOString());
export const Debugging_Guide = (c: any) => {
const html = `<!DOCTYPE html>
<html lang="en">
<head>
<title>Debugging Guide</title>
<style>
body {
font-family: system-ui, sans-serif;
dhvanil avatar
val_PNC37KiNLz
@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 });
janpaul123 avatar
valle_tmp_460295335507139905019372410787182
@janpaul123
// This val will serve an HTML page emulating a Hacker News clone.
HTTP
// This val will serve an HTML page emulating a Hacker News clone.
// It uses plain HTML and CSS to create the frontend. Eventually,
// we can make it interactive with additional scripts.
export default async function(req: Request): Promise<Response> {
const url = new URL(req.url);
const pathname = url.pathname;
// If the user navigates to a specific story page
if (pathname.startsWith("/story/")) {
const storyId = pathname.split("/")[2];
return new Response(renderStoryPage(storyId), {
dhvanil avatar
val_lg7edVgoMt
@dhvanil
An interactive, runnable TypeScript val by dhvanil
Script
export default async function handler(req) {
try {
const result = await (async () => {
function fibonacci() { let a = 0, b = 1; let fibNumbers = []; while (b < 1000) { if (b >= 100) fibNumbers.push(b)
fibonacci();
return Response.json({ success: true, result });
} catch (error) {
return Response.json({
success: false,
error: error.message
janpaul123 avatar
valle_tmp_583694900399154559282687336321139
@janpaul123
* This val will create a simple Hacker News clone with hardcoded example stories. * We'll use basic HTML for the layout and styling.
HTTP
* This val will create a simple Hacker News clone with hardcoded example stories.
* We'll use basic HTML for the layout and styling.
export default async function main(req: Request): Promise<Response> {
// Define some example stories
const stories = [
title: "First story on Hacker News",
link: "https://example.com/1",
points: 123,
author: "author1",
title: "Second story on Hacker News",
dhvanil avatar
val_kU5QVhf3AL
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_kU5QVhf3AL(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
// Advanced exploit of precision glitch - testing value manipulation
const precisionExploitAdvanced = () => {
// Function to force value transitions
const forceTransition = (start, end, steps = 10) => {
let results = [];
const stepSize = (end - start) / steps;
janpaul123 avatar
valle_tmp_9191960384088445030322446613876286
@janpaul123
// This val will serve an HTML page emulating a Hacker News clone.
HTTP
// This val will serve an HTML page emulating a Hacker News clone.
// It uses plain HTML and CSS to create the frontend. Eventually,
// we can make it interactive with additional scripts.
export default async function(req: Request): Promise<Response> {
const url = new URL(req.url);
const pathname = url.pathname;
// If the user navigates to a specific story page
if (pathname.startsWith("/story/")) {
const storyId = pathname.split("/")[2];
return new Response(renderStoryPage(storyId), {
janpaul123 avatar
valle_tmp_3233658868122850607834453753718762
@janpaul123
// This val responds with a styled "Hello, world!" in HTML with funky CSS gradients
HTTP
// This val responds with a styled "Hello, world!" in HTML with funky CSS gradients
export default async function main(req: Request): Promise<Response> {
const htmlContent = `
<html>
<head>
<style>
body {
background: linear-gradient(to right, #30cfd0 0%, #330867 100%);
text-align: center;
font-family: Arial, sans-serif;
janpaul123 avatar
valle_tmp_58806573259542467349524666831762
@janpaul123
// Response with a silly HTML page with crazy CSS and gradients
HTTP
// Response with a silly HTML page with crazy CSS and gradients
export default async function(req: Request): Promise<Response> {
const html = `
<html>
<head>
<style>
body {
background: linear-gradient(to right, #ff00ff, #00ff00, #0000ff);
font-family: Arial, sans-serif;
text-align: center;
dhvanil avatar
val_xrAXPiDVNV
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_xrAXPiDVNV(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
// Enhanced model with purpose regeneration
class PurposeNode {
constructor(id, initialPurpose) {
this.id = id;
this.purpose = initialPurpose;
this.connections = [];
rym avatar
home
@rym
// Access via https://api.val.town/v1/express/rym.home
Script
// Access via https://api.val.town/v1/express/rym.home
export async function home(req: express.Request, res: express.Response) {
const blocks = await blocks2();
console.log(
`Running 'home' with query: ${JSON.stringify(
req.query
)}\nbody:\n${JSON.stringify(req.body)}\n\nrequest:\n${JSON.stringify(req)}`
const pageName = typeof req.query.page === "string" ? req.query.page : null;
if (pageName && pageName !== "home") {
console.log(`Searching for page handler: ${pageName}`);
iamseeley avatar
RootLayout
@iamseeley
@jsxImportSource https://esm.sh/hono@latest/jsx
Script
/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
type RootLayoutProps = {
title: string;
children: any;
currentPath?: string;
export default function RootLayout({ title, children, currentPath }: RootLayoutProps) {
return (
<html lang="en" hx-boost="true" hx-swap="outerHTML transition:true">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />