reactWeatherDashboardmain.tsx4 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function WeatherDashboard() {
6const [location, setLocation] = useState({ latitude: 40.7128, longitude: -74.0060 }); // Default to NYC
7const [weather, setWeather] = useState(null);
2829useEffect(() => {
30async function fetchWeather() {
31try {
32const response = await fetch(
152};
153154function client() {
155createRoot(document.getElementById("root")).render(<WeatherDashboard />);
156}
157if (typeof document !== "undefined") { client(); }
158159export default async function server(request: Request): Promise<Response> {
160return new Response(`
161<html>
OpenTelemetryCollectorindex.ts2 matches
4748/**
49* Export a function that wraps the incoming request,
50* then injects the Deno env vars into the Hono app befoe
51* executing the api entrypoint (`app.fetch`)
52*/
53export default async function(req: Request): Promise<Response> {
54const env = Deno.env.toObject();
55// NOTE - Adding the entire env object will also expose the following values to your api handlers:
ecstaticSalmonOrangutanmain.tsx7 matches
4import { marked } from "https://esm.sh/marked@9.0.0";
56function App() {
7const [messages, setMessages] = useState([
8{
9role: 'assistant',
10content: 'š Hello! I\'m an advanced AI assistant. I can help you with various tasks, answer questions, and even assist with code snippets!\n\nFeel free to explore my capabilities:\n\n```javascript\n// Try asking me about coding\nfunction exampleAIHelp() {\n return "AI is here to assist you!";\n}\n```\n\nš What would you like to know today?'
11}
12]);
49const renderMarkdown = (content) => {
50const markedContent = marked.parse(content, {
51highlight: function(code, lang) {
52return `<pre><code class="language-${lang || 'plaintext'}">${escapeHtml(code)}</code></pre>`;
53}
164}
165166function client() {
167createRoot(document.getElementById("root")).render(<App />);
168}
169if (typeof document !== "undefined") { client(); }
170171export default async function server(request: Request): Promise<Response> {
172if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
173const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
199];
200201// Advanced Fallback Generation Function
202function generateFallbackResponse(userInput: string): string {
203const keywords = userInput.toLowerCase().split(/\s+/);
204
3* with a better experience
4*/
5export function getOpenAPISpec() {
6return {
7openapi: "3.0.0",
8* @TODO - Need to implement `end_time` column for this query to work
9*/
10export function findTraces(db: DBType) {
11const REFERENCE QUERY = `
12SELECT trace_id, MAX(end_time) as end_time
loopyLettersmain.tsx5 matches
30};
3132function InstructionsModal({ onClose }) {
33return (
34<div className="modal-overlay">
50}
5152function GameOverModal({ elapsedTime, onPlayAgain }) {
53return (
54<div className="modal-overlay">
62}
6364function App() {
65const [wordlist, setWordlist] = useState([]);
66const [currentWordIndex, setCurrentWordIndex] = useState(0);
358}
359360function client() {
361createRoot(document.getElementById("root")).render(<App />);
362}
366}
367368export default async function server(request: Request): Promise<Response> {
369const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
370
blob_adminmain.tsx8 matches
13}
1415function Tooltip({ children, content }: TooltipProps) {
16const [isVisible, setIsVisible] = useState(false);
17const tooltipRef = useRef<HTMLDivElement>(null);
52}
5354function formatBytes(bytes: number, decimals = 2) {
55if (bytes === 0) return "0 Bytes";
56const k = 1024;
61}
6263function copyToClipboard(text: string) {
64navigator.clipboard.writeText(text).then(() => {
65console.log("Text copied to clipboard");
69}
7071function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
72const [isOpen, setIsOpen] = useState(false);
73const menuRef = useRef(null);
7677useEffect(() => {
78function handleClickOutside(event) {
79if (menuRef.current && !menuRef.current.contains(event.target)) {
80event.stopPropagation();
158}
159160function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
161const [isLoading, setIsLoading] = useState(false);
162const decodedKey = decodeURIComponent(blob.key);
219}
220221function App({ initialEmail, initialProfile }) {
222const encodeKey = (key: string) => encodeURIComponent(key);
223const decodeKey = (key: string) => decodeURIComponent(key);
645}
646647function client() {
648const initialEmail = document.getElementById("root").getAttribute("data-email");
649const initialProfile = JSON.parse(document.getElementById("root").getAttribute("data-profile"));
redditAlertREADME.md2 matches
42- Value: Your SERP API key.
4344Without this key, the val will not function correctly.
4546---
58- Key: `mentionsDiscord`
59- Value: Your Discord webhook URL.
60Notifications will be sent using this function:
61```
62await discordWebhook({
redditAlertmain.tsx1 match
12const isProd = true;
1314export async function redditAlert({ lastRunAt }: Interval) {
15if (!SERP_API_KEY || !DISCORD_API_KEY) {
16console.error("Missing SERP_API_KEY or Discord webhook URL. Exiting.");
redditAlertREADME.md2 matches
42- Value: Your SERP API key.
4344Without this key, the val will not function correctly.
4546---
58- Key: `mentionsDiscord`
59- Value: Your Discord webhook URL.
60Notifications will be sent using this function:
61```
62await discordWebhook({