createGitHubContribGraphmain.tsx4 matches
172}
173174function App() {
175const [username, setUsername] = useState("stevekrouse")
176const [contributionData, setContributionData] = useState<any>(null)
360}
361362function client() {
363createRoot(document.getElementById("root")).render(<App />)
364}
365if (typeof document !== "undefined") { client() }
366367export default async function server(request: Request): Promise<Response> {
368if (request.method === "POST" && new URL(request.url).pathname === "/contributions") {
369const { username } = await request.json()
395}
396397async function fetchGitHubContributions(username: string) {
398const query = `
399query($username: String!) {
versionLogggerREADME.md1 match
1This helper function logs the version number of the val.
23```ts
immenseBlushSpidermain.tsx2 matches
2const API_URL = "https://build.wield.xyz/farcaster/v2/feed";
34export default async function server(request: Request): Promise<Response> {
5let feedItems = [];
6let error = null;
9error = "API key is not set. Please configure the FARCASTER_API_KEY environment variable.";
10} else {
11async function fetchFeedItems() {
12try {
13const response = await fetch(`${API_URL}?limit=50`, {
jealousMagentaFleamain.tsx1 match
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";
34export async function aqi(interval: Interval) {
5const location = "downtown brooklyn"; // <-- change to place, city, or zip code
6const data = await easyAQI({ location });
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";
34export async function aqi(interval: Interval) {
5const location = "downtown brooklyn"; // <-- change to place, city, or zip code
6const data = await easyAQI({ location });
violentGoldSnakemain.tsx1 match
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";
34export async function aqi(interval: Interval) {
5const location = "downtown brooklyn"; // <-- change to place, city, or zip code
6const data = await easyAQI({ location });
23});
24const message = data.choices[0].message;
25return message.function_call ? message.function_call : message.content;
26};
naughtyRedTunamain.tsx4 matches
3import { email } from "https://esm.town/v/std/email";
45async function fetchStories(type: string, count: number) {
6const response = await fetch(`https://hacker-news.firebaseio.com/v0/${type}stories.json`);
7const storyIds = await response.json();
15}
1617function createStoryHTML(story: any) {
18return `
19<li>
28}
2930function createEmailContent(
31topStories: any[],
32newStories: any[],
118}
119120export default async function server(req: Request) {
121try {
122const topStories = await fetchStories("top", 10);
hackerNewsDigestmain.tsx4 matches
3import { email } from "https://esm.town/v/std/email";
45async function fetchStories(type: string, count: number) {
6const response = await fetch(`https://hacker-news.firebaseio.com/v0/${type}stories.json`);
7const storyIds = await response.json();
15}
1617function createStoryHTML(story: any) {
18return `
19<li>
28}
2930function createEmailContent(
31topStories: any[],
32newStories: any[],
118}
119120export default async function server(req: Request) {
121try {
122const topStories = await fetchStories("top", 10);
3import { renderToString } from "https://esm.sh/react-dom/server";
45function createScreenBuffer(width: number, height: number): string[][] {
6const buffer: string[][] = [];
7for (let y = 0; y < height; y++) {
150};
151152function bufferToHtml(buffer: string[][], colors: any): string {
153let html = "<pre style=\"line-height: 1; font-family: monospace;\">";
154for (let y = 0; y < buffer.length; y++) {
212}
213214function App() {
215return (
216<div>
228}
229230export default async function server(request: Request): Promise<Response> {
231const app = renderToString(<App />);
232349let screensaverInterval;
350351function applyTheme(theme) {
352document.body.style.backgroundColor = theme.background;
353document.body.style.color = theme.text;
362}
363364function changeTheme() {
365currentThemeIndex = (currentThemeIndex + 1) % themeNames.length;
366const newTheme = themes[themeNames[currentThemeIndex]];
369}
370371function bufferToHtml() {
372let html = '<pre style="line-height: 1; font-family: monospace;">';
373const currentTheme = themes[themeNames[currentThemeIndex]];
432}
433434function growTreePart(y, x, type, life, direction = 0) {
435if (life <= 0) return null;
436480}
481482function growTree() {
483buffer = Array(height).fill().map(() => Array(width).fill(" "));
484growQueue = [{ x: Math.floor(width / 2), y: height - 1, type: 0, life: 32, direction: 0 }];
485
486function grow() {
487if (growQueue.length === 0) return;
488523}
524525function updateTree() {
526document.getElementById('tree-container').innerHTML = bufferToHtml();
527setTimeout(() => {
534}
535536function toggleScreensaver() {
537screensaverMode = !screensaverMode;
538document.body.classList.toggle('screensaver-mode', screensaverMode);