Code Snippets
Save reusable functions, patterns, and boilerplate with syntax highlighting for every language you use.
Your best snippets, prompts, and commands end up scattered across tabs, threads, and shell history. Cortex keeps them in one place — searchable in seconds.
Save reusable functions, patterns, and boilerplate with syntax highlighting for every language you use.
Build a personal library of the prompts that actually work, ready to reuse instead of rewriting from scratch.
Command palette search across every snippet, prompt, and note. Find anything in under a second.
Stop digging through shell history. Keep the commands you actually need one search away.
Attach reference files, screenshots, and images right next to the notes that explain them.
Group related items into collections — a project, a stack, a client — and keep them organized as you grow.
Paste in a snippet and Cortex figures out the rest — language, a clean description, and tags that actually make it findable later.
export function useDebounce<T>(value: T, delay: number) {
const [debounced, setDebounced] = useState(value);
useEffect(() => {
const t = setTimeout(() => setDebounced(value), delay);
return () => clearTimeout(t);
}, [value, delay]);
return debounced;
}