Avatar

vladimyr

Joined August 5, 2023
Likes
94
maxm avatar
retroVisitCounter
@maxm
HTTP (deprecated)
Retro Visit Counter You are visitor number: How special! Want a retro visitor counter for your myspace page or geocities website? Fork this val and add the image link to your website: <img src="https://maxm-retrovisitcounter.web.val.run/counter.png"> <!-- Make sure you swap this subdomain out with the subdomain of your forked val --> <img src="https://[CHANGE ME!].web.val.run/counter.png">
maxm avatar
smileyPNG
@maxm
HTTP (deprecated)
Forked from maxm/selfEditingWebsite
stevekrouse avatar
queryParams
@stevekrouse
HTTP (deprecated)
Forked from neverstew/queryParams
fil avatar
earthquakes
@fil
HTTP
Earthquake map 🌏 This val loads earthquake data from USGS, a topojson file for the land shape, and supporting libraries. It then creates a map and save it as a SVG string. The result is cached for a day. Note that we must strive to keep it under val.town’s limit of 100kB, hence the heavy simplification of the land shape. (For a simpler example, see becker barley .) | | | |-----|-----| | Web page | https://fil-earthquakes.web.val.run/ | | Observable Plot | https://observablehq.com/plot/ | | linkedom | https://github.com/WebReflection/linkedom | | topojson | https://github.com/topojson/topojson | | earthquakes | https://earthquake.usgs.gov | | world | https://observablehq.com/@visionscarto/world-atlas-topojson | | css | https://milligram.io/ |
maas avatar
forwarder
@maas
Script
Unlimited Anonymous Emails All code can be triggered via email ( docs ), i.e. maas.forwarder@valtown.email . You can generate as many emails as you want to avoid giving away your personal email address and reduce spam. Getting started Log in to Val Town Fork this Val Publish the Val via 🔒 > Unlisted Copy the email endpoint via ⋮ > Endpoints > Copy email address Sign up for newsletters or services using this email ( maas.forwarder@valtown.email ). To remove their ability to email you, simply delete the val (or send it to /dev/null ).
maas avatar
importGists
@maas
Script
Imports Gists to Val Town Import your TypeScript and JavaScript to Val Town Authentication This function requires two keys: one from Github to get your gists, and one from Val Town to make the vals in your account: Github token: https://github.com/settings/tokens Val Town key: https://www.val.town/settings/api Usage You can use this function by calling it and passing your keys like so: @maas.importGists({ githubToken: @me.secrets.githubGists, valTownKey: @me.secrets.valtown, }); Example usage: https://www.val.town/v/maas.untitled_harlequinCrawdad
stevekrouse avatar
xeval
@stevekrouse
HTTP (deprecated)
An interactive, runnable TypeScript val by stevekrouse
pomdtr avatar
raw
@pomdtr
HTTP (deprecated)
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
tmcw avatar
blocks
@tmcw
Express
Unfancy blocks In the old days, there was a website called bl.ocks.org which re-hosted content on GitHub Gists and displayed visualizations made in those gists. It wasn't shiny but it was well-crafted and for the little community that used it, it was very nice. This is a much worse, but very small, version of the same kind of program. This also shows you stuff from blocks. It displays readmes, with Titus's lovely micromark . It uses Ian's collected search index of bl.ocks.org to show you examples and thumbnails. It uses Alpine to pull together a little interface. And, of course, Val Town to make it all work.
stevekrouse avatar
openai
@stevekrouse
Script
OpenAI ChatGPT helper function This val uses your OpenAI token if you have one, and the @std/openai if not, so it provides limited OpenAI usage for free. import { chat } from "https://esm.town/v/stevekrouse/openai"; const { content } = await chat("Hello, GPT!"); console.log(content); import { chat } from "https://esm.town/v/stevekrouse/openai"; const { content } = await chat( [ { role: "system", content: "You are Alan Kay" }, { role: "user", content: "What is the real computer revolution?"} ], { max_tokens: 50, model: "gpt-4o" } ); console.log(content);
easrng avatar
uploadTo0x0
@easrng
Script
upload to 0x0.st usage: import { uploadTo0x0 } from "https://esm.town/v/easrng/uploadTo0x0" console.log(await uploadTo0x0("test data", "filename")) data can be a string, a TypedArray, an ArrayBuffer, or a Blob returns a url (ie https://0x0.st/X-wB.txt ) to a file that expires after an hour
easrng avatar
getValTownTrpc
@easrng
Script
An interactive, runnable TypeScript val by easrng
Next