Search
notUberRide
@vawogbemi
@jsxImportSource https://esm.sh/react@18.2.0
Script
/** @jsxImportSource https://esm.sh/react@18.2.0 */
import { init } from "https://esm.sh/@instantdb/react?deps=react@18.2.0";
import { IconLoader2 } from "https://esm.sh/@tabler/icons-react?deps=react@18.2.0";
import React from "https://esm.sh/react@18.2.0";
import { INSTANTDB_APP_ID } from "https://esm.town/v/vawogbemi/notUberConsts";
soaringRedMoose
@disu1112
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
excellentGoldGrouse
@Channeller
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(
getClientID
@beneskildsen
An interactive, runnable TypeScript val by beneskildsen
RPC (deprecated)
import { getItem } from "https://esm.town/v/beneskildsen/getItem";
export const getClientID = async () => {
const nextClientID = getItem("nextClientID", "clients");
await setItem("nextClientID", nextClientID + 1, "clients");
return nextClientID;
rottenMoccasinHamster
@aaronvg
@jsxImportSource npm:react
HTTP
/** @jsxImportSource npm:react **/
import { renderToString } from "npm:react-dom@18/server";
export default (req: Request) => {
return new Response(
solidExample
@rayman
@jsxImportSource https://esm.sh/solid-jsx
HTTP
/** @jsxImportSource https://esm.sh/solid-jsx */
import StlViewer from "npm:react-stl-viewer";
import { renderToString } from "npm:solid-js/web";
function StlViewer() {
nvc
@stevekrouse
Non-Violent Communication (NVC) Mobile Worksheet Inspired by the lovely iGrok mobile app .
HTTP
/** @jsxImportSource https://esm.sh/react */
import { modifyHtmlString } from "https://esm.town/v/andreterron/codeOnValTown?v=46";
import { renderToString } from "npm:react-dom/server";
export const reactExample = (request: Request) =>
new Response(
<div>compassion</div>
<div>consideration</div>
<div>empathy</div>
private_fal_model
@turbo1912
@jsxImportSource https://esm.sh/react
Cron
/** @jsxImportSource https://esm.sh/react */
import fal from "npm:@fal-ai/serverless-client";
import { renderToString } from "npm:react-dom/server";
export default async function(interval: Interval) {
laudableFuchsiaMastodon
@stevekrouse
👕 Shirtgen API Endpoint Shirtgen lets you generate AI-powered t-shirt designs with just a prompt! 🖋️ Choose between the standard "Flux Schnell" model or the enhanced "Pro" model. Perfect for creating unique custom apparel in seconds! 🚀 💡 How it Works Send a POST request to the endpoint with your design prompt. Toggle between Standard and Pro models using the useProModel flag. The AI generates a high-quality t-shirt design based on your prompt. 📥 Expected POST Data {
"prompt": "A retro sunset with palm trees 🌴🌅",
"useProModel": true
}
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
const [imageUrl, setImageUrl] = useState("");
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(request: Request): Promise<Response> {
slack_cleaner
@stevekrouse
Paste messages from Slack, get clean markdown This little webapp is intended to make it easier to copy messages from Slack into other places for sharing or archival, with cleaned-up, readable formatting. I hacked it together on valtown with copious help from an LLM over a weekend; please propose changes or edits, as I'm sure I missed many use-cases and edge-cases. This app runs entirely in your browser and does not send your data anywhere.
HTTP
white-space: pre-wrap;
word-wrap: break-word;
/* Style for <code> inside <pre>, overriding standalone <code> styles */
#renderedMarkdown pre > code {
/* Reset or adjust styles for code inside pre */
background-color: transparent;
padding: 0;
cerebras_searcher
@stevekrouse
Cerebras Searcher a Perplexity clone that uses the SerpAPI to do RAG
and summaries with Cerebras ( requires a SerpAPI key ) This val might not be working because we're out of SerpAPI credits,
but if you fork it and get your own SerpAPI key, it should work. Comment on this
val if you still have trouble, thanks! Setup Fork this val Sign up for Cerebras and get an API key Save it in a Val Town environment variable called CEREBRAS_API_KEY Get a SerpAPI key (free trial available) Set your SerpAPI API key into you Val Town Environment Variables Done!
HTTP
/** @jsxImportSource https://esm.sh/react */
import React, { useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
const DEFAULT_SEARCHES = [
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") {
client();
export default async function server(req: Request): Promise<Response> {
const { Cerebras } = await import("https://esm.sh/@cerebras/cerebras_cloud_sdk");
const client = new Cerebras();
const completion = await client.chat.completions.create({
messages: [{
valle_tmp_54846529024345792066850117206065
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import archiveVal from "https://esm.town/v/nbbaier/archiveVal?v=10";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
// Set these to your own
const username = "janpaul123";
coolMoccasinMoth
@ReedThaHuman
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
/** @jsxImportSource https://esm.sh/react@18.2.0 **/
import { renderToString } from "https://esm.sh/react-dom@18.2.0/server";
export default (req: Request) => {
return new Response(