placeholderKittenImagesmain.tsx2 matches
2// It supports generating square images with a single dimension parameter or rectangular images with two dimension parameters.
34export default async function server(request: Request): Promise<Response> {
5const url = new URL(request.url);
6const parts = url.pathname.split('/').filter(Boolean);
95<p>Start generating your own kitten images by using the form above or modifying the URL!</p>
96<script>
97document.getElementById('kittenForm').addEventListener('submit', function(e) {
98e.preventDefault();
99const width = document.getElementById('width').value;
resizeImageErrormain.tsx4 matches
6import { createRoot } from "https://esm.sh/react-dom/client";
78function App() {
9const [imageUrl, setImageUrl] = useState("");
10const [size, setSize] = useState("");
66}
6768function client() {
69createRoot(document.getElementById("root")).render(<App />);
70}
72if (typeof document !== "undefined") { client(); }
7374async function testEndpoint() {
75const testImageUrl = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png";
76const testSize = "100x100";
91}
9293export default async function server(req: Request): Promise<Response> {
94const url = new URL(req.url);
95if (url.pathname === "/test") {
placeholderImagesmain.tsx1 match
2// It supports generating square images with a single dimension parameter or rectangular images with two dimension parameters.
34export default async function server(request: Request): Promise<Response> {
5const url = new URL(request.url);
6const parts = url.pathname.split('/').filter(Boolean);
SocialMediaDashboardV1main.tsx3 matches
8import { motion, AnimatePresence } from "https://esm.sh/framer-motion";
910function App() {
11const [profiles, setProfiles] = useState([]);
12const [currentIndex, setCurrentIndex] = useState(0);
146}
147148function client() {
149createRoot(document.getElementById("root")).render(<App />);
150}
152if (typeof document !== "undefined") { client(); }
153154export default async function server(request: Request): Promise<Response> {
155const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
156const SCHEMA_VERSION = 1;
extractValInfomain.tsx1 match
1export function extractValInfo(url: string | URL) {
2const { pathname, search } = new URL(url);
3const [author, filename] = pathname.split("/").slice(-2);
valledrawclientmain.tsx6 matches
19// console.log(ret.url);
2021export default function({ iframeSrc }) {
22return async (req) => {
23const { extractValInfo } = await import("https://esm.town/v/pomdtr/extractValInfo");
5253if (typeof document !== "undefined") {
54(window as any).makeValleDrawClient = async function({ iframeSrc, model }) {
55const ret = { url: "https://esm.sh/~ae19cbe7d55c481140f1002355f248f335382639" };
5681} = tldraw;
8283function MakeRealButton() {
84const editor = useEditor();
85const { addToast } = useToasts();
91const { maxX, midY } = editor.getSelectionPageBounds();
9293const text = `export default async function main(req: Request): Promise<Response> {
94return new Response("Hello, World!", {
95headers: { "Content-Type": "text/plain" },
154}
155156function App() {
157return (
158<>
298];
299300function getRotatedBoxShadow(rotation: number) {
301const cssStrings = ROTATING_BOX_SHADOWS.map((shadow) => {
302const { offsetX, offsetY, blur, spread, color } = shadow;
CoverLetterGeneratormain.tsx4 matches
4import { OpenAI } from "https://esm.town/v/std/openai";
56export default async function server(req: Request): Promise<Response> {
7console.log("Request method:", req.method);
891}
9293async function extractTextFromPDF(file: File): Promise<string | null> {
94try {
95const { default: pdfjs } = await import("https://esm.sh/pdfjs-dist@3.4.120/build/pdf.min.js");
109}
110111async function generateCoverLetter(resume: string, jobDescription: string): Promise<string> {
112console.log("Entering generateCoverLetter function");
113const openai = new OpenAI();
114console.log("OpenAI instance created");
fetchTwitterUserInfoBrokenmain.tsx2 matches
4import cheerio from "https://esm.sh/cheerio@1.0.0-rc.12";
56export default async function server(req: Request): Promise<Response> {
7const url = new URL(req.url);
8const formData = await req.formData().catch(() => null);
139}
140141function parseFollowerCount(followerText: string): number {
142const cleanText = followerText.replace(/,/g, '').toLowerCase();
143const num = parseFloat(cleanText);
emailListManagermain.tsx8 matches
1// This val creates a mailing list manager using blob storage for persistence.
2// It provides functions to add and remove emails, and to send emails to all subscribers.
3// The email list is stored as a JSON array in a blob.
48const BLOB_KEY = "emailListManager" + "_email_list";
910async function getEmailList(): Promise<string[]> {
11return await blob.getJSON(BLOB_KEY) || [];
12}
1314async function saveEmailList(list: string[]): Promise<void> {
15await blob.setJSON(BLOB_KEY, list);
16}
1718async function addEmail(newEmail: string): Promise<string> {
19const list = await getEmailList();
20if (!list.includes(newEmail)) {
26}
2728async function removeEmail(emailToRemove: string): Promise<string> {
29const list = await getEmailList();
30const updatedList = list.filter(email => email !== emailToRemove);
36}
3738async function sendEmailToAll(subject: string, content: string): Promise<string> {
39const list = await getEmailList();
40if (list.length === 0) {
54}
5556export default async function server(req: Request): Promise<Response> {
57const url = new URL(req.url);
58const path = url.pathname;
97// }).then(response => response.text()).then(result => console.log(result));
9899function exportCSV() {
100const emails = ${JSON.stringify(emailList)};
101const csvContent = "data:text/csv;charset=utf-8," + emails.join("\\n");
longOliveGuppymain.tsx3 matches
7import { createRoot } from "https://esm.sh/react-dom/client";
89function App() {
10const [messages, setMessages] = useState([]);
11const [input, setInput] = useState("");
60}
6162function client() {
63createRoot(document.getElementById("root")).render(<App />);
64}
65if (typeof document !== "undefined") { client(); }
6667async function server(request: Request): Promise<Response> {
68const Cerebras = await import("https://esm.sh/@cerebras/cerebras_cloud_sdk");
69const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");