150
151async function getUserId() {
152 const resp = await fetch("https://api.val.town/v1/me", {
153 headers: {
154 Authorization: `Bearer ${Deno.env.get("valtown")}`,
2 let json = await req.json();
3 const id = json.research.split("/").pop();
4 const res = await fetch(`https://api.jakeai.org/researches/${id}`);
5 json = await res.json();
6 return Response.json(json.insights.map(i => ({ type: i.type, group: i.group, quote: i.quote, ups: i.post.ups })));
13 <meta property="og:title" content="I proposed to my girlfriend in Quordle" />
14 <meta property="og:url" content="I proposed to my girlfriend in Quordle" />
15 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/emilrdle1.png" />
16 <meta property="twitter:title" content="I proposed to my girlfriend in Quordle" />
17 <meta property="og:type" content="article" />
19 <meta property="twitter:description" content="I proposed to my girlfriend in Quordle" />
20 <meta name="twitter:card" content="summary_large_image" />
21 <meta name="twitter:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/emilrdle1.png" />
22 <meta property="og:url" content="https://stevekrouse.com/proposal" />
23 <link rel="canonical" content="https://stevekrouse.com/proposal" />
56 screenshot of Quordle.
57 </p>
58 <img src="https://stevekrouse-blob_admin.web.val.run/api/public/emilrdle1.png" />
59 <p>
60 On a cold December night at Betaworks in Chelsea, I cozied up and worked with Townie for 90 minutes. It
124 <img
125 style={{ maxHeight: "500px", width: "auto", display: "block", margin: "0 auto" }}
126 src="https://stevekrouse-blob_admin.web.val.run/api/public/emilIMG_3220.JPG"
127 />
128 <p>
24}
25async function getUploadURL(): Promise<string> {
26 const data = await (await fetch("https://www.val.town/api/trpc/generateImageUploadUrl", {
27 "headers": {
28 "content-type": "application/json",
6 renderToString(
7 <html>
8 <link rel="preconnect" href="https://fonts.googleapis.com" />
9 <link rel="preconnect" href="https://fonts.gstatic.com" />
10 <link
11 href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
12 rel="stylesheet"
13 />
16 <meta charset="UTF-8">
17 <meta name="viewport" content="width=device-width, initial-scale=1.0">
18 <link rel="icon" href="https://api.iconify.design/fluent-emoji:studio-microphone.svg">
19 <title>Text to Speech</title>
20 <link rel="stylesheet" href="/styles.css">
110}
111
112textarea.scraping {
113 color: transparent;
114 background: linear-gradient(to bottom right, #4361ee88, #7209b788, #4cc9f088, #00a89688), #2a2a2a;
315 pasteBtn.disabled = true;
316 textInput.disabled = true;
317 textInput.classList.add('scraping');
318
319 try {
331 pasteBtn.disabled = false;
332 textInput.disabled = false;
333 textInput.classList.remove('scraping');
334 }
335
4export default async function startRetoolRPC(req) {
5 const rpc = new RetoolRPC({
6 apiToken: Deno.env.get("RETOOL_API_TOKEN"),
7 host: "https://charmaine.retool.com",
8 resourceId: "4632d490-1fa3-44ea-b2ab-8ef930ff64f4",
11 },
12 {
13 "prompt": "weather dashboard for nyc using open-meteo API for NYC with icons",
14 "title": "Weather App",
15 "code": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>NYC Weather</title>\n <link href=\"https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css\" rel=\"stylesheet\">\n <style>\n .weather-icon {\n font-size: 48px;\n margin-bottom: 16px;\n }\n </style>\n</head>\n<body class=\"h-screen bg-blue-100 flex justify-center items-center p-4\">\n <div class=\"bg-white p-8 rounded-md shadow-md w-full max-w-sm md:p-12 lg:p-16 xl:p-20\">\n <h1 class=\"text-2xl font-bold mb-4 text-center text-blue-500\">NYC Weather</h1>\n <div id=\"weather\" class=\"mb-4 p-4 text-center\">\n <div id=\"temperature\" class=\"text-4xl font-bold mb-4\"></div>\n <div id=\"condition\" class=\"text-xl font-medium mb-4\"></div>\n <div id=\"humidity\" class=\"text-lg font-light mb-2\">Humidity: <span id=\"humidity-value\"></span>%</div>\n <div id=\"wind\" class=\"text-lg font-light mb-2\">Wind: <span id=\"wind-value\"></span> mph</div>\n <i id=\"weather-icon\" class=\"weather-icon text-blue-500\"></i>\n </div>\n </div>\n <p class=\"fixed bottom-0 left-0 right-0 text-center p-4 text-gray-600 md:p-6 lg:p-8 xl:p-10\">\n Built on <a class=\"text-blue-600\" href=\"https://cerebrascoder.com\">Cerebras Coder</a>\n </p>\n\n <script>\n // Sample weather data\n const weatherData = {\n temperature: 75,\n condition: 'Sunny',\n humidity: 60,\n wind: 10,\n icon: 'sun'\n };\n\n document.getElementById('temperature').innerText = `${weatherData.temperature}°F`;\n document.getElementById('condition').innerText = weatherData.condition;\n document.getElementById('humidity-value').innerText = weatherData.humidity;\n document.getElementById('wind-value').innerText = weatherData.wind;\n\n // Map weather icon\n const weatherIcons = {\n 'sun': '☀',\n 'cloud': '☀',\n 'rain': '☃',\n 'snow': '☄'\n };\n\n document.getElementById('weather-icon').innerHTML = weatherIcons[weatherData.icon] || '';\n </script>\n</body>\n</html>",
8
91. Sign up for [Cerebras](https://cloud.cerebras.ai/)
102. Get a Cerebras API Key
113. Save it in your project env variable called `CEREBRAS_API_KEY`
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>CerebrasCoder</title>
7 <link rel="preconnect" href="https://fonts.googleapis.com" />
8 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9 <link
10 href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
11 rel="stylesheet"
12 />
21 <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."">
22 <meta property="og:type" content="website">
23 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
24
25