Search

myApi
@santi
An interactive, runnable TypeScript val by santi
Script
export function myApi(name) {
return "hi " + name;

resyBot
@vtdocs
Resy bot This bot books restaurant reservations via Resy. Use it to snipe reservations at your favorite restaurant! How to use it Set up a scheduled val to call it like this: import { resyBot } from "https://esm.town/v/stevekrouse/resyBot?v=2";
import { email } from "https://esm.town/v/std/email?v=13";
export default async function (interval: Interval) {
const bookingInfo = await resyBot( {
slug: 'amaro-bar',
city: 'ldn',
day: '2023-07-05',
start: '19:00',
end: '21:00',
partySize: 2,
// Use https://www.val.town/settings/secrets for these!
email: Deno.env.get("resyEmail"),
password: Deno.env.get("resyPassword"),
})
// If the val doesn't error, it successfully made a booking!
// Send yourself an email like this:
await email({ text: bookingInfo, subject: 'resy bot made a booking for you!' })
} How it works This val makes the same requests that your browser would make when you reserve a slot on Resy (that's why it needs your login info – to request an auth token). When there isn't a matching slot, this val errors and nothing else happens. When a booking is available, this val books it and returns a description of the booking so you can email it to yourself (Resy will also email you). This val will then stop attempting bookings for you until you change one of the arguments you're passing (it concats the non-sensitive arguments and uses this as a key). Credit to @rlesser and @alp for their existing Resy vals (search for resy on here).
Script
import { email } from "https://esm.town/v/std/email?v=13";
export default async function (interval: Interval) {
const bookingInfo = await resyBot( {

fetchMnm
@kajgod
An interactive, runnable TypeScript val by kajgod
Cron
import { findTopNews } from "https://esm.town/v/kajgod/findTopNews";
export async function fetchMnm() {
// for testing only
const dryRun = false;
convenientAzureSparrow
@gio
// Your Telnyx API Key
Cron
// Your Telnyx API Key
const apiKey = "your_api_key";
// Function to send SMS
async function sendSMS(to, from) {
try {
const response = await axios.post(
orangeSole
@tempguy
// "button-click=ZEhKMVpTLVF0LVBTLVF0LVBqLVY0TFMtUXpOLTBjdEwtMC1WMy1Qai1WLVFOLTAtUHktUHotUDMtUERnLTU=&button-referer=",
Script
"headers": headers,
"method": "GET",
export async function decodeHunter(encoded: string, mask: string, charCodeOffset: number, delimiterOffset: number) {
const delimiter = mask[delimiterOffset];
const chunks = encoded.split(delimiter).filter((chunk) => chunk);
console.log(url);
const player = await fetch(url[1]);
const regex = /eval\(function\(h,u,n,t,e,r\).*?\("(.*?)",\d*?,"(.*?)",(\d*?),(\d*?),\d*?\)\)/;
const linkRegex = /file:"(.*?)"/;
const hunter_match = (await player.text()).match(regex);
syncMusclePower
@sigdel
An interactive, runnable TypeScript val by sigdel
Script
import { set } from "https://esm.town/v/std/set?v=11";
import { db } from "https://esm.town/v/sigdel/db";
export async function syncMusclePower(data: any) {
const { user, workouts, exercises, workoutLog } = data;
if (!db[user]) {
allSplat
@all
@jsxImportSource https://esm.sh/react
HTTP
import * as SPLAT from "https://cdn.jsdelivr.net/npm/gsplat@latest";
function App() {
const canvasRef = useRef(null);
const controls = new SPLAT.OrbitControls(camera, canvas);
async function main() {
const url = "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k-mini.splat";
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
return new Response(`

ghOrgRepos
@augustohp
An interactive, runnable TypeScript val by augustohp
Script
export async function ghOrgRepos(
owner: string,
token: string,
video_calling_app
@reetkumarbind
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
import Peer from 'https://esm.sh/simple-peer@9.11.1';
function App() {
const [myStream, setMyStream] = useState(null);
const [remoteStream, setRemoteStream] = useState(null);
const [isCalling, setIsCalling] = useState(false);
const [peer, setPeer] = useState(null);
// Simulated signaling
console.log('Calling user', remoteId, data);
peer.on('stream', (remoteStream) => {
setPeer(peer);
setIsCalling(true);
return (
</div>
{!isCalling && (
<div style={styles.controlBox}>
textDecoration: 'none',
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
return new Response(`
databaseRunner
@nicosuave
An interactive, runnable TypeScript val by nicosuave
HTTP
const MAX_ROWS_PER_CHUNK = 10000;
export default async function(req: Request): Promise<Response> {
console.log("Received request");
console.log(`Created ${fileResponses.length} ${gzip ? "gzip" : ""} files`);
return new Response(JSON.stringify({ openaiFileResponse: fileResponses }), {
status: 200,
return new Response(`Error: ${error.message}`, { status: 500 });
async function executePostgresQuery(url: string, query: string): Promise<any[]> {
console.log("Connecting to PostgreSQL");
console.error("Error closing PostgreSQL connection:", closeError);
async function executeMysqlQuery(url: string, query: string): Promise<any[]> {
console.log("Connecting to MySQL");
console.error("Error closing MySQL connection:", closeError);
async function introspectPostgresSchema(url: string): Promise<any[]> {
const query = `
return executePostgresQuery(url, query);
async function introspectMysqlSchema(url: string): Promise<any[]> {
const query = `
return executeMysqlQuery(url, query);
function splitIntoChunks(results: any[], maxRowsPerChunk: number): any[][] {
console.log(`Splitting ${results.length} rows into chunks of ${maxRowsPerChunk}`);
return chunks;
async function createGzipFile(chunk: any[], index: number, shouldGzip: boolean, introspection: boolean): Promise<any> {
console.log(`Creating ${shouldGzip ? "gzip" : ""} file for chunk ${index + 1}`);
emailGPT3
@ayush37
Email with GPT-3 Send an email to stevekrouse.emailGPT3@valtown.email, it will forward it to gpt3, and email you back the response.
Script
import { thisEmail } from "https://esm.town/v/ayush37/thisEmail";
import { runVal } from "https://esm.town/v/std/runVal";
export async function emailGPT3(email) {
let response = await runVal("patrickjm.gpt3", { prompt: email.text });
return mail({

fetchTimeline
@dpetrouk
An interactive, runnable TypeScript val by dpetrouk
Script
import { fetch } from "https://esm.town/v/std/fetch";
export async function fetchTimeline(url, options) {
// const tweetId = url.match(/\/(\d*)\?+/)[1];
// const tweetUrl =
web_mNmUAMoXPj
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_mNmUAMoXPj(req) {
return new Response(`<!DOCTYPE html>
<html>

wikiOG
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
async function getWikipediaInfo(url: string) {
// Extract the title from the URL
return null;
export default async function(req: Request): Promise<Response> {
const url = new URL(req.url);
<script type="text/javascript">
setTimeout(function() {
window.location.href = "${wikipediaUrl}";