Arkoco's Personal Knowledge Base

website·Indexed 30 days ago

https://arkoco.github.io

A collection of technical guides and experiences from an IT engineer and design enthusiast. Topics include CSS best practices, Linux environment variable configuration, Oracle PL/SQL syntax, IntelliJ IDEA debugging techniques, npm proxy settings, and Docusaurus configuration.

Tokens
7.3K
Snippets
48
Records
60
Agent score
75%

What's inside Arkoco

  1. Understand the basic structure of a PL/SQL block

    Oracle PL/SQL uses a procedural block structure consisting of three main sections: DECLARE (optional), BEGIN (mandatory), and EXCEPTION (optional). The block must be terminated with a forward slash / to execute the entire block in tools like SQL*Plus.
    DECLARE
        -- Variable declaration area
    BEGIN
        -- Execution area
    EXCEPTION
        -- Exception handling area
    END;
    /
  2. Configure Conditional and Exception Breakpoints

    Use advanced breakpoint properties to trigger pauses only under specific conditions:

    • Conditional Breakpoints: Right-click a breakpoint and enter a Java expression in the 'Condition' box (e.g., i == 999). The program will only pause when the expression evaluates to true.
    • Exception Breakpoints: Open the Breakpoints dialog (Ctrl+Shift+F8), click the plus icon, and add a 'Java Exception Breakpoint'. Enter the exception class name (e.g., NullPointerException). IDEA will automatically pause at the exact line where the exception is thrown, even if no manual breakpoint is set.
  3. Install Scoop package manager on Windows

    Scoop requires PowerShell version 5.1 or later. To install Scoop, open a PowerShell terminal and execute the following commands to set the execution policy and run the installation script.
    # Check PowerShell version
    $PSVersionTable.PSVersion.Major
    
    # Install Scoop
    Set-ExecutionPolicy RemoteSigned -scope CurrentUser
    iwr -useb get.scoop.sh | iex
  4. Prerequisites for installing Nugget dynamic wallpapers

    Before running the Nugget tool to install dynamic wallpapers, ensure the following steps are completed:

    1. Disable the 'Find My iPhone' feature in the account settings (this can be re-enabled after installation).
    2. Install the necessary drivers. If not already present, install 'iMazing' or '3uTools' (爱思助手) to provide the required connection drivers for the iPhone.
  5. Monitor variables with Watches and Inline Debugging

    To track specific variables or expressions across different stack frames, use the Watches panel. Add an expression (e.g., "Current User: " + user.getName()) via the plus icon in the Watches tab to see its value updated in real-time regardless of the current line of execution. Additionally, IntelliJ IDEA provides Inline Debugging, which displays variable values in grey text directly next to the code lines. This can be toggled using the 'Show Values Inline' button in the toolbar.
  6. Install interactive dynamic wallpapers on iPhone using Nugget

    Interactive dynamic wallpapers can be installed on iPhone using the open-source tool Nugget. The process requires a computer and a USB connection to the device. The tool supports importing wallpaper files with the .tendies extension (maximum of 3 files per import). After applying the wallpapers, the iPhone will automatically restart, and the wallpapers will be available in the 'Wallpaper Collection' (壁纸收藏) section of the device settings.
  7. Configure system-wide environment variables

    System-level configurations affect all users on the machine. There are three primary locations depending on the requirement:

    1. /etc/environment: The most basic system environment file. Read by PAM before user login. It uses a simple KEY=value format and does not support scripting.
    2. /etc/profile: Global configuration executed during login shells. Used for system-wide PATH, LANG, and LC_ALL settings. It also loads scripts from /etc/profile.d/.
    3. /etc/profile.d/: A directory containing .sh scripts executed in alphabetical order. This is the recommended place for software packages to add system-wide configurations.
    4. /etc/bash.bashrc (Debian/Ubuntu) or /etc/bashrc (RHEL/CentOS): System-wide Bash configurations executed every time a new Bash shell is opened.
    # Example for /etc/environment
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    LANG="en_US.UTF-8"
  8. Best practices for environment variable configuration

    To maintain a clean and predictable system, follow these principles:

    1. Separation of Concerns: Put system-wide configs in /etc/profile.d/, user-specific tool configs in ~/.bashrc, and basic user path/env settings in ~/.profile.
    2. Append, Don't Overwrite: Never reset the PATH variable (e.g., PATH="/usr/bin"), as this wipes out previous configurations. Always append or prepend.
    3. Avoid Circular Loading: Ensure a clear execution chain (e.g., ~/.profile calling ~/.bashrc) and avoid loading the same file multiple times.
    # ❌ WRONG: Overwrites existing PATH
    PATH="/home/user/bin"
    
    # ✅ CORRECT: Appends to existing PATH
    PATH="$HOME/bin:$PATH"
  9. Display curly braces in Markdown without triggering execution

    When using Markdown (specifically in MDX environments), curly braces {} may be interpreted as code execution. To display them as literal text in the body of a document, use one of the following methods:
    - Use backticks (Code mode): `{ }` (Recommended)
    - Use escape characters: `\{` and `\}`
    - Use HTML entities: `{` for { and `}` for }
    - Use an expression: `{'{}'}` (Tells MDX to render as a string)
  10. Verify website ownership for Algolia DocSearch

    After applying for DocSearch at https://docsearch.algolia.com/, you must verify your website ownership within 7 days. This is done by adding a specific meta tag to the headTags array in your Docusaurus configuration.
    const config: Config = {
      // ... other config
      headTags: [
        {
          tagName: 'meta',
          attributes: {
            name: 'algolia-site-verification',
            content: 'REPLACE_WITH_VALUE_FROM_ALGOLIA',
          },
        },
      ],
    };