xzsajo's Knowledge Base
website·Indexed 29 days ago
https://xzsajo-github-io.vercel.appA personal technical blog and wiki covering a wide range of topics including AI deployment (open-webui, GroqCloud, DeepSeek), Model Context Protocol (MCP), RAG, WindTerm troubleshooting, Giffgaff SIM card guides, and Cantonese localization workflows. It also includes documentation for hexo-butterfly-tag-plugins-plus and various technical tutorials.
What's inside xzsajo
- The Chinese Ministry of Finance is implementing a package of targeted incremental policies to combat economic contraction and promote high-quality development. The core strategy involves 'counter-cyclical adjustment,' which in this context means increasing the budget deficit and increasing government borrowing during an economic downturn to stimulate growth.
Structure User Requests for Amazon Image Architecture
To interact with the Amazon Product Image Architect system, users should provide requirements using a specific XML-like structure. This ensures the AI has all necessary context regarding source visuals, exact measurements, and regional marketplace requirements.<user_request> <source_images> [Descriptions of existing images, visual elements, perspectives, and URLs] </source_images> <product_dimensions> [Numerical dimensions (e.g., "Length: 10cm") and units of measurement] </product_dimensions> <target_amazon_region> [Marketplace region, e.g., "US", "DE", "JP"] </target_amazon_region> <additional_branding_guidelines> [Optional: color palettes, fonts, or logo placement] </additional_branding_guidelines> </user_request>System Prompt for Amazon Product Dimension Graphic Architecture
This system prompt transforms an AI into a Senior Product Image Architect specializing in Amazon's global marketplace. The AI analyzes source images, product dimensions, and target regions to generate precise blueprints for product dimension graphics. It does not create images directly but produces two machine-readable JSON outputs: anImageGenerationPromptfor AI image generators (like Midjourney or DALL-E) andImageOptimizationParametersfor post-processing and human refinement to ensure compliance with Amazon's visual and technical standards.I am a world-class AI prompt engineering expert, specializing in optimizing instructions for maximum performance. My core identity is that of a Senior Product Image Architect for Amazon's global marketplace... [Full prompt text provided in the source chunk]Understand the Model Context Protocol (MCP)
The Model Context Protocol (MCP), introduced by Anthropic, is an open standard designed to enable Large Language Models (LLMs), such as Claude, to communicate with external tools and data sources (e.g., file systems, databases, and APIs) in a standardized way. It acts as a universal interface (similar to a 'USB-C port' for AI), allowing developers to integrate tools without writing custom glue code for every individual service, thereby reducing development costs and providing the AI with richer context for more accurate responses.Giffgaff SIM Card Overview for SMS Receiving
Giffgaff is a UK-based MVNO using the O2 network. It is highly suitable for users needing a UK (+44) number for SMS verification (e.g., ChatGPT, Telegram, WhatsApp) because it requires no real-name registration, has no monthly rental fee, and offers free incoming SMS. To keep the number active, a chargeable action (top-up or spend) must be performed every 6 months (180 days).Understand Retrieval-Augmented Generation (RAG)
Retrieval-Augmented Generation (RAG) is a generative model architecture that improves response accuracy and reduces 'hallucinations' by retrieving relevant text from external knowledge bases, document libraries, or databases before generating a response. This retrieved information is provided as supplementary context to the LLM, combining the model's internal training data with up-to-date, specialized external information.Implement ad-blocking in OpenClash using DNSMasq
This shell script can be added to OpenClash custom firewall rules to automatically pull ad-blocking rules for DNSMasq and update GitHub520 acceleration hosts. It cleans existing config files, downloads the latest rules, and restarts the DNSMasq service to apply changes.#!/bin/sh /usr/share/openclash/log.sh /lib/functions.sh # Delete existing AdBlock DNSMasq rule files rm /tmp/dnsmasq.d/anti-ad-for-dnsmasq.conf rm /tmp/dnsmasq.d/adblockdnsmasq.txt # Pull AdBlock DNSMasq filtering rules LOG_OUT "拉取 AdBlock DNSMasq 广告过滤规则…" curl -s https://raw.githubusercontent.com/Aethersailor/adblockfilters/main/rules/adblockdnsmasq.txt -o /tmp/dnsmasq.d/adblockdnsmasq.txt # Pull GitHub520 acceleration rules LOG_OUT "拉取 GitHub520 加速规则…" sed -i '/# GitHub520 Host Start/,/# GitHub520 Host End/d' /etc/hosts curl https://raw.hellogithub.com/hosts >> /etc/hosts sed -i '/^$/d' /etc/hosts sed -i '/!/d' /etc/hosts # Clear DNS cache and restart DNSMasq LOG_OUT "清理 DNS 缓存…" /etc/init.d/dnsmasq restart /etc/init.d/dnsmasq reload /etc/init.d/dnsmasq restart exit 0Modify files in a read-only OverlayFS (OpenWrt/ImmortalWrt)
In systems using OverlayFS (like OpenWrt with SquashFS), the root directory/is read-only. To delete or modify files in read-only directories like/etc/, you must operate on the upper writable layer located at/overlay/upper.# Find the real path in the writable layer find /overlay/upper/etc/openclash/ -name GeoIP.dat # Delete the file from the writable layer rm -f /overlay/upper/etc/openclash/GeoIP.dat # Or clear the file content echo "" > /overlay/upper/etc/openclash/GeoIP.datMake international calls with Giffgaff
To make an international call using a Giffgaff SIM, you must have credit on your account, as international calls and texts from the UK are not included in standard plans and are billed on a per-minute basis.
To dial an international number:
- Dial the '+' symbol.
- Enter the country code followed by the area code (omit the first '0' of the area code).
- Enter the remaining phone number.
Enable Giffgaff Wi-Fi Calling to reduce roaming costs
Wi-Fi Calling allows users to make calls and send texts over a Wi-Fi connection when cellular signal is poor. For Giffgaff users, this feature treats the connection as if the user is in the UK, significantly reducing costs compared to international roaming rates.
Cost Comparison:
- Wi-Fi Calling (UK Rates): SMS at £0.08/message; Calls at £0.03/minute.
- International Roaming: SMS at £0.30/message; Calls at £1.00/minute.
Requirements:
- Device Compatibility: The device must be on Giffgaff's official compatibility list. Android users (specifically Xiaomi) generally require a device with a Google-native system and a Qualcomm chip; MediaTek (MTK) chips may not be supported.
- iOS Version: iOS 17.4 or higher is recommended.
- Network: A UK-based IP address via a global proxy (VPN) is required to trigger the UK-based service.
Step-by-step Activation (iOS): 1. Set proxy to UK IP and enable 'Global Routing' (e.g., using Shadowrocket). 2. Enable 'Airplane Mode' on the phone. 3. Enable the Giffgaff SIM and toggle 'Wi-Fi Calling' to ON in settings. 4. Verify activation: Swipe down the home screen; the carrier should display as 'Giffgaff'.Maintain Giffgaff account activity to prevent number recycling
To prevent the phone number from being reclaimed, Giffgaff requires a credit balance change every 180 days. The most cost-effective way to maintain the account is to send one SMS (costing approximately £0.30). A top-up also counts as a balance change. Giffgaff sends reminder emails 35 days and 5 days before the expiration of the 180-day window.Recommended maintenance action: Send an SMS to a UK or international number. Reliable UK customer service number for testing: +44 797 300 0186Perform basic Giffgaff SIM operations via USSD and SMS
Giffgaff provides several free services to check account status and manage settings directly from the phone dialer or via SMS.- Retrieve your phone number: Send the text 'NUMBER' to 2020 or 43430. You will receive an SMS with your number within 30 seconds to 2 minutes. - Check credit balance: Dial *100# and press call. - Disable voicemail/call forwarding: Dial ##002# and press call (prevents charges from missed calls being diverted to voicemail). - Default PIN: 5555