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
91
jdan avatar
jdan
katakanaWordApi
HTTP
An interactive, runnable TypeScript val by jdan
0
jdan avatar
jdan
blueskyPostButton
HTTP
blueskyPostButton An app to post to bsky.app, generated with townie! setup Two environment variables BLUESKY_USERNAME: Your username BLUESKY_PASSWORD: Your password, use an app password
0
jdan avatar
jdan
emperorOfJapanCrawler
HTTP
// This program crawls Wikipedia pages starting from an initial URL,
0
jdan avatar
jdan
dialog
HTTP
dialog Renders windows 98 dialog boxes as SVGs. Using satori and styles from 98.css Usage https://jdan-dialog.web.val.run/? w =200& h =110& title =Hello& caption =World w (default: 200): the width of the dialog h (default: 110): the height of the dialog title (default: "{title}"): the text in the title bar caption (default: "{caption}"): the caption text
3
jdan avatar
jdan
grimPinkLimpet
HTTP
// This approach will use the Notion API to update a block's color.
0
jdan avatar
jdan
emojiData
Script
An interactive, runnable TypeScript val by jdan
0
jdan avatar
jdan
codePointNames
Script
An interactive, runnable TypeScript val by jdan
0
jdan avatar
jdan
nameOfUnicode
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); });
0
jdan avatar
jdan
emojiExploder
HTTP
@jsxImportSource npm:hono@3/jsx
0
jdan avatar
jdan
gpt4o_images
Script
An interactive, runnable TypeScript val by jdan
0
jdan avatar
jdan
honoBasicAuthMiddleware
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>, ); });
0
jdan avatar
jdan
basicAuthButton
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.
1
jdan avatar
jdan
wordsMatching
Script
An interactive, runnable TypeScript val by jdan
0
jdan avatar
jdan
getAllWords
Script
An interactive, runnable TypeScript val by jdan
0
jdan avatar
jdan
gpt4o_emoji
Script
// await getGPT4oEmoji(
0
jdan avatar
jdan
myspaceCSS
Script
An interactive, runnable TypeScript val by jdan
0