Search

Results include substring matches and semantically similar vals. Learn more
crif avatar
viewSource
@crif
View source code Just like a right click + inspect on desktop, except available on mobile too! Just write the website after the / e.g. https://neverstew-viewSource.web.val.run/bbc.co.uk
HTTP
# View source code
Just like a right click + inspect on desktop, except available on mobile too! Just write the website after the `/`
e.g.
```https://neverstew-viewSource.web.val.run/bbc.co.uk```
export default async function viewSource(req: Request) {
const pathname = new URL(req.url).pathname;
const html = await fetchText(
pathname === "/"
? "https://www.flipkart.com/peter-england-analog-watch-men/p/itmabb4bc1893d05?pid=WATG6YGDUYAUEEMB&cmpid=product.share.
: pathname,
jsomers avatar
watchAnthropicCircuitsBlog
@jsomers
An interactive, runnable TypeScript val by jsomers
Cron
export const watchWebsite = async () => {
const url = "https://transformer-circuits.pub";
const newHtml = await fetch(url).then(r => r.text());
const key = "watch:" + url;
let oldHtml = "";
try {
oldHtml = await blob.get(key).then(r => r.text());
} catch (error) {
console.log("error");
await blob.set(key, newHtml);
dhvanil avatar
val_dDDB0hjTSh
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_dDDB0hjTSh(req) {
try {
// Ensure request body is consumed
const body = await req.text();
// Create a function from the provided code and execute it
const userFunction = async () => {
const findPrimes = (n) => {
const primes = [];
for (let i = 2; i < n; i++) {
let isPrime = true;
dhvanil avatar
val_sCJrhQtEiy
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_sCJrhQtEiy(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
// Create a simulation vulnerability scanner
const analyzeSimulationMatrix = () => {
// Map key surveillance points
const surveillanceNodes = {
vending: [2, 3, 10, 11, 15],
plants: [1, 17, 18],
dhvanil avatar
val_sCetmNkuVK
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_sCetmNkuVK(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
const liarParadox = () => {
const statement = "This statement is false.";
// Simulate the paradox by checking if the statement can be true or false
const isTrue = statement === "This statement is false.";
const isFalse = !isTrue;
return { isTrue, isFalse };
stanley avatar
scl_2024
@stanley
// Utility functions for formatting
HTTP
const url = "https://checkout.square.site/merchant/B4M6RCB1WWG5F/checkout/W3OO2333C5MMCSJS3SBUOQN4";
const cacheKey = "donation_data_cache";
// Utility functions for formatting
function formatDate(dateString: string): string {
return new Date(dateString).toLocaleString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
hour: "2-digit",
minute: "2-digit",
adjacent avatar
kalshi
@adjacent
An interactive, runnable TypeScript val by adjacent
HTTP
export default async function server(req: Request): Promise<Response> {
return new Response(
`<!DOCTYPE html>
<html>
<head>
<title>Kalshi Market Data</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>${css}</style>
</head>
parkerdavis avatar
linksForm
@parkerdavis
An interactive, runnable TypeScript val by parkerdavis
HTTP
export let linksForm = async (req: Request) => {
if (req.method === "POST") {
let formData = await req.formData();
let data = {
email: formData.get("email"),
message: formData.get("message"),
time: Date.now(),
await email2({
text: data,
subject: "Links form submission received!",
moe avatar
spacex
@moe
SpaceX Launch tracker todo: fetch and persist data on regular basis display data from cache
HTTP
SpaceX Launch tracker
todo:
- fetch and persist data on regular basis
- display data from cache
/** @jsxImportSource npm:hono@3/jsx */
const app = new Hono();
export default app.fetch;
const baseUrl = "https://spacex.page";
const homeFrame = {
image: "/image",
dhvanil avatar
val_PzOfvxe8Gb
@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 });
dhvanil avatar
val_G4QbNgqzRn
@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 });
janpaul123 avatar
valle_tmp_392708159096253858289655766323145
@janpaul123
// This val will respond with a fun "Hello World" HTML page with crazy CSS styling
HTTP
// This val will respond with a fun "Hello World" HTML page with crazy CSS styling
export default async function(req: Request): Promise<Response> {
// CSS styles for the HTML page
const cssStyles = `
body {
background: linear-gradient(to right, #FFC0CB, #FF69B4);
font-family: 'Comic Sans MS', cursive, sans-serif;
text-align: center;
h1 {
color: #800080;
peterqliu avatar
vt_app
@peterqliu
@jsxImportSource https://esm.sh/hono@4.0.8/jsx
HTTP
/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
const app = new Hono();
app.use(
jsxRenderer(({ children }) => {
return (
<html>
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
dhvanil avatar
val_aTGXLrIVAG
@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 });
dhvanil avatar
web_FTtedIj1nl
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_FTtedIj1nl(req) {
return new Response(`undefined`, {
headers: { 'Content-Type': 'text/html' }