Author: Gerard Chen

  • 開放學術中繼資料 API 指南:PubMed、Crossref、OpenAlex 及其他

    如果你想在學術文獻之上建立任何應用——搜尋、RAG、引用關係圖、資料擴充(enrichment)流程——就會需要了解有哪些免費、開放資料的 API 可用。以下是主要幾個的導覽,它們都提供免費 API,且中繼資料(metadata)大多採用 CC0 或公有領域授權。

    三大主力

    • PubMed(NLM/NCBI)——生物醫學領域的權威。提供人工編目的 MeSH 詞彙、出版類型,以及 PMC 全文連結。在臨床與生命科學查詢上有無可比擬的召回率與精確度。透過 E-utilities API 存取。
    • Crossref——DOI 的官方登錄中心。收錄由出版商提交的中繼資料:參考文獻、資助資訊、授權條款。是解析「這個 DOI 是什麼?」的權威來源。提供乾淨的 REST/JSON API。
    • OpenAlex(OurResearch)——涵蓋面最廣的匯整平台(超過 2.5 億筆作品)。將作品、作者、機構、主題與來源連結成一張關係圖。採 CC0 授權,並提供免費的完整資料快照(bulk snapshot)。是已停止服務的 Microsoft Academic Graph 的精神繼承者。

    其他免費/開放服務

    • Semantic Scholar(Allen Institute)——跨所有領域、超過 2 億筆論文。具備 AI 擷取的引用關係、TLDR 摘要,以及 SPECTER 向量嵌入。是 OpenAlex 最強的替代方案,若你在做 ML/RAG 尤其好用。
    • DataCite——為資料集、軟體與樣本提供 DOI:等同於 Crossref 的「非論文」版本。
    • Europe PMC(EMBL-EBI)——與 PubMed 同為生物醫學,但範圍更廣(預印本、專利、全文探勘),且 REST API 更好用。
    • Unpaywall(OurResearch)——提供任一 DOI 的開放取用(OA)狀態與合法全文連結。
    • CORE——匯整自各機構典藏庫、超過 3 億筆的開放取用全文。
    • arXiv/bioRxiv/medRxiv——直接來自源頭的預印本。
    • DOAJ——開放取用期刊與論文的目錄與中繼資料。
    • OpenCitations——開放的引用關係圖(CC0)。
    • ORCID——作者識別碼及其作品(作者層)。
    • ROR——研究機構識別碼(機構層)。

    建議的免費技術組合

    • 骨幹:OpenAlex(廣度+關係圖+完整快照),以及/或 Semantic Scholar(可加上向量嵌入供搜尋/RAG)。
    • 權威中繼資料/DOI 解析:Crossref。
    • 生物醫學精確度:PubMed 或 Europe PMC。
    • 開放取用+全文:Unpaywall(狀態)+ CORE(全文)。
    • 非論文類產出:DataCite。
    • 識別層:ORCID(作者)+ ROR(機構)。

    所有資料都能透過 DOI(PubMed 再加上 PMID)乾淨地串接,因此你可以層層疊加這些服務,而不必為資料對齊(reconciliation)傷腦筋。

  • WireGuard wg0 Not Starting After Reboot on Ubuntu



    If you’re using WireGuard on Ubuntu and notice that your wg0 interface
    does not start automatically after reboot, you’re not alone. This is a common issue—and fortunately, an easy one to fix.



    🚨 Problem



    After rebooting your Ubuntu system, the WireGuard interface wg0 is down,
    even though it worked perfectly before restarting.



    🤔 Why This Happens



    When you manually start WireGuard using:



    sudo wg-quick up wg0



    it only activates the VPN for the current session. It does not persist across reboots
    because the service has not been enabled in systemd.



    ✅ Solution: Enable WireGuard Auto-Start



    To ensure WireGuard starts automatically when your system boots, run:



    sudo systemctl enable wg-quick@wg0
    sudo systemctl start wg-quick@wg0



    This registers WireGuard as a system service and ensures wg0 starts at boot.



    🔍 Verify It’s Working


    sudo systemctl status wg-quick@wg0
    ip a show wg0



    If everything is configured correctly, you should see the interface active.



    ⚠️ Common Issues & Fixes



    1. Incorrect Config File Location



    Ensure your configuration file exists at:


    /etc/wireguard/wg0.conf


    2. File Permissions


    sudo chmod 600 /etc/wireguard/wg0.conf


    3. Network Not Ready at Boot



    Sometimes WireGuard starts before the network is fully initialized.
    Fix this by delaying startup:



    sudo systemctl edit wg-quick@wg0


    Add the following:



    [Unit]
    After=network-online.target
    Wants=network-online.target


    sudo systemctl daemon-reexec


    4. DNS Issues



    If you’re using the DNS= option in your config, ensure your system supports it
    (e.g., systemd-resolved or resolvconf).



    📊 Diagram: How WireGuard Startup Works




    ┌───────────────┐
    │ System Boot │
    └──────┬────────┘
    │
    ▼
    ┌──────────────────────┐
    │ systemd initializes │
    └──────┬───────────────┘
    │
    ▼
    ┌──────────────────────────────┐
    │ wg-quick@wg0.service enabled?│
    └──────┬───────────────┬───────┘
    │ YES │ NO
    ▼ ▼
    ┌───────────────┐ ┌──────────────┐
    │ Start wg0 VPN │ │ wg0 stays OFF│
    └───────────────┘ └──────────────┘


    📌 Summary



    • Problem: wg0 not starting after reboot

    • Cause: Service not enabled

    • Fix: systemctl enable wg-quick@wg0



    💡 Final Thoughts



    Enabling WireGuard at boot ensures your VPN connection is always active without manual intervention.
    This is especially important for servers, remote access setups, and privacy-focused configurations.



  • Cyber Zootopia log 首席管理員的「數碼寶貝飼養日記」

    這是一份來自 Cyber Zootopia 首席管理員的「數碼寶貝飼養日記」。

    記錄如何由 0 到 1,召喚並培育數碼寶貝。同時,為了使牠們未來能華麗變身為超級神獸,我同步開闢了專屬的訓練場(Playground)。寄望這些神獸能覺醒「隱藏特性」,代為處理日常生活及工作中的瑣事。究竟這場賽博實驗能進化到什麼程度?就讓我們從這一刻開始,持續觀察記錄下去。

  • mairadb command, basic 101

    # create database
    CREATE DATABASE `databaseName`;
    
    # create user
    CREATE USER 'my_user'@'localhost' IDENTIFIED BY 'your_strong_password';
    
    # grant privileges
    GRANT ALL PRIVILEGES ON my_new_database.* TO 'my_user'@'localhost';
    
    FLUSH PRIVILEGES;
    # in docker
    docker exec -it container_name mariadb -u root -p
    
    # Create the Database
    CREATE DATABASE `dbName`;
    # Create the User (Using '%' so you can connect from outside the container)
    CREATE USER 'userName'@'%' IDENTIFIED BY 'userPassword';
    
    # Grant Permissions
    GRANT ALL PRIVILEGES ON `dbName`.* TO 'dbUser'@'%';
    # Apply changes
    FLUSH PRIVILEGES;
    
    # Exit the prompt
    EXIT;
  • erpNEXT, “Multi-Bench, Multi-Tenant” architecture setting

    Bench Name (Domain)Internal Port Project
    alpha.comalpha.com8000alpha
    beta.combeta.com8001beta
    gamma.comgamma.com8002gamma

    Initialize the Bench

    # Replace 'alpha.com' with your actual domain
    bench init alpha.com --frappe-branch version-15
    cd alpha.com
  • GitLab deploy by using docker yml

    結論

    GitLab真的超吃資源,沒有優化的情況下,要佔用10.9G的RAM。只有自己用,現在RAM的價格,又跟黃金差不多。可能GitLab功能很強,現階段不適用。ChatGPT建議改用Gitea,就來試試看。

  • enlarge docker space

    問題:Your Docker build environment ran out of disk space.

    # 檢查 docker 狀態

    df -h
    docker system df

    # 清理docker 空間

    # Remove all unused data
    docker system prune -a --volumes
    
    # Remove build cache
    docker builder prune -a
    
    # Check again
    df -h
    

    問題:變更docker 位置

    # Stop Docker
    sudo systemctl stop docker
    
    # Edit Docker config
    sudo nano /etc/docker/daemon.json
    # add the following code in daemon.json
    
    {
      "data-root": "/new/docker/path"
    }
    # Create new directory
    sudo mkdir -p /new/docker/path
    
    # Move existing data (optional)
    sudo rsync -aP /var/lib/docker/ /new/docker/path/
    
    # Start Docker
    sudo systemctl start docker
  • Open-Source Workflow/Automation Tools

    Ranked by Popularity

    1. n8n — Very Popular
      • Widely used for general workflow automation with a visual builder.
      • Large community and many integrations.
      • Often ranked #1 in workflow tool lists.
    2. Node-RED — Highly Popular
      • Strong open-source user base, especially for IoT and integration workflows.
      • Long history and strong community.
    3. Apache Airflow — Very Popular (in data/engineering)
      • Dominant in data engineering and complex scheduled pipelines; huge adoption in enterprise data teams.
    4. Activepieces — Fast-Growing
      • Newer but rapidly rising in many “top open-source automation” lists.
      • Growing ecosystem and community interest.
    5. Huginn — Popular Niche Tool
      • Known in self-hosted automation communities for event-based agents.
    6. Windmill — Emerging
      • Increasingly included in open-source automation tool lists; still smaller compared to older players.
    7. Kestra — Growing
      • Gaining attention for scalable orchestration, less mainstream than Airflow but rising.

    Ranked with Brief Comments

    RankToolWhy it’s popular
    1n8nGeneral workflow automation; strong community; visual UI.
    2Node-REDMature, widely used in IoT and integrations; broad ecosystem.
    3Apache AirflowVery popular in data engineering and ETL use cases.
    4ActivepiecesNewer but rapidly adopted; mentioned in many 2025 tool lists.
    5HuginnKnown in privacy-focused and scriptable automation circles.
    6WindmillEmerging workflow tool, gaining traction.
    7KestraGrowing in developer orchestration space.