JerryYan0912's recent timeline updates
JerryYan0912

JerryYan0912

V2EX member #451796, joined on 2019-11-08 09:34:02 +08:00
Today's activity rank 7394
  •   The specified image does not exist
    JerryYan0912's recent replies
    微乎其微了。除了超简单的修改(例如改个配置,true/false 之类的默认值),否则都是一句话让 AI 干。
    倒可以试试 [tmux-watch]( https://github.com/q792602257/tmux-watch) ,别人写的,我 fork 做了一些修改,配合 tmux ,检测终端是否“稳定”,如果“稳定”了则通知会话,让 OpenClaw 进一步做检查或处理
    Sep 21, 2022
    Replied to a topic by idragonet › NGINX › 请教:希望全部 jpg 301 到另外一个域名
    @q792602257 顺便那个 .(jpg|jpeg)建议改成\.(jpg|jpeg)$ (以.jpg 或者.jpeg 结尾的请求),以避免奇怪的 uri 匹配到了这里
    Sep 21, 2022
    Replied to a topic by idragonet › NGINX › 请教:希望全部 jpg 301 到另外一个域名
    其实时你$1 引用的内容不对,在 location 中你用括号匹配了 jpg|jpeg ,导致$1 变量设置成了匹配到的值( jpg 或者 jpeg ),这里根据你的需求,可以用 https://cdn1.b.com.cn$request_uri;

    修改后的配置:
    ```
    location ~* .(jpg|jpeg) {
    return 301 https://cdn1.b.com.cn$request_uri;
    }
    ```
    如果是转播的话,可以考虑在转播端缓存 3 分钟视频,在推流端断开后,直接继续使用缓存的 3 分钟视频进行循环推流,恢复时切换回来即可
    Jan 12, 2022
    Replied to a topic by Tinywan › PHP › 2022 PHPer 路在何方?
    可以多学几门,然后专精一门
    这样的话,如果想转其他的语言,也有一定的基础
    仅供参考
    ```php
    /**
    * @var string[] 必须是能作为数组键的值
    */
    $arr = array("a", "b", "c", "d", "e");
    $newArr = array();
    // 引用新的数组
    $newArrPointer = &$newArr;
    while (sizeof($arr) > 0) {
    // 移出第一个元素,作为键名
    $key = array_shift($arr);
    // 对上一个引用,做修改操作
    $newArrPointer[$key] = array();
    // 重新引用新的数组
    $newArrPointer = &$newArrPointer[$key];
    }
    // 如果需要赋值,在这里赋值
    $newArrPointer = 777;
    // 释放引用
    unset($newArrPointer);
    print_r($newArr);
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1381 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 18ms · UTC 20:14 · PVG 04:14 · LAX 12:14 · JFK 15:14
    ♥ Do have faith in what you're doing.