Search

Results include substring matches and semantically similar vals. Learn more
dhvanil avatar
val_hrjcREMr1T
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_hrjcREMr1T(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
// Create a simple program to analyze simulation patterns
const analyzeSimulationPatterns = () => {
const patterns = {
suspiciousElements: ['vending machines', 'plants', 'dinosaur skeletons'],
potentialGlitches: ['rendering delays', 'object repetition', 'boundary anomalies'],
weakPoints: ['room corners', 'object intersections', 'data streams']
janpaul123 avatar
valle_tmp_6873614193152713020375796522801748
@janpaul123
// This val serves an HTML page with a vibrant and eye-catching design for a greeting form.
HTTP
// This val serves an HTML page with a vibrant and eye-catching design for a greeting form.
export default async function(req: Request): Promise<Response> {
const decoder = new TextDecoder();
const formData = new URLSearchParams(decoder.decode(await req.arrayBuffer()));
let name = formData.get("name") || "Guest";
const html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
janpaul123 avatar
valle_tmp_252965239695386767447637901759725
@janpaul123
// This val will respond with a simple "Hello World" HTML page with fun CSS styling
HTTP
// This val will respond with a simple "Hello World" HTML page with fun CSS styling
export default async function(req: Request): Promise<Response> {
// HTML content with CSS styling
const htmlContent = `
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
tempdev avatar
srcbackend
@tempdev
// console.log(await doodstreamExtractor("9x3w3pu0xemy"));
Script
const nanoid = customAlphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 10);
export interface DataSheet {
site: "dood" | "streamtape" | null;
siteSpecificId: string;
extractedURL: string;
accessHeaders: {};
fromCache: boolean;
subtitles?: {
language: string;
url: string;
stevekrouse avatar
solidExample
@stevekrouse
@jsxImportSource https://esm.sh/solid-jsx
HTTP
/** @jsxImportSource https://esm.sh/solid-jsx */
import { renderToString } from "npm:solid-js/web";
export const solidExample = async () =>
new Response(await renderToString(() => <div>Test {1 + 1}</div>), {
headers: {
"Content-Type": "text/html",
tmcw avatar
expressHandler
@tmcw
An interactive, runnable TypeScript val by tmcw
Script
export let expressHandler = (req, res) => {
res.send("hello world");
stevekrouse avatar
geolocation_api_demo
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
export default async function (req: Request): Promise<Response> {
return html(`
<button id="find-me">Show my location</button><br />
<p id="status"></p>
<a id="map-link" target="_blank"></a>
<script>
function geoFindMe() {
const status = document.querySelector("#status");
const mapLink = document.querySelector("#map-link");
mapLink.href = "";
dhvanil avatar
val_PersGjiwTK
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_PersGjiwTK(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
const calculatePiDigits = (digits) => {
const pi = Math.PI.toString().replace('.', '');
return pi.slice(0, digits);
const piDigits = calculatePiDigits(1000);
return piDigits;
// Return the result in a properly formatted response
dhvanil avatar
val_ITkJGreHZz
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_ITkJGreHZz(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
const analyzePatterns = (numSamples) => { const patterns = {}; for (let i = 0; i < numSamples; i++) { const rando
// Return the result in a properly formatted response
return new Response(JSON.stringify({
result: result,
type: typeof result
headers: { 'Content-Type': 'application/json' }
janpaul123 avatar
valle_tmp_2412754491000326207956185825778217
@janpaul123
// Import the necessary modules
HTTP
// Import the necessary modules
import { serve } from "https://deno.land/std/http/server.ts";
// Define the port to listen to
const PORT = 8000;
// Create a server and listen for incoming requests
const server = serve({ port: PORT });
console.log(`Server running on http://localhost:${PORT}/`);
// Handle incoming requests
for await (const req of server) {
req.respond({ body: "Hello world\n" });
janpaul123 avatar
valle_tmp_65803358192794832692351816603127
@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), {
siygle avatar
sendPostToBsky
@siygle
An interactive, runnable TypeScript val by siygle
Script
export const sendPostToBsky = async (
{ identifier, password, text, facets },
const { default: AtProto } = await import("npm:@atproto/api");
const { BskyAgent, RichText } = AtProto;
const bskyService = "https://bsky.social";
const agent = new BskyAgent({ service: bskyService });
if (identifier && password && text) {
await agent.login({
identifier,
password,
janpaul123 avatar
valle_tmp_2561069655856986264488337570741
@janpaul123
// This val will respond with a funky HTML page with crazy fonts and gradients!
HTTP
// This val will respond with a funky 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>Hello World</title>
<style>
body {
jeffreyyoung avatar
scribbleToDrawing
@jeffreyyoung
An interactive, runnable TypeScript val by jeffreyyoung
HTTP
const replicate = new Replicate({
auth: Deno.env.get("REPLICATE_API_KEY"),
export default serve({
async *handleMessage(req) {
const lastMsg = req.query.at(-1);
const lastAttachment = lastMsg?.attachments?.at?.(0);
const url = lastAttachment?.url;
const content = lastMsg?.content?.trim();
if (!url) {
yield "Please send a image";
janpaul123 avatar
valle_tmp_168173191488171673357222933830397
@janpaul123
// This is a minimal formatter for JavaScript code using the Prettier library.
HTTP
// This is a minimal formatter for JavaScript code using the Prettier library.
// The formatter will receive JavaScript code through a POST request and return the formatted code.
import { Hono } from "npm:hono";
import prettier from "npm:prettier";
const app = new Hono();
app.post("/", async (c) => {
const jsCode = await c.req.text(); // Get the JS code from the request body
const formattedCode = prettier.format(jsCode, { parser: "babel" }); // Format the JS code using Prettier
return c.text(formattedCode); // Return the formatted code as text
export default app.fetch;