calculatormain.tsx3 matches
3import React, { useState } from "https://esm.sh/react@18.2.0";
45function Calculator() {
6const [display, setDisplay] = useState("0");
7const [previousValue, setPreviousValue] = useState(null);
80}
8182function client() {
83createRoot(document.getElementById("root")).render(<Calculator />);
84}
85if (typeof document !== "undefined") { client(); }
8687export default async function server(request: Request): Promise<Response> {
88return new Response(
89`
voiceControlCalculatormain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function VoiceCalculator() {
6const [result, setResult] = useState('0');
7const [isListening, setIsListening] = useState(false);
132}
133134function client() {
135createRoot(document.getElementById("root")).render(<VoiceCalculator />);
136}
138if (typeof document !== "undefined") { client(); }
139140export default async function server(request: Request): Promise<Response> {
141return new Response(`
142<html>
simpleSqliteLockREADME.md1 match
12const lock = new SqliteLock(projectVal.name, twoMinutes);
1314export default async function(interval: Interval) {
15await lock.lock()
16}
simpleSqliteLockexample1 match
6const lock = new SqliteLock(projectVal.name, twoMinutes);
78export default async function(interval: Interval) {
9console.log(await lock.lock());
10}
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
hardballcitysubmitLink9 matches
67const authDomain = Deno.env.get("CLERK_DOMAIN");
8export default async function(req: Request): Promise<Response> {
9const app = await getApp();
1012}
1314export async function getApp(): Promise<Hono> {
15var app = new Hono();
16app.use(clerkMiddleware());
21}
2223async function newLinkForm(c): Promise<string> {
24const auth = getAuth(c);
25if (!auth?.userId) {
38}
3940export async function linkExists(url: string): Promise<boolean> {
41var rows = await sqlite.execute(
42"SELECT * FROM hbc_stories WHERE url = ? AND (CURRENT_TIMESTAMP - posted) < (86400 * 60)",
46}
4748export async function insertLink(title: string, url: string, poster: string) {
49await sqlite.execute({
50sql: `INSERT INTO hbc_stories (title, url, poster) VALUES (?, ?, ?)`,
53}
5455async function addLink(c): Promise<string> {
56const auth = getAuth(c);
57if (auth?.userId) {
68}
6970function dupe(c): string {
71return template(`
72<h3>Duplicate link</h3>
75}
7677// Helper function to escape HTML special characters
78function escapeHtml(str: string): string {
79return str
80.replace(/&/g, "&")
hardballcitymlbCron1 match
2import { insertLink, linkExists } from "./submitLink";
34export default async function(interval: Interval) {
5// Get the first story from mlb.com rss feed
6let parser = new Parser({
SideProjectSaturdaylogic.ts3 matches
17const guests: Record<string, Guest> = {};
1819export function addGuest(name: string, email: string): string {
20// Check if guest already exists with this email
21const existingGuest = Object.values(guests).find(g => g.email === email);
36}
3738export function getNextEventStatus(): EventStatus {
39const now = new Date();
40const nextSaturday = new Date(now);
60export type SignupData = z.infer<typeof SignupSchema>;
6162export function getEventDateMessage(date: Date | null): string {
63if (!date) return "Most Saturday Mornings";
64
SideProjectSaturdayemail.ts1 match
10// });
1112export function sendGuestProfileLink() {
13resend.emails.send({
14from: "info@sideprojectsaturday",
158await fetch(telegramSendUrl);
159};
160export default async function(interval: Interval) {
161const forecast = await fetchForecast();
162const formatted = formatWeatherForecast(forecast);