jaywcjlove/reference Quick Reference Guide

repository·main·Indexed 12 days ago

https://github.com/jaywcjlove/reference

A comprehensive technical stack quick reference guide and cheat sheet collection curated and translated for Chinese-speaking developers. It covers a wide array of domains including AI (ChatGPT, Claude), programming languages (Rust, Go, Python), frontend frameworks (React, Vue), databases (MySQL, Redis), Docker, Git, and various command-line utilities like 7z and ADB.

Tokens
305.5K
Snippets
1.1K
Records
1.4K
Agent score
95%

What's inside jaywcjlove/reference

  1. Introduction to APT (Advanced Packaging Tools)

    main

    APT is the package manager for Debian and its derivatives. It automates the downloading, configuration, and installation of software in both binary and source formats. While originally designed as a frontend for dpkg to handle .deb files, versions like APT-RPM allow it to manage RPM packages on supported systems.

    Note: Most apt commands must be executed with sudo privileges.

  2. Overview of jaywcjlove/reference

    main
    The jaywcjlove/reference repository is a technical stack quick reference guide curated for Chinese-speaking developers. It is a translated and expanded version of the English Reference project, designed to improve lookup efficiency and user experience by providing a comprehensive list of useful technical resources and tools. The project is continuously updated and encourages community contributions via Pull Requests.
  3. Julia Language Overview

    main

    Julia is a high-performance, open-source, multi-platform programming language designed for scientific computing. Key features include:

    • JIT Compilation: Uses an LLVM-based Just-In-Time compiler for C/FORTRAN-like performance.
    • Dynamic Typing: Supports dynamic typing with a multiple dispatch mechanism designed for parallel and distributed computing.
    • Built-in Package Manager: Includes a native system for managing dependencies.
    • Mathematical Support: Built-in mathematical functions (e.g., Gamma function) and out-of-the-box complex number support.
    • Metaprogramming: Supports code generation via Lisp-like macros.
  4. .NET CLI Overview and Command Structure

    main

    The .NET CLI is a cross-platform toolchain provided with the .NET SDK used to develop, build, run, test, and publish .NET applications.

    Commands follow the structure: dotnet <command> [arguments] [options]

    Commonly used short options include:

    • -c|--configuration
    • -f|--framework
    • -o|--output
    • -r|--runtime

    To check your environment, use:

    $ dotnet --info
    $ dotnet --version
    $ dotnet --list-sdks
    $ dotnet --list-runtimes
    $ dotnet --info
    $ dotnet --version
    $ dotnet --list-sdks
    $ dotnet --list-runtimes
  5. Explore the jaywcjlove/reference documentation categories

    main

    The jaywcjlove/reference repository is a comprehensive collection of quick reference guides for developers. The documentation is organized into several major technical domains:

    • AI: Tools and models including ChatGPT, Claude, Gemini, and Grok.
    • Programming: A wide array of languages (C, C++, Go, Java, Python, Rust, etc.) and frameworks (NestJS, Spring Boot, Laravel).
    • Docker: Containerization tools including Docker, Docker Compose, and Dockerfile.
    • Configuration: Data formats like INI, JSON, TOML, and YAML.
    • Frontend: Web technologies including HTML, JavaScript, TypeScript, React, Vue, and Next.js.
    • CSS: Styling tools such as Tailwind CSS, Sass, Less, and Styled Components.
    • Client-side: Desktop and mobile application frameworks like Electron, Tauri, and React Native.
    • Node.js: Runtime and ecosystem tools including Express.js, npm, pnpm, Bun, and PM2.
    • Python: Python-specific ecosystem guides for Django, Flask, FastAPI, PyTorch, and package managers like pip and uv.
  6. Python 3 Quick Reference Overview

    main
    This document serves as a comprehensive cheat sheet for the Python 3 programming language, covering fundamental syntax, built-in data types, string manipulation, list operations, and more. It is intended as a quick reference for developers.
  7. Frontend Development (FED) Quick Reference Links

    main
    This document serves as a curated navigation guide for Frontend Engineering (FED) tools and resources, categorized by functional area including build tools, JavaScript utilities, CSS tools, frameworks, and testing environments.
  8. Safely access nested attributes

    main

    Because accessing a non-existent attribute in Nix causes an error, it is a best practice to implement a 'safe get' pattern for nested structures. This involves checking if an attribute exists using builtins.hasAttr and if the current level is an attribute set using builtins.isAttrs before recursing.

    let
      safeGet = attrs: path: default: 
        let
          keys = builtins.split "\." path;
          getValue = obj: keyList: 
            if keyList == [] then obj
            else if !builtins.isAttrs obj then default
            else if !builtins.hasAttr (builtins.head keyList) obj then default
            else getValue (obj.${builtins.head keyList}) (builtins.tail keyList);
        in
          getValue attrs keys;
    
      config = { database = { host = "localhost"; }; };
    in
      { dbHost = safeGet config "database.host" "default-host"; }
  9. Understand iptables chains (INPUT, OUTPUT, FORWARD)

    main

    iptables manages traffic using three primary chains, each controlling a different type of connection flow:

    • INPUT: Controls behavior for incoming connections destined for the local system.
    • OUTPUT: Controls behavior for outgoing connections originating from the local system.
    • FORWARD: Controls connections passing through the system (e.g., routing or NATing), where the destination is not the local machine itself.
  10. Configure Thinking Mode in Gemma 4

    main

    Gemma 4 supports a 'Thinking' mode for complex reasoning tasks. To enable it, add <|thought|> to the beginning of your system prompt and set enable_thinking=True in the chat template application.

    Output Structure: When thinking is enabled, the model outputs a thought block followed by the final response.

    Important Rules:

    • In multi-turn conversations, omit the thought blocks from the conversation history. Only pass the result["response"] back to the model.
    • For 31B/26B A4B models, if enable_thinking=False, the model will still output empty tags (thought\n<|\|> and \n<|\|> ) to maintain structure.
    • E2B/E4B models will skip empty tags entirely when disabled.
    messages = [
        {
            "role": "system",
            "content": "<|thought|>You are a math expert."
        },
        {"role": "user", "content": "Solve: 3x + 7 = 22"}
    ]
    
    text = processor.apply_chat_template(
        messages,
        tokenize=False,
        add_generation_prompt=True,
        enable_thinking=True
    )
    # ... generate and parse ...
  11. Makefile Basics and Workflow

    main

    A Makefile defines rules for building targets. When you run make, it follows a specific workflow:

    1. Reads all Makefiles and those included via include.
    2. Initializes variables.
    3. Infers implicit rules and analyzes all rules.
    4. Creates a dependency chain for all target files.
    5. Determines which targets need to be regenerated based on dependencies.
    6. Executes the generation commands.

    Basic Rule Syntax:

    TARGET: PREREQUISITES
    	COMMAND
    • target: The file to be generated or a label (like clean).
    • prerequisites: A list of files required to build the target.
    • command: The shell command to execute. CRITICAL: Commands must start with a TAB character.
    a.txt: b.txt c.txt
    	cat b.txt c.txt > a.txt
  12. Layout with Flexbox in React Native

    main

    React Native uses a Flexbox-based layout system. Unlike web CSS, all containers are display: flex by default.

    Key properties:

    • flexDirection: Determines the direction of children. Values: row, row-reverse, column, column-reverse. (Default is column).
    • justifyContent: Determines how children are aligned along the primary axis. Values: flex-start, flex-end, center, space-around, space-between, space-evenly.
    • flex: A number that defines how much space a component should occupy relative to its siblings.
    // Row layout with distributed spacing
    <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
      <View style={{ flex: 1 }} />
      <View style={{ flex: 1 }} />
    </View>