areschang.top Technical Blog

website·Indexed 31 days ago

https://areschang.top/

A collection of technical notes and tutorials covering uni-app development, WeChat Mini Program integration (payments, sharing, and navigation), JavaScript, CSS/SCSS, Webpack, Docker, and Ubuntu system configuration.

Tokens
73.1K
Snippets
470
Records
582
Agent score
62%

What's inside areschang.top

  1. Overview of Windows Subsystem for Linux (WSL)

    Windows Subsystem for Linux (WSL) is a Windows feature that allows developers to run a Linux environment directly on a Windows machine without the need for a separate virtual machine or dual-boot configuration, providing a seamless experience for those needing both operating systems.
  2. Overview of HTML (HyperText Markup Language)

    HTML, or HyperText Markup Language, is a static markup language used to define the structure and layout of web pages. Along with CSS and JavaScript, it forms the core foundation of front-end web development (often referred to as the 'Front-end Three Musketeers'). While it lacks programming constructs like variables, loops, or functions, it is essential for creating the underlying structure that allows for complex layouts and visual presentation on the web.
  3. Introduction to Flutter and Prerequisites

    Flutter is an open-source, free mobile UI framework created by Google for building high-quality native user interfaces for iOS and Android. It is designed to work alongside existing codebases. To begin learning Flutter, a foundational knowledge of Dart basic syntax is required.
  4. Overview of Node.js

    Node.js is a free, open-source, cross-platform JavaScript runtime environment. It enables developers to build servers, web applications, command-line tools, and scripts by allowing JavaScript to run outside of a web browser.
  5. Overview of degit

    degit is a tool used to download the latest commit of a repository without including the .git folder. This makes it ideal for downloading community templates to initialize new projects, as it removes the need to manually delete git history before running git init.
  6. Overview of NVM (Node Version Manager)

    NVM is a version manager for Node.js designed to be installed per-user and invoked via a shell. It supports any POSIX-compliant shell (sh, dash, ksh, zsh, bash) and is compatible with Unix, macOS, and Windows WSL.
  7. Inspect detailed information for a specific remote

    Use git remote show [alias/url] to view detailed information about a specific remote repository. This includes the Fetch and Push URLs, the HEAD branch, remote branches, and local branch tracking configurations.
    git remote show origin
  8. Follow JSX basic syntax rules

    When writing JSX in React, adhere to these fundamental syntax rules:

    1. No quotes for Virtual DOM: Do not wrap JSX tags in quotes.
    2. JS Expressions: Wrap JavaScript expressions in curly braces {}.
    3. CSS Classes: Use className instead of class to specify CSS classes.
    4. Inline Styles: Inline styles must be provided as objects.
    5. Single Root Element: A Virtual DOM tree must have exactly one root element.
    6. Closing Tags: All tags must be closed (e.g., <br />).
    7. Tag Casing:
      • Lowercase: React treats tags starting with lowercase letters as standard HTML elements. If no matching HTML element exists, it throws an error.
      • Uppercase: React treats tags starting with uppercase letters as custom components. If the component is not defined, it throws an error.
    function App() {
      const text = 'Hello, React!';
      return (
        <div className='App'>
          <span style={{ fontSize: '24px' }}>{text}</span>
          <br />
          <p>This is a lowercase tag (HTML)</p>
        </div>
      );
    }
  9. Test the GitHub SSH connection

    Verify that your SSH key is correctly configured by attempting to connect to GitHub via SSH. If prompted about the authenticity of the host, type yes. A successful connection will display a greeting message containing your GitHub username.
    ssh -T git@github.com
  10. Understand the three Git partitions (Working Directory, Staging Area, and Local Repository)

    Git operations are primarily based on three distinct areas that manage the state of your files:

    1. Working Directory (工作区): The actual directory on your filesystem where you edit code. Files that are newly created or modified but not yet added to the staging area are typically marked as untracked or modified (often shown in red in Git GUIs/CLIs).
    2. Staging Area (暂存区), also known as the index or stage: A temporary area where changes are gathered before being committed. Using git add moves changes from the working directory to the staging area, acting as a final check before permanent recording.
    3. Local Repository (版本库), also known as the commit history: The local database where Git stores the project's history. Using git commit moves changes from the staging area into the local repository, creating a permanent record. These changes are only sent to a remote server when git push is executed.
  11. Understand Authentication, Authorization, and Credentials

    In web security, these three concepts define how users are identified and what they are allowed to do:

    • Authentication: The process of verifying a user's identity (proving "you are who you say you are"). Examples include username/password login, email magic links, or SMS verification codes.
    • Authorization: The process where a user grants a third-party application permission to access specific resources (e.g., an app requesting access to your photo gallery or location). Common implementation methods include Cookies, Sessions, Tokens, and OAuth.
    • Credentials: The medium or certificate used to achieve authentication and authorization. In web apps, this is often a token issued by the server after a successful login, which the browser sends with subsequent requests to prove identity.
  12. Copy files and directories using scp

    The scp (secure copy) command is used to securely copy files and directories between Linux systems. It is based on SSH for secure login and data encryption, making it a secure alternative to rcp.
    scp [options] file_source file_target