Rime API examples & templates
Auto-tooting anniversary posts from https://crimenesdeodio.info/ to remember hate crimes in Spain between 1990-2020.
CronGPT
This is a minisite to help you create cron expressions, particularly for crons on Val Town. It was inspired by Cron Prompt, but also does the timezone conversion from wherever you are to UTC (typically the server timezone).
Tech
- Hono for routing (
GET /
andPOST /compile
.) - Hono JSX
- HTMX (probably overcomplicates things; should remove)
- @stevekrouse/openai, which is a light wrapper around @std/openai
I'm finding HTMX a bit overpowered for this, so I have two experimental forks without it:
- Vanilla client-side JavaScript: @stevekrouse/cron_client_side_script_fork
- Client-side ReactJS (no SSR): @stevekrouse/cron_client_react_fork
I think (2) Client-side React without any SSR is the simplest architecture. Maybe will move to that.
PersonalizationGPT
You are a helpful personalization assistant
Use GPT to return JIT personalization for client side applications.
If you fork this, you'll need to set OPENAI_API_KEY
in your Val Town Secrets.
Server-side Render React Mini Framework
This is very experimental, more of a prototype of an architecture, than a true framework
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
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
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
stevekrouse.com - my personal website
This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite.
It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still.
Todos
- Speed up page load by loading sqlite data later like in @healeycodes/steve_web
- Store more (legally storable) analytics data, and maybe make a sparkline!
- Add some sort of way to contact me
- Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
stevekrouse.com - my personal website
This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite.
It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still.
Todos
- Speed up page load by loading sqlite data later like in @healeycodes/steve_web
- Store more (legally storable) analytics data, and maybe make a sparkline!
- Add some sort of way to contact me
- Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
Live reload in new tabs
When you're working on an HTML HTTP val in a new tab, it's annoying to have to manually reload the tab on every save. In the Val Town editor, you can hit cmd+enter, but there's nothing like that for a val in a new tab because Val Town doesn't control that new tab (like we control the iframe in the browser preview). However, you control that HTML via the fetch handler you're writing, so you can add a script that polls the Val Town API for the current version number of your val, and reload itself if it detects a new version. This val has a collection of helpers to help you do just that.
Usage
Create valimport { html } from "https://esm.town/v/stevekrouse/html";
import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
export default reloadOnSaveFetchMiddleware(async function(req: Request): Promise<Response> {
return html(`<h1>Hello!!</h1>`);
})
stevekrouse.com - my personal website
This val hosts my personal website. The view data is stored in Val Town SQLite - @std/sqlite.
It used to live on Github Pages, which is why I proxy over requests to certain blog posts over to the Github Pages site still.
Todos
- Speed up page load by loading sqlite data later like in @healeycodes/steve_web
- Store more (legally storable) analytics data, and maybe make a sparkline!
- Add some sort of way to contact me
- Move over all my blog posts from Github Pages (maybe into @std/blob as a CMS?)
Server-side Render React Mini Framework
This is very experimental, more of a prototype of an architecture, than a true framework