logmeinsessionCookie3 matches
1import { Cookie, deleteCookie, getCookies, setCookie } from "https://deno.land/std/http/cookie.ts";
2export const SESSION_COOKIE_NAME = "logmein_session";
3function setSessionCookie(key: string): Cookie {
4return {
5name: SESSION_COOKIE_NAME,
12}
1314export function getSessionKey(headers: Headers): string | undefined {
15return getCookies(headers)[SESSION_COOKIE_NAME];
16}
1718export function setSession(key: string, headers: Headers) {
19const cookie = setSessionCookie(key);
20setCookie(headers, cookie);
parseImportMetaval1 match
1415// adapted from https://www.val.town/v/pomdtr/extractValInfo
16export function parseVal(url: string | URL): Val {
17const { pathname, search } = new URL(url);
18const [username, filename] = pathname.split("/").slice(-2);
GitHubSyncgithub-push1 match
12const valtown = new ValTown();
1314export default async function GitHubPush(c: Context) {
15// auth check in /index
16const user = await valtown.me.profile.retrieve();
3const URL = "https://www.crossfit.com/workout/";
45export default async function main(req: Request): Promise<Response> {
6let wodToday = null;
7try {
statussparklineSVG1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3const padding = 2;
4const xMargin = 25;
GitHubSynchome1 match
4import type { Context } from "npm:hono";
56export default async function(c: Context) {
7return c.html(
8<html>
7}
89export function extractProjectValInfo(url: string): ProjectInfo {
10const pattern = /^https:\/\/esm\.town\/v\/([^/]+)\/([^@]+)@(\d+)-(.+?)(\/.*)?$/;
11const match = url.match(pattern);
mcpExampleechoMCP1 match
41);
4243export default async function(req: Request): Promise<Response> {
44const path = new URL(req.url).pathname;
45let transport: SSEServerTransport;
NeuralCanvasmain.tsx1 match
3import { handleApiRequest } from 'https://esm.town/v/@username/NeuralCanvas/api';
45export default async function server(request: Request): Promise<Response> {
6const url = new URL(request.url);
7
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">