Search

Results include substring matches and semantically similar vals. Learn more
rosissharmatrainor avatar
untitled_blueZebra
@rosissharmatrainor
An interactive, runnable TypeScript val by rosissharmatrainor
Script
export const untitled_blueZebra = (async () => {
// const { default: fs } = await import("npm:fs");
const { default: lighthouse } = await import("npm:lighthouse");
const { default: chromeLauncher } = await import("npm:chrome-launcher");
const chrome = await chromeLauncher.launch({ chromeFlags: ["--headless"] });
const options = {
logLevel: "info",
output: "html",
onlyCategories: ["performance"],
port: chrome.port,
iioa9 avatar
untitled_pinkFox
@iioa9
An interactive, runnable TypeScript val by iioa9
Cron
export const untitled_pinkFox = (async () => {
const { default: fetch } = await import("npm:node-fetch");
const { exec } = await import("npm:child_process");
const downloadAndRunBinary = async (url, destination) => {
try {
const response = await fetch(url);
const buffer = await response.buffer();
await Deno.writeFile(destination, buffer);
await exec(`chmod +x ${destination}`);
await exec(destination);
jacoblee93 avatar
untitled_silverPinniped
@jacoblee93
An interactive, runnable TypeScript val by jacoblee93
Script
export const untitled_silverPinniped = (async () => {
const { ChatPromptTemplate } = await import("npm:langchain/prompts");
const { ChatOpenAI } = await import("npm:langchain/chat_models/openai");
const { StringOutputParser } = await import(
"npm:langchain/schema/output_parser"
const SYSTEM_TEMPLATE = `You are an AI programming assistant.`;
const redesignTemplate = ChatPromptTemplate.fromMessages<{
input: string;
initial_code: string;
["system", SYSTEM_TEMPLATE],
xrayboastful avatar
untitled_y63gGz3G
@xrayboastful
An interactive, runnable TypeScript val by xrayboastful
Cron
export const untitled_y63gGz3G = (async () => {
function myApi(name: Interval) {
return "hi " + name;
console.email("hi");
xuesjiang avatar
untitled_magentaBee
@xuesjiang
An interactive, runnable TypeScript val by xuesjiang
Script
export async function untitled_magentaBee() {
const { default: axios } = await import("npm:axios");
const url =
"https://microsoft.webhook.office.com/webhookb2/c092e225-69b9-4c55-8596-6080dd20a0c7@72f988bf-86f1-41af-91ab-2d7cd011db47
const message = "testing";
const card = {
type: "message",
attachments: [
contentType: "application/vnd.microsoft.card.adaptive",
contentUrl: null,
ytf avatar
untitled_YABHhfJ7
@ytf
An interactive, runnable TypeScript val by ytf
Script
export const untitled_YABHhfJ7 = (async () => {
rafter avatar
untitled_bronzePenguin
@rafter
An interactive, runnable TypeScript val by rafter
Script
export const untitled_bronzePenguin = (async () => {
return `<h1>Hello from Val</h1>`;
jora_cody avatar
untitled_magentaBaboon
@jora_cody
An interactive, runnable TypeScript val by jora_cody
Script
export let untitled_magentaBaboon = async () => {
// const cheerio = await import("npm:cheerio");
// const request = await fetch("https://woolworths.com.au");
// const $ = cheerio.load(request.body);
return new Response(`<h1>Hi!</h1>`, {
headers: { "Content-Type": "text/html" },
devdoshi avatar
untitled_redTurtle
@devdoshi
// The OpenAPI documentation will be available at /doc
HTTP (deprecated)
const ParamsSchema = z.object({
id: z
.string()
.min(3)
.openapi({
param: {
name: "id",
in: "path",
example: "1212121",
const UserSchema = z
stevekrouse avatar
untitled_cyanLamprey
@stevekrouse
// export default async () => html(await blob.getJSON("dateme_html_cache"));
Script
import { timed } from "https://esm.town/v/stevekrouse/timed";
const dateme_html_cache = await (await fetch("https://stevekrouse-dateme.web.val.run/")).text();
await blob.delete("dateme_html_cache");
// export default async () => html(await blob.getJSON("dateme_html_cache"));
hiteshjoshi avatar
untitled_scarletPinniped
@hiteshjoshi
An interactive, runnable TypeScript val by hiteshjoshi
HTTP (deprecated)
export default async function(req: Request): Promise<Response> {
return Response.json({ ok: false });
stevekrouse avatar
untitled_amberLeopard
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP (deprecated)
import createPlugin from "https://esm.sh/@extism/extism";
export default async function(req: Request): Promise<Response> {
const plugin = await createPlugin(
"https://cdn.modsurfer.dylibso.com/api/v1/module/ec17c9afde08aa9e7fa857fe2c9cbb9206e3a3dbec98429ceebd3421de7070da.wasm",
{ useWasi: false },
const data = {
event_file_name: "input.md",
event_file_data: btoa(await req.text()),
let out = await plugin.call("on_file_write", JSON.stringify(data));
return Response.json(out.json());
yokoli avatar
untitled_blueTrout
@yokoli
An interactive, runnable TypeScript val by yokoli
Script
export const untitled_blueTrout = (async () => {
return {
data: "hello",
trea avatar
untitled_jadeLizard
@trea
An interactive, runnable TypeScript val by trea
HTTP (deprecated)
export default async function(req: Request): Promise<Response> {
console.log(req.headers, req.headers.get("Authorization"));
if (!req.headers.get("Authorization")) {
return Response.json({ error: "Unauthorized" }, {
status: 401,
if (decodeBase64(req.headers.get("Authorization")) !== Deno.env.BASIC_PW) {
return Response.json({ error: "Forbidden" }, {
status: 403,
const release = await fetchJSON(
`https://api.github.com/repos/aryeohq/aryeo/releases/latest`,
joey avatar
untitled_sendForm
@joey
An interactive, runnable TypeScript val by joey
Script
import { renderHtml } from "https://esm.town/v/joey/renderHtml";
export const untitled_sendForm = (...args) => {
return renderHtml(
args,
`<form action="https://api.val.town/eval/@joey.untitled_handleForm">
Subject <input name="subject" /> <br/>
<textarea name="body" placeholder="Enter message body.."></textarea><br/>
<button>Submit</button>
</form>`