cerebras_codermain.tsx2 matches
26// Rest of the code remains the same, with only name changes
2728export default async function fiftyTwoStartupsCoder(req: Request): Promise<Response> {
29// Dynamic import for SQLite to avoid client-side import
30const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
129<meta property="og:site_name" content="52 Startups Coder">
130<meta property="og:url" content="https://52startups.com"/>
131<meta property="og:description" content="Turn your startup ideas into fully functional apps in less than a second – powered by AI innovation.">
132<meta property="og:type" content="website">
133<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/52StartupsCoder.jpg">
openai_svgmain.tsx3 matches
1import { OpenAI } from "https://esm.town/v/std/openai";
23export default async function (req: Request): Promise<Response> {
4if (req.method !== "GET") {
5return new Response("Method not allowed", { status: 405 });
89<p><small>View source: <a href="${import.meta.url.replace("esm.town", "val.town")}" target="_top">Val Town</a></small></p>
90<script>
91document.addEventListener('DOMContentLoaded', function() {
92const form = document.getElementById('svgForm');
93const submitBtn = document.getElementById('submitBtn');
94const loadingIndicator = document.getElementById('loadingIndicator');
9596form.addEventListener('submit', function(e) {
97if (submitBtn.disabled) {
98e.preventDefault();
1export default async function(req: Request): Promise<Response> {
2if (req.method !== "POST") {
3return new Response(
dreamInterpreterAppmain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
6const [dream, setDream] = useState("");
7const [interpretation, setInterpretation] = useState("");
61}
6263function client() {
64createRoot(document.getElementById("root")).render(<App />);
65}
66if (typeof document !== "undefined") { client(); }
6768export default async function server(request: Request): Promise<Response> {
69if (request.method === "POST" && new URL(request.url).pathname === "/interpret") {
70const { OpenAI } = await import("https://esm.town/v/std/openai");
sqliteExplorerAppREADME.md1 match
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
excitedRoseMackerelmain.tsx1 match
1export default async function(interval: Interval) {
2}
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">
satisfiedGrayNarwhalmain.tsx1 match
1export default async function (e: Email) {
2
3}
1export default async function (e: Email) {
2
3}
affableCyanBeemain.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">