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
raw
HTTP
Fetch the source of a val This val was created before the introduction of https://esm.town Usage curl https://pomdtr-raw.web.val.run/v/<author>/<name>.<extension>[?v=<version>] To see the code of this val, use https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts Examples Fetching the val code $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.tsx You can also use js , jsx and ts extension (only the content-type change, there is no transpilation). Fetching private val Pass an api token as an username $ curl "https://<token>@pomdtr-raw.web.val.run/v/pomdtr/privateVal.ts" Fetching the val README $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.md Getting an image $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.png Fetching a specific version of a val $ curl https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts?v=66 You need to be authenticated to use this method. Fetching the val metadata $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.json Running vals locally using Deno Create a new val.ts file referencing the @pomdtr.add import { add } from "https://pomdtr-raw.web.val.run/v/pomdtr/add.ts"; console.log(add(1, 2)); then use deno run $ deno run ./val.ts 3 If you val accept a request and return a response, you can pass it to Deno.Serve to run it locally! import {raw} from "https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts"; Deno.serve(raw); If your val is private, you can set the DENO_AUTH_TOKENS env. DENO_AUTH_TOKENS=<val-town-token>@pomdtr-raw.web.val.run deno run val.ts
4
pomdtr avatar
pomdtr
fetchValTownAPI
Script
Fetch data from the val town api Usage Create an helper val const valtownApi = (path: string, options?: RequestInit) => @pomdtr.fetchValTownAPI( @me.secrets.apiToken, path, options, ); Then use it in any of your val @me.valtownApi("/alias/pomdtr")
1
pomdtr avatar
pomdtr
renderGithubReadme
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
telegram
Script
Send yourself a Telegram message Inspired by console.email , this val lets you send yourself a Telegram message via the valtown_bot from any of your vals @me.telegram("hi to me on telegram!") Installation 1. Start a conversation with valtown_bot Click here: https://t.me/valtown_bot 2. Copy your Secret 3. Save in your secrets under telegramSecret 4. Fork this val & run it Save your own private version of a telegram function to your account by forking this val: https://www.val.town/v/pomdtr.telegram 5. Send a test message! await @me.telegram("hi to me on telegram!") PS: the bot code is available here
3
pomdtr avatar
pomdtr
telegramWelcome
Script
An interactive, runnable TypeScript val by pomdtr
1
pomdtr avatar
pomdtr
sendToTelegram
Script
An interactive, runnable TypeScript val by pomdtr
1
pomdtr avatar
pomdtr
renderHtm
Script
// '<h1 id="hello">Hello world!</h1>'
0
pomdtr avatar
pomdtr
sunbeamGithubNotifications
Script
An interactive, runnable TypeScript val by pomdtr
1
pomdtr avatar
pomdtr
githubNotifications
Script
An interactive, runnable TypeScript val by pomdtr
1
pomdtr avatar
pomdtr
svgEmoji
HTTP
Usage Favicon <link rel="icon" href="https://pomdtr-svgemoji.web.val.run/🪐" /> Markdown ![favicon](https://pomdtr-svgemoji.web.val.run/🪐)
3
pomdtr avatar
pomdtr
convertString
Script
An interactive, runnable TypeScript val by pomdtr
0
pomdtr avatar
pomdtr
SearchValTown
Script
An interactive, runnable TypeScript val by pomdtr
2
pomdtr avatar
pomdtr
sunbeamTrendingRepositories
Script
An interactive, runnable TypeScript val by pomdtr
1
Next