This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ts from 'typescript'; | |
| import fs from 'fs'; | |
| import path from 'path'; | |
| const projectRoot = process.cwd(); | |
| const tsConfigPath = path.join(projectRoot, 'tsconfig.json'); | |
| const tsConfig = ts.readConfigFile(tsConfigPath, ts.sys.readFile).config; | |
| const parsedTsConfig = ts.parseJsonConfigFileContent(tsConfig, ts.sys, projectRoot); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| const elements = Array.from(document.querySelectorAll('*')); | |
| const zIndexedElements = elements.map(element => ({ | |
| element, | |
| zIndex: window.getComputedStyle(element).zIndex | |
| })) | |
| .filter(item => item.zIndex !== 'auto') | |
| .sort((a, b) => b.zIndex - a.zIndex); | |
| zIndexedElements.forEach(({ element, zIndex }) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class TimeSet { | |
| private items: Map<string, number>; | |
| constructor() { | |
| this.items = new Map(); | |
| } | |
| add(item: string) { | |
| const timestamp = Date.now(); | |
| this.items.set(item, timestamp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const isDev = process.env.NODE_ENV === 'development'; | |
| type ConsoleMethod = (...args: any[]) => void; | |
| export const debug = new Proxy({} as Record<keyof Console, ConsoleMethod>, { | |
| get(_, prop: keyof Console): ConsoleMethod { | |
| const fn = console[prop] as (...args: any[]) => void; | |
| if (!isDev || typeof fn !== 'function') return () => {}; | |
| return (...args: any[]) => fn('[Debug]', ...args); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { WranglerJson, WranglerJsonSpec } from "alchemy/cloudflare"; | |
| import { writeFile } from "fs/promises"; | |
| import prettier from "prettier"; | |
| interface ExtendedWranglerJsonSpec extends WranglerJsonSpec { | |
| migrations: { | |
| tag: string; | |
| new_sqlite_classes: string[]; | |
| }[]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ~/.config/opencode/config.json | |
| { | |
| "$schema": "https://opencode.ai/config.json", | |
| "agent": { | |
| "ask": { | |
| "description": "Answer questions about the codebase without making changes. Use this for exploring code, understanding architecture, finding files, and getting explanations.", | |
| "mode": "primary", | |
| "color": "#2E8B57", | |
| "temperature": 0.2, | |
| "tools": { |
OlderNewer