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
| // When `open` is true, sets `document.body.style.overflow` to `hidden` so | |
| // the page behind modals/drawers does not scroll; restores `unset` when closed. | |
| import { useEffect } from 'react'; | |
| export const useDisableBodyScroll = (open: boolean) => { | |
| useEffect(() => { | |
| if (open) { | |
| document.body.style.overflow = 'hidden'; | |
| } else { | |
| document.body.style.overflow = 'unset'; |
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
| // Keeps React state in sync with `window.location.hash` (fragment without `#`) | |
| // via `hashchange`, and seeds from the initial hash on mount. | |
| import React from 'react'; | |
| export function useHashChange() { | |
| const [activeItemId, setActiveItemId] = React.useState<string | null>(null); | |
| React.useEffect(() => { | |
| if (!activeItemId && window.location.hash) { | |
| setActiveItemId(window.location.hash.substring(1)); |
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
| // After mount, collects linked headings (`a > h2`–`h6`) into `{ id, text }` pairs | |
| // from the parent anchors `id`; state updates only when there are at least two (for TOC-style UI). | |
| import React from 'react'; | |
| export interface HeadingAnchor { | |
| id: string; | |
| text: string; | |
| } | |
| export const useHeadingAnchors = () => { |
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
| // Subscribes to `scroll` (passive) and exposes whether the user is moving | |
| // down the page, up, or still in the “top” band (y === 0 or within ~40px while settling). | |
| import { useEffect, useState } from 'react'; | |
| export enum ScrollDirection { | |
| Top = -1, | |
| Initial = 0, | |
| Bottom = 1, | |
| } |
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
| { | |
| "env": { | |
| "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1", | |
| "DISABLE_TELEMETRY": "1", | |
| "DISABLE_ERROR_REPORTING": "1", | |
| "DISABLE_FEEDBACK_COMMAND": "1", | |
| "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1", | |
| "CLAUDE_CODE_SKIP_PROMPT_HISTORY": "1", | |
| "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "1", |
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
| # Secrets | |
| .env | |
| .env.* | |
| *.pem | |
| *.key | |
| *.p12 | |
| *.pfx | |
| secrets/ | |
| private/ | |
| certs/ |
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
| node_modules/ | |
| dist/ | |
| build/ | |
| coverage/ | |
| .next/ | |
| .nuxt/ | |
| .turbo/ | |
| .cache/ |
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
| { | |
| "permissions": { | |
| "defaultMode": "acceptEdits", | |
| "allow": [ | |
| "Read", | |
| "Edit", | |
| "Write", | |
| "Bash(git status)", | |
| "Bash(git status *)", |
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
| { | |
| "permissions": { | |
| "defaultMode": "acceptEdits", | |
| "allow": [ | |
| "Read", | |
| "Edit", | |
| "Write", | |
| "Bash" | |
| ], | |
| "ask": [ |
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
| :: 1) pip | |
| py -m pip cache info | |
| py -m pip cache purge | |
| :: 2) npm | |
| npm cache verify | |
| npm cache clean --force | |
| :: 3) yarn | |
| yarn cache clean |
OlderNewer