Search
brownPelican
@tmcw
An interactive, runnable TypeScript val by tmcw
HTTP
export default async function (req: Request): Promise<Response> {
return Response.json({ ok: true })
![igor avatar](https://images.clerk.dev/oauth_github/img_2P4IxZqjYdEXXdTmC7UjjtiMdZj.png)
myApi
@igor
An interactive, runnable TypeScript val by igor
Script
export function myApi(name) {
return "hi " + name;
extraordinaryIndigoParakeet
@preyanshu
// Set up your wallet (private key)
Cron
"type": "function",
"type": "function",
"type": "function",
"type": "function",
"type": "function",
"type": "function",
"type": "function",
"type": "function",
"type": "function",
"type": "function",
myApi
@flavorjones
An interactive, runnable TypeScript val by flavorjones
Script
export function myApi(name) {
return "hi " + name;
web_mmtKPYGP3m
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_mmtKPYGP3m(req) {
return new Response(`<!DOCTYPE html>
<html>
myApi
@yulei
An interactive, runnable TypeScript val by yulei
Script
export function myApi(name) {
return "hi " + name;
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
uptime
@stevekrouse
Moved to https://www.val.town/x/stevekrouse/status
Cron
await sqlite.execute(
"CREATE TABLE IF NOT EXISTS uptime (id INTEGER PRIMARY KEY AUTOINCREMENT, url TEXT, ok INTEGER, reason TEXT, status INTEGER, duration INTEGER, timestamp DATETIME DEFAULT CURRENT_TIMESTAMP);",
export async function uptimeCheck(url: string) {
let reason: string, status: number, end: number;
let ok = true;
cerebras_coder
@vadergit
This is an AI code assistant powered by Cerebras , running llama3.3-70b. Inspired by Hassan's Llama Coder . Setup Sign up for Cerebras Get a Cerebras API Key Save it in a Val Town environment variable called CEREBRAS_API_KEY Todos I'm looking for collaborators to help. Fork & send me PRs! [ ] Experiment with two prompt chain (started here )
HTTP
function SnakeGame() {
function generateFood() {
function drawBackground() {
function drawSnakeSegment(segment, index) {
function drawGame() {
function moveSnake() {
function gameLoop() {
function handleKeyDown(e) {
function client() {
export default async function server(request: Request): Promise<Response> {
![lukedenton avatar](https://images.clerk.dev/oauth_github/img_2SqscUlk7DVod1ndvzCFijFD2jx.jpeg)
sqliteExplorerApp
@lukedenton
SQLite Explorer View and interact with your Val Town SQLite data. It's based off Steve's excellent SQLite Admin val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by LibSQL Studio by invisal . This is now more an SPA, with tables, queries and results showing up on the same page. Install Install the latest stable version (v86) by forking this val: Authentication Login to your SQLite Explorer with password authentication with your Val Town API Token as the password. Todos / Plans [ ] improve error handling [ ] improve table formatting [ ] sticky table headers [x] add codemirror [ ] add loading indication to the run button (initial version shipped) [ ] add ability to favorite queries [ ] add saving of last query run for a table (started) [ ] add visible output for non-query statements [ ] add schema viewing [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [x] add views to the sidebar [ ] add triggers to sidebar [ ] add upload from SQL, CSV and JSON [ ] add ability to connect to a non-val town Turso database [x] fix wonky sidebar separator height problem (thanks to @stevekrouse) [x] make result tables scrollable [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val . Thanks to @pomdtr for merging the initial version!) [x] add listener for cmd+enter to submit query
HTTP
- [x] make result tables scrollable
- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
- [x] add listener for cmd+enter to submit query
clicker
@movienerd
This is a simple idle clicker game written almost entirely by AI and directed by prompts.
HTTP
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
const [money, setMoney] = useState(() => {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
async function server(request: Request): Promise<Response> {
return new Response(
exampleTranslation
@iamseeley
An interactive, runnable TypeScript val by iamseeley
HTTP
import Pipeline from "https://esm.town/v/iamseeley/pipeline";
export default async function handler(req) {
if (req.method === "GET") {
return new Response(`
<div id="result"></div>
<script>
document.getElementById('translationForm').addEventListener('submit', async function(event) {
event.preventDefault();
const formData = new FormData(this);
val_irc8Igm1CR
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_irc8Igm1CR(req) {
try {
// Execute the code directly and capture its result
telegramDalleBot
@adjacent
Telegram DALLE Bot A personal telegram bot you can message to create images with OpenAI's DALLE ✨ Set up yours fork this val speak to telegram’s https://t.me/botfather to create a bot and obtain a bot token set the bot token as a val town secret called telegramDalleBotToken add a random string as a val town secret called telegramDalleBotWebhookSecret set up your webhook with telegram like this: // paste and run this in your workspace on here
@vtdocs.telegramSetWebhook(@me.secrets.telegramDalleBotToken, {
url: /* your fork's express endpoint (click the three dots on a val) */,
allowed_updates: ["message"],
secret_token: @me.secrets.telegramDalleBotWebhookSecret,
}); message your bot some prompts! (if you get stuck, you can refer to the telegram echo bot guide from docs.val.town)
HTTP
# Telegram DALLE Bot
A personal telegram bot you can message to create images with OpenAI's [DALLE](https://openai.com/dall-e-2) ✨
![DALLE: A Macintosh II sitting on a desk, painted by Picasso in his blue period.](https://i.imgur.com/uJrP5mE.png)
try {
const imageURL = (await textToImageDalle(
process.env.openai,
text,
1,
getAccessToken
@raymondcamden
An interactive, runnable TypeScript val by raymondcamden
Script
export async function getAccessToken(id, secret) {
const params = new URLSearchParams();
params.append("client_secret", secret);
cerebras_coder
@Mistercz
This is an AI code assistant powered by Cerebras , running llama3.3-70b. Inspired by Hassan's Llama Coder . Setup Sign up for Cerebras Get a Cerebras API Key Save it in a Val Town environment variable called CEREBRAS_API_KEY Todos I'm looking for collaborators to help. Fork & send me PRs! [ ] Experiment with two prompt chain (started here )
HTTP
function addTodo() {
function saveTodos() {
function loadTodos() {
function appendToDisplay(value) {
function clearDisplay() {
function calculate() {
async function getWeather() {
function getWeatherDescription(code) {
function updateTimerDisplay() {
function startTimer() {