Search

Results include substring matches and semantically similar vals. Learn more
jdan avatar
lichessDashboard
@jdan
A web interface for viewing a bunch of Lichess TV games. https://jdan-lichessDashboard.web.val.run
HTTP
A web interface for viewing a bunch of [Lichess TV](https://lichess.org/tv) games.
https://jdan-lichessDashboard.web.val.run
export const lichessDashboard = async () => {
const games = await lichessTVGames();
const validGameTypes = [
"Bot",
"UltraBullet",
"Bullet",
"Computer",
"Rapid",
stevekrouse avatar
test500
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
export let test500 = (req, res) => res.send(500);
stevekrouse avatar
prolific
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
export default async function(): Promise<Response> {
const res = await db.execute(
`SELECT author_username, count(*) as count
FROM vals
GROUP BY author_username
ORDER BY count DESC
LIMIT 100
const tableRows = res.rows.map((row, index) => {
const username = row[0];
const truncatedUsername = username.length > 13 ? username.slice(0, 13) + "..." : username;
iwaltgen avatar
ifconfig
@iwaltgen
An interactive, runnable TypeScript val by iwaltgen
Script
export let ifconfig = (req, res) => {
const publicIp =
req.headers["x-forwarded-for"] || req.connection.remoteAddress;
return res.json({ publicIp });
stevekrouse avatar
express_ex
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
export const express_ex = (req: express.Request, res) => {
res.send(`${req.path}, ${req.originalUrl}`);
malloc avatar
examplebot_endpoint
@malloc
An interactive, runnable TypeScript val by malloc
Script
export let examplebot_endpoint = (
req: express.Request,
res: express.Response,
console.log(res);
if (!req.get("X-Signature-Timestamp") || !req.get("X-Signature-Ed25519")) {
res.status(400);
res.end("Signature headers missing");
verify_discord_signature(
process.env.discord_pubkey,
JSON.stringify(req.body),
pomdtr avatar
staticChess
@pomdtr
An interactive, runnable TypeScript val by pomdtr
HTTP
import { pwa } from "https://esm.town/v/pomdtr/pwa";
export default pwa(handler, {
name: "Static Chess",
display: "standalone",
background_color: "#ffffff",
start_url: "/",
ftlsid avatar
likePost
@ftlsid
An interactive, runnable TypeScript val by ftlsid
Script
import { ftlsid_com_likes } from "https://esm.town/v/ftlsid/ftlsid_com_likes";
export async function likePost(req, res) {
const ip = req.ip;
const postURL = req.query.url;
if (ftlsid_com_likes[postURL]) {
const likes = ftlsid_com_likes[postURL];
likes[ip] = true;
else {
const likes = { [ip]: true };
ftlsid_com_likes[postURL] = likes;
pomdtr avatar
evalPost1
@pomdtr
An interactive, runnable TypeScript val by pomdtr
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
console.log(
await fetchJSON(
"https://api.val.town/v1/eval",
method: "POST",
body: JSON.stringify({ code: "1+1" }),
u avatar
fetcher
@u
An interactive, runnable TypeScript val by u
Script
export async function fetcher() {}
stevekrouse avatar
nakedAPIEx
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
export function nakedAPIEx(req, res) {
res.send("my returned srting");
pomdtr avatar
brownBoar
@pomdtr
An interactive, runnable TypeScript val by pomdtr
Script
export default function(req) {
return new Response("Hello from sandbox");
schpet avatar
linearStandup
@schpet
daily post to slack listing all the linear issues assigned to you that changed status. thrown together with https://aider.chat/ + sonnet
Cron
daily post to slack listing all the linear issues assigned to you that changed status. thrown together with https://aider.cha
const ISSUES_QUERY = `
query GetIssuesAssignedToCurrentUserByDate($startDate: DateTimeOrDuration!, $endDate: DateTimeOrDuration!) {
viewer {
assignedIssues(filter: {
or: [
{ canceledAt: { gte: $startDate, lt: $endDate } },
{ completedAt: { gte: $startDate, lt: $endDate } },
{ startedAt: { gte: $startDate, lt: $endDate } }
nodes {
stevekrouse avatar
lucia_sqlite
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
export async function createTables(userTable: string, sessionTable: string) {
return sqlite.batch([
`CREATE TABLE ${userTable} (
id TEXT NOT NULL PRIMARY KEY,
username TEXT NOT NULL UNIQUE,
hashed_password TEXT NOT NULL
`CREATE TABLE ${sessionTable} (
id TEXT NOT NULL PRIMARY KEY,
expires_at INTEGER NOT NULL,
user_id TEXT NOT NULL,
mittzy avatar
loginredux_login
@mittzy
An interactive, runnable TypeScript val by mittzy
HTTP
export default async function(req: Request): Promise<Response> {
const body = await req.json();
let { username, password } = body;
if (!username || !password) {
return new Response(JSON.stringify({ error: "Missing username or password" }), { status: 400 });
if (password.length > 50) {
return new Response(JSON.stringify({ error: "Password too long" }), { status: 400 });
if (username.length > 50) {
return new Response(JSON.stringify({ error: "Username too long" }), { status: 400 });
const TABLE_NAME = "loginredux_users";