imageConverterAppGlassUImain.tsx3 matches
11];
1213function ImageConverter() {
14const [sourceImages, setSourceImages] = useState([]);
15const [convertedImages, setConvertedImages] = useState([]);
186}
187188function client() {
189createRoot(document.getElementById("root")).render(<ImageConverter />);
190}
191if (typeof document !== "undefined") { client(); }
192193export default async function server(request: Request) {
194return new Response(`
195<html>
2import type { MaybePromise } from "https://esm.town/v/postpostscript/types/util.ts";
34export function abortable<T>(promise: MaybePromise<T>, signal?: AbortSignal): Promise<T> {
5if (signal?.aborted) {
6return Promise.reject(
28};
2930function cleanup() {
31signal!.removeEventListener("abort", handler);
32}
labUploadGetUploadsmain.tsx1 match
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
23export default async function(req: Request): Promise<Response> {
4// Get all rows from lab_upload_blobs
5const response = await sqlite.execute(`
gsheet_call_loggedREADME.md1 match
1# gsheet_specific_call
2Wrapper around Google Sheets API v4.
3(forked from mattx/gsheet_call; adds functionality to specify the sheet to make changes to)
45## Parameters
fabwbogglelikemain.tsx2 matches
2import { retryFill } from "https://esm.town/v/alexwein/gridRetryFill";
34export async function fabw() {
5// Import d3 and Plot with a server-side compatible approach
6const d3 = await import("https://cdn.jsdelivr.net/npm/d3@7/+esm");
59}
6061export default async function(request: Request) {
62return await fabw();
63}
cryptoVolumeTraderAdvicemain.tsx5 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function CryptoTracker() {
6const [cryptoData, setCryptoData] = useState({
7bitcoin: null,
1718useEffect(() => {
19async function fetchCryptoData() {
20try {
21const priceResponse = await fetch('https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,dogecoin&vs_currencies=usd&include_24hr_change=true');
61}, []);
6263function analyzeTradeSignal(volume, priceChange, currentPrice) {
64// Basic volume-based trading strategy
65if (volume > 1000000000 && Math.abs(priceChange) > 5) {
142}
143144function client() {
145createRoot(document.getElementById("root")).render(<CryptoTracker />);
146}
147if (typeof document !== "undefined") { client(); }
148149export default async function server(request: Request): Promise<Response> {
150return new Response(`
151<html>
ReminderAppmain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
6const [reminders, setReminders] = useState([]);
7const [newReminder, setNewReminder] = useState({
177}
178179function client() {
180createRoot(document.getElementById("root")).render(<App />);
181}
182if (typeof document !== "undefined") { client(); }
183184export default async function server(request: Request): Promise<Response> {
185const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
186const KEY = "ReminderApp";
cerebras_codermain.tsx11 matches
24);
2526function Hero({
27prompt,
28setPrompt,
4546<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
47Turn your ideas into fully functional apps in{" "}
48<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
49less than a second
116}
117118function App() {
119const previewRef = React.useRef<HTMLDivElement>(null);
120const [prompt, setPrompt] = useState("");
170});
171172function handleStarterPromptClick(promptItem: typeof prompts[number]) {
173setLoading(true);
174setTimeout(() => handleSubmit(promptItem.prompt), 0);
175}
176177async function handleSubmit(e: React.FormEvent | string) {
178if (typeof e !== "string") {
179e.preventDefault();
226}
227228function handleVersionChange(direction: "back" | "forward") {
229const { currentVersionIndex, versions } = versionHistory;
230if (direction === "back" && currentVersionIndex > 0) {
974);
975976function client() {
977const path = window.location.pathname;
978const root = createRoot(document.getElementById("root")!);
1010}
10111012function extractCodeFromFence(text: string): string {
1013const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1014return htmlMatch ? htmlMatch[1].trim() : text;
1015}
10161017async function generateCode(prompt: string, currentCode: string) {
1018const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1019if (starterPrompt) {
1060}
10611062export default async function cerebras_coder(req: Request): Promise<Response> {
1063// Dynamic import for SQLite to avoid client-side import
1064const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1163<meta property="og:site_name" content="Cerebras Coder">
1164<meta property="og:url" content="https://cerebrascoder.com"/>
1165<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1166<meta property="og:type" content="website">
1167<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
searchWithSerpApimain.tsx2 matches
1export async function searchWithSerpApi({
2query,
3site,
41}
4243function parseDate(snippet?: string): string | null {
44if (!snippet) return null;
45
enchantingBlushOrangutanmain.tsx3 matches
4import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
56function CreativeDeveloperPortfolio() {
7const [activeSection, setActiveSection] = useState("home");
8299}
300301function client() {
302createRoot(document.getElementById("root")).render(<CreativeDeveloperPortfolio />);
303}
305if (typeof document !== "undefined") { client(); }
306307export default async function server(request: Request): Promise<Response> {
308return new Response(
309`