Avatar

yawnxyz

i make ui for ai
Joined March 31, 2023
Public vals
86
yawnxyz avatar
yawnxyz
threeJsTorus
HTTP
playing around with townie during a meeting >.>
0
yawnxyz avatar
yawnxyz
env
Script
This is used to load .env secrets from either a Node or a Deno environment. This is used for projects converted to Node projects with dnt — so you can use valtown in your Node projects!
0
yawnxyz avatar
yawnxyz
eventsy
Script
The Eventsy class represents a system for logging and managing events. It utilizes Dobby for database operations and provides methods for logging events, retrieving events by type, performing full-text searches, and more. This class is designed to be flexible and adaptable to various event logging needs.
0
yawnxyz avatar
yawnxyz
valVersions
Script
* Retrieves a user by their username. * @param {string} username - The username of the user to retrieve. * @returns {Promise<Object>} The user object.
1
yawnxyz avatar
yawnxyz
denoDom2SemExample
Script
An interactive, runnable TypeScript val by yawnxyz
0
yawnxyz avatar
yawnxyz
htmlkit
Script
This module provides functions to convert HTML to various formats such as Markdown, Pug, and Turndown. It also includes utilities to fetch HTML from a URL, extract metadata, and clean HTML by removing unwanted selectors. Dependencies include Cheerio for HTML parsing, JSDOM for DOM manipulation, and Turndown for converting HTML to Markdown.
0
yawnxyz avatar
yawnxyz
deletebio
HTTP
// at ms2, we're collecting mge vs. bacteria data over time, to build models that help us create, read, update, and delete bacteria from anywhere.
0
yawnxyz avatar
yawnxyz
selectHtml
Script
SelectHtml is a Deno-based HTML scraper that integrates AI with Cheerio and Pug. This tool allows you to fetch, clean, and manipulate HTML content from URLs, using the Cheerio library to select and clean the HTML elements, and html2pug to convert HTML into Pug templates. Deprecated; use htmlTo instead, as that one supports more formats: https://www.val.town/v/yawnxyz/htmlTo
0
yawnxyz avatar
yawnxyz
luciaValtownSqlite
Script
A reorganization of: https://www.val.town/v/stevekrouse/lucia_adapter https://esm.town/v/stevekrouse/lucia_adapter_base
1
yawnxyz avatar
yawnxyz
simpleLogin
HTTP
// Your routes go here
1
yawnxyz avatar
yawnxyz
hnCloneOAuth
Script
An interactive, runnable TypeScript val by yawnxyz
2
yawnxyz avatar
yawnxyz
honoJsxHtmlTemplates
HTTP
Base working example of combining Hono, React/JSX, and html templates
0
yawnxyz avatar
yawnxyz
perlinNoiseFabric
HTTP
Full credit goes to @yuruyurau: https://twitter.com/yuruyurau/status/1830677030259839352
0
yawnxyz avatar
yawnxyz
dobby
Script
Simple wrapper class around valtown's sqlite https://www.val.town/v/yawnxyz/dobby // Example usage: const dobby = new Dobby("myDatabase", [ { name: "id", type: "INTEGER", primaryKey: true }, { name: "name", type: "TEXT", notNull: true }, { name: "age", type: "INTEGER" }, { name: "balance", type: "REAL" }, ]); await dobby.createDatabase(); // Insert some sample data await dobby.insert({ id: 1, name: "John Doe", age: 30, balance: 1000.50 }); await dobby.insert({ id: 2, name: "Jane Smith", age: 25, balance: 2000.75 }); await dobby.insert({ id: 3, name: "Bob Johnson", age: 40, balance: 1500.25 }); // Filter examples const results1 = await dobby.filter({ age: { gt: 25 } }); console.log("Users older than 25:", results1); const results2 = await dobby.filter({ name: { like: '%John%' } }); console.log("Users with 'John' in their name:", results2); const results3 = await dobby.filter({ balance: { between: [1000, 2000] } }); console.log("Users with balance between 1000 and 2000:", results3); const results4 = await dobby.filter({ age: { in: [25, 30, 35] } }); console.log("Users aged 25, 30, or 35:", results4); const results5 = await dobby.filter({ name: { ne: 'John Doe' } }, { limit: 2 }); console.log("Up to 2 users not named John Doe:", results5); // Search examples const searchResults1 = await dobby.search("name", "John"); console.log("Users with 'John' in their name:", searchResults1); const searchResults2 = await dobby.search("name", "son", { limit: 1 }); console.log("First user with 'son' in their name:", searchResults2); // You can search in any text column const searchResults3 = await dobby.search("age", "3"); console.log("Users with '3' in their age:", searchResults3); // Example of using the new dropDatabase function await dropDatabase("myDatabase");
0
yawnxyz avatar
yawnxyz
upstashVectorExample
Script
// index.reset(); // resets the index!! deletes everything
1
yawnxyz avatar
yawnxyz
upstashExample
Script
An interactive, runnable TypeScript val by yawnxyz
0