面条实验室

  1. 推荐一下 Cloudflare Workflows , 一个很棒👍的 AI Agent 运行平台可以分步运行长任务,每一步可以看输出结果

    推荐一下 Cloudflare Workflows , 一个很棒👍的 AI Agent 运行平台

    可以分步运行长任务,每一步可以看输出结果。如果某一步失败了,可以自动等待后重试。 步与步直接可以设置睡眠时间,防止下游 API 限流。定时任务和队列任务,存储啥的直接在 Cloudflare Workers 绑定就行。如果某个历史任务失败了,还可以在控制台手动触发。

    唯一的缺点就是 Cloudflare Workers 的 Edge Runtime 不支持部分 Node 特性。

    Hacker News 中文播报使用了 Next.JS 15 (Opennext) 和 Cloudflare Workflows ,在 OpenNext 内集成了 Workflow 部署,可以作为 Template 快速起一个类似项目

    https://github.com/ccbikai/hacker-news

    • 👍4
    • ❤️1
  2. 找了一晚上精简版 React Audio Player ,最后发现一个宝藏播放器主题项目 Player Style专注于为各种播放器提供统一的主题,不绑定框架和播放器

    找了一晚上精简版 React Audio Player ,最后发现一个宝藏播放器主题项目 Player Style

    专注于为各种播放器提供统一的主题,不绑定框架和播放器。

    但是支持一堆播放器和框架。开发者可以随机组合,定制自己的播放器。

    https://index.html.zone/dev/player-style

  3. 最近腾讯云 SDK 包体大小的问题闹的沸沸扬扬推荐一个 #工具 pkg-size ,可以不安装 NPM 包,在浏览器内直接查看 NPM 包安装后占用的磁盘大小还可以生成 Badge ,方便你在 README 引用

    最近腾讯云 SDK 包体大小的问题闹的沸沸扬扬

    推荐一个 #工具 pkg-size ,可以不安装 NPM 包,在浏览器内直接查看 NPM 包安装后占用的磁盘大小

    还可以生成 Badge ,方便你在 README 引用

    https://404.li/pkg-size

  4. 分享一个 #开源 工具 lume可以在 Apple Silicon 上以接近原生的性能创建、运行和管理 macOS 及 Linux 虚拟机

    分享一个 #开源 工具 lume

    可以在 Apple Silicon 上以接近原生的性能创建、运行和管理 macOS 及 Linux 虚拟机。

    使用方式和 ollama / docker 很像,比如运行一个 macOS 虚拟机只需要一个命令行。

    唯一的遗憾是镜像太少,目前都还没有 debian 镜像

    https://index.html.zone/dev/lume

  5. 已经看到两位朋友使用单字符域名做商业短链接了

    已经看到两位朋友使用单字符域名做商业短链接了

    https://T.IMhttps://S.EE , 大家感觉哪个更好呢? T.im - The Shortest URL Shortener - T.im

  6. 使用 Axiom 给 Traefik 的 accesslog 搞了个大盘记录下过程:1、升级 Traefik 版本到 3.2.0 以上,才可以支持 accesslog 的 otlp 插件

    使用 Axiom 给 Traefik 的 accesslog 搞了个大盘

    记录下过程:

    1、升级 Traefik 版本到 3.2.0 以上,才可以支持 accesslog 的 otlp 插件。
    a. Dokploy 的 Traefik 默认是 3.1.2,需要修改安装脚本升级到 3.2.0 以上。

    2、在 Axiom 创建两个 Dataset: dokploy-log 和 dokploy-trace , 并创建 API Key。

    3、修改 Traefik 配置文件 `/etc/dokploy/traefik/traefik.yml`:

    experimental:
      otlpLogs: true
    
    accesslog:
      otlp:
        http:
          endpoint: https://api.axiom.co
          headers:
            authorization: Bearer xaat-miantiao-replace-me
            x-axiom-dataset: dokploy-log
          tls:
            insecureSkipVerify: true
    
    tracing:
      otlp:
        http:
          endpoint: https://api.axiom.co
          headers:
            authorization: Bearer xaat-miantiao-replace-me
            x-axiom-dataset: dokploy-trace
          tls:
            insecureSkipVerify: true


    4、如果使用了 Cloudlfare 代理, 给 websecure 和 web 下面增加配置,可以识别真实 IP。

    forwardedHeaders:
      trustedIPs:
        # Cloudflare
        - "173.245.48.0/20"
        - "103.21.244.0/22"
        - "103.22.200.0/22"
        - "103.31.4.0/22"
        - "141.101.64.0/18"
        - "108.162.192.0/18"
        - "190.93.240.0/20"
        - "188.114.96.0/20"
        - "197.234.240.0/22"
        - "198.41.128.0/17"
        - "162.158.0.0/15"
        - "104.16.0.0/13"
        - "104.24.0.0/14"
        - "172.64.0.0/13"
        - "131.0.72.0/22"
        - "2400:cb00::/32"
        - "2606:4700::/32"
        - "2803:f800::/32"
        - "2405:b500::/32"
        - "2405:8100::/32"
        - "2a06:98c0::/29"
        - "2c0f:f248::/32"


    5、重启 Traefik 后在 Axiom 就可以看见实时日志,Trace 的大盘 Axiom 集成了,Log 的需要我们自己创建,由于无法导出现有大盘,需要使用下面的语句手动配置:

    # Request
    ['dokploy-log']
    | summarize count() by bin_auto(_time), ['attributes.RequestHost']
    | limit 20
    
    # Duration
    ['dokploy-log']
    | summarize stdev(['attributes.Duration']) by bin_auto(_time), ['attributes.RequestHost']
    | limit 20
    
    # Host
    ['dokploy-log']
    | summarize count() by bin_auto(_time), ['attributes.RequestHost']
    | limit 20
    
    # StatusCode
    ['dokploy-log']
    | summarize count() by bin_auto(_time), ['attributes.DownstreamStatus']
    | limit 20
    
    # Method IP 同上
    
    # Path
    ['dokploy-log']
    | summarize count() by bin_auto(_time), ['attributes.RequestHost'], ['attributes.RequestPath']
    | order by ['count_'] desc
    | limit 20
    
    # 404
    ['dokploy-log']
    | where ['attributes.DownstreamStatus'] == 404
    | summarize count() by bin_auto(_time), ['attributes.RequestHost'], ['attributes.RequestPath']
    | order by ['count_'] desc
    | limit 20
    
    # 50x
    ['dokploy-log']
    | where ['attributes.DownstreamStatus'] >= 500
    | summarize count() by bin_auto(_time), ['attributes.RequestHost'], ['attributes.RequestPath']
    | order by ['count_'] desc
    | limit 20
    
    # Live
    ['dokploy-log']

1px