Sehnsucht Blog

website·Indexed 31 days ago

https://blog.sehnsucht.top

A personal blog featuring technical guides on LVM, Podman, GitLab CI/CD, and fail2ban, alongside reflections on literature, tea knowledge, and personal life experiences.

Tokens
35.6K
Snippets
176
Records
229
Agent score
64%

What's inside Sehnsucht Blog

  1. Overview of Chinese Tea Categories and Processing

    Chinese tea is categorized into six major types based on processing methods and oxidation levels. The core of tea production is controlling enzyme activity to alter color, aroma, and taste through a sequence of steps: Picking → Withering → Fixation (Kill-green) → Rolling → Fermentation (Oxidation) → Drying.

    Tea TypeOxidation LevelCore ProcessKey CharacteristicsExamples
    Green TeaNon-fermentedPicking → Fixation → Rolling → DryingFresh, green color, natural flavorWest Lake Longjing, Biluochun
    White TeaSlightly fermentedWithering → DryingMild aroma, light taste, minimal processingSilver Needle, White Peony
    Yellow TeaLightly fermentedFixation → Rolling → Yellowing (Men Huang) → DryingMellow taste, yellow liquorJunshan Yinzhen
    Oolong TeaSemi-fermentedWithering $\rightarrow$ Bruising $\rightarrow$ Fixation $\rightarrow$ Rolling $\rightarrow$ DryingComplex aroma, layered tasteTie Guan Yin, Da Hong Pao
    Black TeaFully fermentedWithering → Rolling → Fermentation → DryingRed liquor, rich aroma, bold tasteQimen Black Tea, Dianhong
    Dark TeaPost-fermentedFixation → Rolling → Heaping (Wo Dui) → Drying $\rightarrow$ AgingAged aroma, mild nature, long shelf-lifePu-erh Ripe Tea, Anhua Black Tea
  2. Understand the Diffie-Hellman Key Exchange algorithm

    The key exchange algorithm allows two parties (Alice and Bob) to establish a shared secret (ABG) over an insecure channel without transmitting the secret itself. It relies on the property of one-way hash functions (or modular exponentiation), where given the result F(x) and the function F, it is computationally infeasible to determine x.

    The Process:

    1. Public Parameters: Alice, Bob, and any eavesdropper (Hack) agree on a public generator G.
    2. Private Keys: Alice chooses a private number A; Bob chooses a private number B.
    3. Public Key Generation:
      • Alice computes a public value AG using A and G.
      • Bob computes a public value BG using B and G.
    4. Exchange: Alice sends AG to Bob; Bob sends BG to Alice. An eavesdropper now knows G, AG, and BG, but cannot derive A or B due to the one-way nature of the function.
    5. Shared Secret Derivation:
      • Alice combines the received BG with her private A to generate the shared secret ABG.
      • Bob combines the received AG with his private B to generate the same shared secret ABG.

    Because the eavesdropper lacks either A or B, they cannot calculate ABG.

  3. Understand the Value Added Tax (VAT) deduction principle

    Value Added Tax (VAT) is a consumption tax where the tax is collected at each stage of the supply chain. The 'deduction' mechanism allows businesses to subtract the VAT they paid on purchases (Input Tax) from the VAT they collected on sales (Output Tax), ensuring that tax is only paid on the 'value added' at each stage. The final tax burden is ultimately borne by the end consumer, who cannot claim further deductions.
  4. View LVM Volume Group information

    Depending on the level of detail required, use vgs for a brief summary or vgdisplay for comprehensive details about the volume groups.
    # Brief summary of volume groups
    vgs
    
    # Detailed information about volume groups
    vgdisplay
  5. Understand Asymmetric Encryption and Hybrid Encryption

    Asymmetric encryption separates the encryption key (Public Key) from the decryption key (Private Key). The public key is shared with others to encrypt data, while the private key is kept secret by the owner to decrypt that data. A common example of this is the RSA algorithm.

    Because asymmetric encryption is computationally slower than symmetric encryption, a hybrid approach is used for large data transfers: asymmetric encryption is used to securely exchange a symmetric encryption key, and that symmetric key is then used for the actual high-speed data transmission.

    sequenceDiagram
        Alice->>Bob: Public Key encrypts {Symmetric Key} and sends it
        Bob->>Bob: Decrypts to obtain {Symmetric Key}
        Bob->>Alice: Sends data using {Symmetric Key}
        Alice->>Alice: Receives and decrypts using {Symmetric Key}
        Alice->>Bob: Encrypts data again and sends
        Bob-->>Alice: Repeat process
  6. Identify 3-friendly integers

    A positive integer is considered '3-friendly' if it contains at least one continuous substring in its decimal representation that is a multiple of 3. Substrings with leading zeros are permitted. For example, '104' is 3-friendly because '0' is a multiple of 3; '124' is 3-friendly because '12' and '24' are multiples of 3; '17' is not 3-friendly because neither '1', '7', nor '17' are multiples of 3.
  7. Check Logical Volume (LV) sizes and status

    Use the lvs command to display information about the Logical Volumes (LVs) in the system, including their size, attributes, and the Volume Group (VG) they belong to. This is the primary way to determine the current size of an LV before performing operations like extending or reducing it.
    lvs
  8. Understand how Public Key Certificates and CAs secure HTTPS

    A digital certificate consists of a public key and a digital signature issued by a trusted third-party Certificate Authority (CA). The process ensures that a browser can verify the identity of a server before establishing an encrypted connection.

    The Verification Workflow:

    1. The server submits its public key and identity information (e.g., domain name) to a CA.
    2. The CA verifies the information and signs the certificate using the CA's own private key.
    3. The server sends this signed certificate to the browser during the SSL/TLS handshake.
    4. The browser uses pre-installed public keys from trusted CAs to decrypt and verify the CA's signature.
    5. Once verified, the browser trusts the server's public key, allowing the establishment of an encrypted SSL/TLS layer between the HTTP and TCP protocols to protect data transmission.
  9. View Logical Volume (LV) information

    Use lvs for a brief summary of logical volumes or lvdisplay for detailed information about all logical volumes. To view details for a specific logical volume, provide the device path to lvdisplay.
    # Brief overview
    lvs
    
    # Detailed overview of all LVs
    lvdisplay
    
    # Detailed info for a specific LV
    sudo lvdisplay /dev/my_volume_group/my_logical_volume
  10. Understand GitLab Runner for automated deployment

    GitLab Runner acts as a task executor. It allows you to automate processes such as building, testing, and packaging code whenever a commit is pushed to a GitLab repository, enabling a full automated deployment (CI/CD) pipeline.
  11. Set up a Docker build environment for Java and Node.js projects

    When creating a dedicated Docker build environment, common required tools include rsync, git, maven, node, and Java (JDK for building JAR files, or JRE for execution only). To manage multiple versions of these environments without requiring root privileges, use user-level version managers such as nvm or mise.

    Note: Version managers often do not load automatically in non-interactive shells. To use tools like nvm in a script or non-interactive session, you must explicitly source the configuration file (e.g., source ~/.bashrc) before executing the commands.