xyspg Personal Website

website·Indexed 32 days ago

https://xyspg.moe

A personal site featuring a blog with guides on US credit cards for F1 students, technical tutorials such as adding Giscus comments to Docusaurus, and a portfolio of projects including manodict.

Tokens
4.4K
Snippets
8
Records
29
Agent score
59%

What's inside xyspg

  1. Understand ChatGPT Plus subscription benefits and limitations

    ChatGPT Plus is a subscription service costing $20/month. Key benefits include priority access during peak times, faster response times, and early access to new features.

    Crucially, subscribing to ChatGPT Plus does NOT provide additional OpenAI API credits; the free credit limit remains the same as for free users ($18).

  2. Architecture of the ELP Project List website

    The ELP Project List website was developed to replace Baidu Netdisk sharing for displaying course details. It features a search and filter system for project categories, locations, pricing, and accommodation requirements.

    Key technical choices include:

    • Framework: Next.js (React-based) for Server-Side Rendering (SSR) to improve loading performance and enable smooth client-side navigation.
    • Database: Supabase (PostgreSQL) for data consistency, scalability, and a graphical editor that allows non-technical staff (teachers) to modify content and manage files.
    • Internationalization: Next.js i18n and SSR are used to provide seamless switching between Chinese and English versions without full page reloads.
    # Website URL
    https://elp.bdfz.app
  3. Implement real-time command distribution using Socket.IO

    To create a real-time game where players receive randomly assigned instructions, use Socket.IO's event-driven architecture. The server handles game start and refresh events, shuffling the command list and emitting the assignments to all connected clients. The client listens for these events to update the UI with the specific command assigned to the current user.
    // Server Side: Handle game start and refresh
    socket.on('start_game', (username) => {
        if (socket.isAdmin) {
          userCommands = assignCommands(users, commands);
          io.emit('game_started', userCommands);
          io.emit('command_list_update', userCommands);
        }
    });
    
    socket.on('refresh', (username) => {
        if (socket.isAdmin) {
          userCommands = assignCommands(users, commands);
          io.emit('commands_refreshed', userCommands);
          io.emit('command_list_update', userCommands);
        }
    });
    
    // Client Side: Update UI based on assigned command
    socket.on("game_started", userCommands => {
      const command = userCommands[username];
      document.querySelector("#command").textContent = `${command}`;
    });
    
    socket.on("commands_refreshed", userCommands => {
      const command = userCommands[username];
      document.querySelector("#command").textContent = `${command}`;
    });
  4. Implement a RAG-based document search tool using Embeddings and OpenAI

    To create a specialized AI search tool (like BDFZ AI) that handles documents exceeding the token limits of LLMs (e.g., ChatGPT's 4096 token limit), use a Retrieval-Augmented Generation (RAG) architecture.

    Workflow:

    1. Vectorization: Use Embeddings technology to convert large volumes of documents and user queries into numerical vectors (floating-point numbers).
    2. Semantic Retrieval: Perform a similarity search in the vector space to find the most relevant document sections based on semantic meaning rather than exact keyword matching.
    3. Generation: Pass the retrieved relevant snippets as context to the OpenAI Chat Completion API to generate a natural language response.

    This approach allows the AI to provide specific advice, summarize complex course handbooks, and answer questions based on a private dataset without hitting token limits.

    User Query -> Embedding Vector -> Vector Similarity Search -> Relevant Document Snippets -> OpenAI Chat Completion API -> Final Answer
  5. Apply for your first Chase card at a physical branch

    For the first credit card application, visiting a physical Chase branch is recommended to avoid identity verification issues. A banker can help verify identity over the phone to facilitate instant approval. After the first card is approved, it is recommended to wait at least three months before applying for the next card.
  6. Obtain Giscus configuration parameters

    Visit the Giscus official website and enter your repository address. Configure the 'Discussion Category' (e.g., 'Announcements') and other preferences. Giscus will provide a configuration snippet containing the following required IDs:

    • data-repo: Your repository name (user/repo).
    • data-repo-id: The unique ID of your repository.
    • data-category: The discussion category name.
    • data-category-id: The unique ID of the category.
  7. System requirements for a digitalized Instruction Game

    To transition a physical card-based game to a digital system and improve UX (reducing reset wait times), the following technical requirements are necessary:

    • Real-time bi-directional communication between server and clients.
    • Role-based access control (Administrator vs. Player).
    • Real-time online user tracking.
    • Random assignment logic for instructions/cards.
    • Admin-triggered game start and reset mechanisms.
    • User authentication (e.g., real-name system or whitelist).
    • Network resilience (automatic reconnection and disconnection alerts).
  8. Maximize Bank of America (BoA) benefits for F1 students

    To optimize the start of a credit history and earn rewards at Bank of America:

    1. Open a Checking Account in person: This often triggers sign-up bonuses that might otherwise require Resident Alien (RA) status for online applications.
    2. Apply for BoA Customized Cash Rewards: This is recommended as a primary starter card for those with zero credit history.
    3. Achieve Preferred Rewards Gold Status: Inform the banker of plans to deposit >$20,000. Wiring this amount can grant Gold Tier status for one year, providing cashback bonuses.
    4. Funding: Wire funds from China after opening the checking account but before applying for the credit card to increase approval chances.
  9. Choose the right Chase credit card based on credit history

    The probability of approval for Chase cards depends on your credit history length and the amount of deposits ('bricks') in your account:

    • High Deposits / Significant Funds: High probability of approval for Chase Sapphire Preferred (CSP) or Chase Sapphire Reserve (CSR). CSR is a Visa Infinite card with a $10,000 floor limit.
    • Short Credit History / Low Deposits: Recommended to start with the Chase Freedom Flex (CFF). CSP is more accessible than CSR as it is a Visa Signature card with a $5,000 floor limit.
    • Comparison of CFF vs CFU: The Freedom Flex (CFF) is generally preferred over the Freedom Unlimited (CFU) because it offers better bonus categories and free cell phone protection, whereas the CFU's primary advantage is a 1.5x catch-all rate that is redundant if you already have a Sapphire card.
  10. Create a Giscus React component for Docusaurus

    Install the @giscus/react package and create a wrapper component that integrates with Docusaurus's color mode to ensure the comment section matches the site theme.
    npm i @giscus/react
    // src/components/GiscusComponent.js
    import React from "react";
    import Giscus from "@giscus/react";
    import { useColorMode } from "@docusaurus/theme-common";
    
    export default function GiscusComponent() {
      const { colorMode } = useColorMode();
    
      return (
        <Giscus
          repo="your-name/your-repo" // Enter your repo here
          repoId="your-repo-id" // Your repo id
          category="Announcements" // Your category
          categoryId="your-category-id" // Your category id
          mapping="pathname"
          term="Welcome to @giscus/react component!"
          strict="0"
          reactionsEnabled="1"
          emitMetadata="1"
          inputPosition="top"
          theme={colorMode}
          lang="zh-CN"
          loading="lazy"
          crossorigin="anonymous"
          async
        />
      );
    }
  11. Timeline for F1 students to establish US banking and credit

    F1 students without a Social Security Number (SSN) can follow this strategic timeline to build credit and maximize banking bonuses:

    • Day -300 (Application Season): Prepare resumes for on-campus jobs (e.g., Office Assistant, IT Desk Support) to obtain an SSN as quickly as possible.
    • Day -300 to -100: Open a US checking account remotely. East West Bank's Global Student Account allows opening with a Chinese passport and F1 visa, which is useful for paying rent and providing bank statements for apartment applications.
    • Day -100 to -14: Book flights and schedule an appointment with Bank of America (BoA) to open checking/savings accounts and apply for the BoA Customized Cash Rewards card. This is one of the fastest ways to start a North American credit history.
    • Day -14 to Day 0: Set up a US SIM card (MVNOs are recommended over major carriers). Book a Chase appointment (available 14 days in advance) to open a checking and savings account.
    • Day 0 to SSN: Arrive in the US and aggressively seek on-campus employment to secure an SSN.