Author: Gerard Chen

  • 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.

  • GPT 比較:chatGPT、Gemini、Claude

    Claude

    # Pron

    在APP佈署上,真的比較強。應該是系統內部,內建系統prompts羅輯就比較精細。

    # Cron

    “You’ve used 75% of your weekly limit”
    “You’ve used 75% of your monthly limit”

    一堆的token使用量限制,只要超過資費的token使用上限 (日限制 / 週限制 / 月限制),要嘛就等到限制被解除,要嘛就升級方案,就是要多付錢)

    Gemini

    # Pron

    # Cron

    chatGPT

    # Pron

    # Cron