Wake Me Up When September Ends.

A wanderer capable of grasping the beauty of the grass, with a heart full of ancient charm, and a fondness for playful wit. Those who understand my words are knowledgeable individuals; those who decipher my code truly comprehend the essence. I am a wandering code swordsman, carrying my skills and riding freely through the digital world.

家里一台软路由安装了jellyfin,想把媒体目录挂载到另一台大容量的主机上。所以要将这台大容量的主机上通过Samba共享给软路由主机上,因此需将软路由主机本地文件夹映射到远程大容量的主机Samba共享目录下。

前提Samba安装配置已经在两台主机上配好,这里不再复述!

安装软件包

目前可以通过cifs-utils工具包实现。cifs-utils 是一个用于在 Linux 系统上实现与 Windows 共享文件夹交互的软件包。它提供了一组工具和库,允许 Linux 系统通过 CIFS(Common Internet File System)协议连接和访问远程 Windows 共享。

阅读全文 »

本篇文章记录git一些常见问题解决,不定时更新!

1.You asked to pull from the remote ‘gitea’, but did not specify a branch. Because this is not the default configured remote for your current branch, you must specify a branch on the command line

这个错误提示说明在从远程仓库拉取代码时没有指定分支。由于当前分支不是默认配置的远程分支,所以需要在命令行中指定分支。

要解决这个问题,可以使用以下命令来拉取指定分支的代码:

git pull <remote> <branch>

2.error: RPC 失败。HTTP 413 curl 22 The requested URL returned error: 413 send-pack: unexpected disconnect while reading sideband packet

这个错误提示说明推送包(push package)太大了,超过了服务器所允许的大小限制。

要解决这个问题,有如下操作:

1.增加 Git 中缓存的默认限制:

git config --global http.postBuffer 10240000000

2.服务端是用nginx反向代理的,修改nginx配置:

server {
    // 其他配置省略
    client_max_body_size 500m;
}

3.fatal: 拒绝合并无关的历史

这个错误通常发生在尝试合并两个没有共同历史的分支时。解决这个问题的一种方法是使用–allow-unrelated-histories选项来强制合并。命令如下:

git merge --allow-unrelated-histories <branch_name>

这个命令将允许你合并两个没有共同历史的分支。如果有冲突发生,需要解决冲突并手动提交合并结果。

本篇文章记录php的composer组件包一些用法!

引用本地未发布的包

要引用本地未发布的包,只需要在composer.json中repositories仓库为为本地项目地址即可,如下所示:

{
    "repositories": [
        {
            "type": "path",
            "url": "/path/to/local/package"
        }
    ],
    "require": {
        "your-package": "dev-master"
    }
}
阅读全文 »

时常记不住定时任务一些配置规则,所以这边记录一下!☘

Cron 定时任务是一种在 Unix/Linux 系统中用于执行预定时间间隔的任务的机制。它使用 cron 表达式来定义任务的执行时间。

Cron 表达式由空格分隔的五个字段组成,分别表示分钟、小时、日期、月份和星期几。每个字段可以接受不同的取值范围和特殊字符。

minute   hour   day   month   week   command     顺序:分 时 日 月 周
阅读全文 »