Dev-Hub Wiki

website·Indexed 29 days ago

https://wiki.dev-hub.top/

A personal knowledge base and developer diary featuring a technical timeline, blog posts on Linux learning and GPT-assisted coding, and a collection of tools and recipes.

Tokens
4.3K
Snippets
32
Records
65
Agent score
52%

What's inside Dev-Hub Wiki

  1. Overview of pytest for Python testing

    pytest is a Python testing framework that is compatible with the unittest module and supports generating test reports in HTML format.
  2. Essential Linux command-line tools by category

    A categorized list of fundamental Linux CLI tools for various tasks:

    • Data Retrieval: curl, wget
    • File System: cd, ls, find, mv, cp, rm
    • Networking: ping, telnet
    • Text Editors: vim
    • Data Processing/Pipes: cat, grep, sed, awk, xargs
    • System & Utilities: Tmux, Docker, history
  3. Cook frozen wontons (Huntun)

    To prepare frozen wontons, use approximately 10 pieces. Boil them in hot water with the lid open for about 10 minutes.
  4. Use Vibe Kanban and EnsoAI for Agent Worktree management

    Vibe Kanban and EnsoAI are tools designed for managing parallel worktrees and kanban workflows specifically for AI agents such as Codex and Claude.
  5. Switch Yarn versions using Corepack

    Use Corepack to manage and switch between different versions of the Yarn package manager.
    # Corepack is typically bundled with Node.js
    corepack enable
    corepack prepare yarn@<version> --activate
  6. Enable Touch ID for sudo in macOS Terminal

    To enable fingerprint (Touch ID) authentication for sudo commands in the macOS terminal, use the pam_reattach package. This solution also ensures that Touch ID authentication works within Tmux sessions.
    # Installation and configuration can be found at:
    https://github.com/fabianishere/pam_reattach
  7. Implement multi-user login in Electron using partitions

    In Electron, you can use the partition attribute to isolate session data. This allows multiple users to be logged in simultaneously, as each partition maintains its own separate cookies and localStorage.
  8. Choose a Linux terminal emulator

    Depending on your needs for performance or customization, the following terminal emulators are recommended for Linux environments: iTerm2, Alacritty, and Kitty.
  9. React useEffect and ref dependency best practices

    To avoid common bugs in React:

    1. Ensure ref.current is included in the dependency array of the useEffect hook where it is used to prevent indexing errors when the ref updates.
    2. Always clean up third-party event listeners in the useEffect return function to avoid closures capturing stale data.
    3. Use ESLint to ensure dependency arrays are configured correctly, as TypeScript alone may not catch missing dependencies.
  10. Modern alternatives to standard Linux commands

    Replace traditional Linux commands with these modern, feature-rich alternatives to improve productivity:

    • Replace ls with eza
    • Replace cd with zoxide
    • Replace standard docker CLI with LazyDocker
    • Replace standard git CLI with LazyGit
    • Use nnn for efficient file navigation
  11. Generate structured data with GPT function calling

    GPT function calling allows the model to return structured data based on a provided JSON schema, making it easier to integrate LLM outputs into programmatic workflows.