Avatar

pomdtr

I mainly enjoy building dev tools: - VS Code integration: https://github.com/pomdtr/valtown-vscode - CLI: https://github.com/pomdtr/vt
Joined June 14, 2023
Public vals
317
pomdtr avatar
pomdtr
lowdb
Script
Val Town Adapter for lowdb @std/blob is used as a lowdb sync. See @pomdtr/lowdb_example for example usage.
5
pomdtr avatar
pomdtr
runGist
HTTP
Run a Github Gist Usage Fork this val Create a Gist on Github, containing a javascript module the module must have either exactly one export or a default export the export must be a function that accept a request and return a response In the gist url, replace gist.github.com/<username> by <username>-rungist.web.val.run For security reasons, only gists with a github username matching your val username are allowed to run on your account. Example Github Gist: https://gist.github.com/pomdtr/0b9bc664b48b1ad4316ba6324564885e Http Server: https://pomdtr-rungist.web.val.run/0b9bc664b48b1ad4316ba6324564885e
1
pomdtr avatar
pomdtr
renderGist
HTTP
Render Gist Usage Go to a gist page, and replace gist.github.com by pomdtr-renderGist.web.val.run Example: https://pomdtr-renderGist.web.val.run/probonopd/9feb7c20257af5dd915e3a9f2d1f2277
1
pomdtr avatar
pomdtr
echo
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
sunbeam
HTTP
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
markdocReactExample
HTTP
Markdoc Playground This readme is rendered using markdoc . {% val author="pomdtr" name="markdocReactExample" %}
2
pomdtr avatar
pomdtr
exampleArticle
HTTP
Example Article More detail on the discovery mechanism here . Fork this val to create a new post!
0
pomdtr avatar
pomdtr
page
HTTP
Render a val readme Inspired by github pages. Use https://pomdtr-page.web.val.run/v/<author>/<name> Example You can see this val readme at https://pomdtr-page.web.val.run/v/pomdtr/readme
1
pomdtr avatar
pomdtr
article
HTTP
Use readme as website Usage import {article} from "https://esm.town/v/pomdtr/article" export default article() See this val http endpoint as an example: https://pomdtr-article.web.val.run
1
pomdtr avatar
pomdtr
extractValInfo
Script
Extract vals infos (author, name, version) from a val url (either from esm.town or val.town ). Example usage: const {author, name} = extractValInfo(import.meta.url) Also returns a unique slug for the val: <author>/<name>
15
pomdtr avatar
pomdtr
extractMetadata
Script
An interactive, runnable TypeScript val by pomdtr
1
pomdtr avatar
pomdtr
blog
HTTP
Val Town Blog A blog written, developed and hosted on val.town. How ? Each article on this blog is contained single val, with a #blog tag. See this example article . // #blog // title: Example Post import { article } from "https://esm.town/v/pomdtr/article"; import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo"; import { html } from "https://esm.town/v/stevekrouse/html?v=5"; export async function examplePost(req: Request) { const { author, name } = extractValInfo(import.meta.url); return html(await article(author, name)); } Each of these post work on it's own . This val is able to: list them with the /v1/search api (with a #blog query) post with different author than the owner of this val will be filtered out only public vals will be listed render the readme of those vals using remark (with github styling) This process run each time a user visit the web endpoint , so the blog is always up to date. You can get your own instance of the blog by just forking this val .
3
pomdtr avatar
pomdtr
api
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
gfm
Script
Markdown to html (with github styling)
9
pomdtr avatar
pomdtr
honoJSX
HTTP
@jsxImportSource https://esm.sh/hono/jsx
1
pomdtr avatar
pomdtr
exampleServer
HTTP
An interactive, runnable TypeScript val by pomdtr
0