Avatar

andreterron

Dev Tools • Quantified Self
154 public vals
Joined August 18, 2022
andreterron avatar
tldraw_react_client
@andreterron
Script
// JSX can be used in the client val thanks to this magic comment
andreterron avatar
harlequinChicken
@andreterron
Script
An interactive, runnable TypeScript val by andreterron
andreterron avatar
blushSalamander
@andreterron
Script
An interactive, runnable TypeScript val by andreterron
andreterron avatar
chat
@andreterron
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-4" } ); console.log(content);
andreterron avatar
parseBearerString
@andreterron
Script
An interactive, runnable TypeScript val by andreterron
andreterron avatar
fetch_docs
@andreterron
Script
Proxied fetch - https://docs.val.town/std/fetch
andreterron avatar
blob_docs
@andreterron
Script
Val Town Blob Storage - https://docs.val.town/std/blob
andreterron avatar
sqlite_docs
@andreterron
Script
Val Town SQLite - https://docs.val.town/std/sqlite
andreterron avatar
email_docs
@andreterron
Script
Email (https://docs.val.town/std/email)
andreterron avatar
staleGithubPRsEmail
@andreterron
Cron
Stale GitHub PRs email This val is designed to identify and report stale pull requests (PRs) across specified GitHub repositories. It checks for PRs that haven't had any activity for a predefined number of days (default is 3 days) and sends an email summary of these PRs. The email contains details formatted in HTML, offering an overview of PRs requiring attention. Usage Fork this val; Add the following environment variables : githubRepos : comma separated list of repos to check github : GitHub token githubOwner : Owner name
andreterron avatar
isMyWebsiteDown
@andreterron
Cron
Website Downtime Alert This val checks the availability of a specified website. If it's down or not returning a 200 OK status, it triggers an email alert. The email includes the date, time (in UTC), and the reason for the downtime, providing a way to monitor website availability. Fork this val and edit the URL variable to set up downtime notifications for your website.
andreterron avatar
htmlExample
@andreterron
HTTP
HTML example This is an example of how to return an HTML response. You can also preview it at https://andreterron-htmlExample.web.val.run?name=Andre
andreterron avatar
renderFormAndSaveData
@andreterron
HTTP
Render form and save data This val provides a web-based interface for collecting email addresses. It features a dual-functionality approach: when accessed via a web browser using a GET request, it serves an HTML form where users can submit their email address. If the script receives a POST request, it implies that the form has been submitted, and it proceeds to handle the incoming data. Fork this val to customize it and use it on your account.
andreterron avatar
roseSalamander
@andreterron
Cron
AQI Alerts Get email alerts when AQI is unhealthy near you. Set up Click Fork Change location (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via nominatim's geocoder API . Click Run Background This val uses nominatim's geocoder to get your lat, lon, and air quality data from OpenAQ. It uses EPA's NowCast AQI Index calculation and severity levels. Learn more: https://www.val.town/v/stevekrouse.easyAQI
andreterron avatar
aqi
@andreterron
Cron
AQI Alerts Get email alerts when AQI is unhealthy near you. Set up Click Fork Change location (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via nominatim's geocoder API . Click Run Background This val uses nominatim's geocoder to get your lat, lon, and air quality data from OpenAQ. It uses EPA's NowCast AQI Index calculation and severity levels. Learn more: https://www.val.town/v/stevekrouse.easyAQI
andreterron avatar
azureBird
@andreterron
Script
An interactive, runnable TypeScript val by andreterron