Avatar

jdan

on a mission to give you superpowers. unsure how i feel about static types. https://jordanscales.com
Joined July 22, 2023
Public vals
94
jdan avatar
emojiData
@jdan
Script
An interactive, runnable TypeScript val by jdan
jdan avatar
codePointNames
@jdan
Script
An interactive, runnable TypeScript val by jdan
jdan avatar
nameOfUnicode
@jdan
Script
Populated with the following: import { blob } from "https://esm.town/v/std/blob?v=12"; fetch("https://unicode.org/Public/UNIDATA/UnicodeData.txt").then(async function(response) { const text = await response.text(); const data = {}; text.split("\n").forEach((line) => { const [code, name] = line.split(";"); data[code] = name; }); await blob.setJSON("unicode_names", data); });
jdan avatar
emojiExploder
@jdan
HTTP
@jsxImportSource npm:hono@3/jsx
jdan avatar
gpt4o_images
@jdan
Script
An interactive, runnable TypeScript val by jdan
jdan avatar
honoBasicAuthMiddleware
@jdan
Script
honoBasicAuthMiddleware You should use https://hono.dev/middleware/builtin/basic-auth instead. Used to authenticate your HTTP vals build with Hono behind a username/password challenge. Browsers store this information alongside your other passwords. Usage In basicAuthButton , I secure two routes (one for viewing a value, one for updating it) behind a username/password combo stores in my Env variables. /** @jsxImportSource npm:hono@3/jsx */ import { honoBasicAuthMiddleware } from "https://esm.town/v/jdan/honoBasicAuthMiddleware"; import { blob } from "https://esm.town/v/std/blob?v=12"; import { Hono } from "npm:hono"; /** Authenticate the URL */ const secretUsername = Deno.env.get("BUTTON_USERNAME"); const secretPassword = Deno.env.get("BUTTON_PASSWORD"); app.use(honoBasicAuthMiddleware(secretUsername, secretPassword)); app.get("/", async (c) => { const lastPressed = await blob.getJSON(blobStorageKey) || "Never"; return c.html( <div> <h1>Last Pressed: {lastPressed}</h1> <form method="POST" action="/press"> <input type="submit" /> </form> </div>, ); });
jdan avatar
basicAuthButton
@jdan
HTTP
basicAuthButton An authenticated micro-app for tracking the last time I took a medication. Both GET / and POST /press are authenticated using honoBasicAuthMiddleware . GET / Views the value of basicAuthButton:last-pressed in blob storage. POST /press Updates the value of basicAuthButton:last-pressed in blob storage with the current timestamp.
jdan avatar
esmTown
@jdan
HTTP
wordGame A wordgame inspired by TextTwist. Custom games can be created by appending the available letters to the url. https://jdan-esmtown.web.val.run/nsetyr The dictionary is populated from the following script: import { blob } from "https://esm.town/v/std/blob?v=12"; const dictionaryUrls = [ "https://www.freescrabbledictionary.com/word-lists/3-letter-words/3-letter-words.json", "https://www.freescrabbledictionary.com/word-lists/4-letter-words/4-letter-words.json", "https://www.freescrabbledictionary.com/word-lists/5-letter-words/5-letter-words.json", "https://www.freescrabbledictionary.com/word-lists/6-letter-words/6-letter-words.json", "https://www.freescrabbledictionary.com/word-lists/7-letter-words/7-letter-words.json", ]; const allWords = await Promise.all( dictionaryUrls.map(async (url) => { const res = await fetch(url); const words = await res.json(); return words.map((entry) => entry.word); }), ); blob.setJSON("words", allWords.flat());
jdan avatar
wordsMatching
@jdan
Script
An interactive, runnable TypeScript val by jdan
jdan avatar
getAllWords
@jdan
Script
An interactive, runnable TypeScript val by jdan
jdan avatar
blobImages
@jdan
HTTP
Image downsizer and uploader
jdan avatar
gpt4o_emoji
@jdan
Script
// await getGPT4oEmoji(
jdan avatar
emojiGuessr
@jdan
HTTP
Calorie Count via Photo Uploads your photo to ChatGPT's new vision model to automatically categorize the food and estimate the calories.
jdan avatar
grayWildfowl
@jdan
Script
An interactive, runnable TypeScript val by jdan
jdan avatar
myspaceCSS
@jdan
Script
An interactive, runnable TypeScript val by jdan
jdan avatar
myspace
@jdan
HTTP
Create your own Myspace profile, deployed to Val town. https://jdan-myspace.web.val.run Click "..." and select Fork to create your own. From there you can: Customize your own profile Or post on my wall by appending to messages and sending me a pull request