Deploy Hexo with NexT Theme

Requirements: Git and Node.js. ...

2024-04-13 · 1 分钟 · 42 字 · Carinnan

通过 Docker 用自己的 API 搭建 ChatGPT-Next-Web

这两天买了个 ChatGPT API,又去注册了 Google Gemini。终于可以放心使用 GPT-4 了,于是决定自己搭一个前端。以下是简单记录。 ...

2024-04-13 · 1 分钟 · 440 字 · Carinnan

通过代理进行 Git 推送

出于众所周知的原因,我们经常需要通过代理连接到 github.com。 我们已经很熟悉在浏览器中使用代理,但在 Linux 命令行中,有时并不那么顺利。 ...

2024-01-25 · 1 分钟 · 376 字 · Carinnan

Install WordPress using Docker

Using Images Provided by Bitnami Since the WordPress deployment package described here is no longer available, I am trying the Docker image still provided by Bitnami. Don’t ask why—it’s just a habit. Install Docker Engine and Docker Compose first. Refer to the official Docker manual. ...

2023-12-23 · 2 分钟 · 284 字 · Carinnan

使用 Cloudflare API 实现动态 DNS

在 ChatGPT 的帮助下,我写了以下脚本: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 #!/usr/bin/env bash # 设置 Cloudflare API 密钥、电子邮件地址和区域 ID api_key="" email="" zone_identifier="" record_identifier="" # 设置要更新的 DNS 记录 record_name="aaa.example.com" proxied=false record_type="AAAA" comment="IPv6 update" # 以 IPv6 为例 ipv6_address="" curl --request PUT \ --url "https://api.cloudflare.com/client/v4/zones/${zone_identifier}/dns_records/${record_identifier}" \ --header 'Content-Type: application/json' \ --header "X-Auth-Email: ${email}" \ --header "X-Auth-Key: ${api_key}" \ --data "{ \"content\": \"${ipv6_address}\", \"name\": \"${record_name}\", \"proxied\": ${proxied}, \"type\": \"${record_type}\", \"comment\": \"${comment}\" }" 其中的空项大都可以在登录 Cloudflare 后查询到。需要注意的是,record_identifier 也需要通过 API 获取: ...

2023-11-30 · 1 分钟 · 290 字 · Carinnan

Nginx Reverse Proxy Configuration Notes

将 yoursite.com 域名下的所有路径反向代理到 localhost:8080: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 server { root /var/www/html; server_name yoursite.com; location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; } # SSL settings } 将根路径代理到 localhost:8080,并将 /web02/ 代理到 localhost:18080: ...

2023-11-01 · 1 分钟 · 173 字 · Carinnan

Some Notes

Photo Recovery I used TestDisk and PhotoRec to recover photos from an SDXC card, and they worked perfectly. Nginx Alias Change the base URL in Nginx as follows: 1 2 3 4 location /01/ { alias /var/www/01/; index index-01.html; } Mount an ISO File 1 2 sudo modprobe loop sudo mount ./something.iso ./mnt Jellyfin ACL 1 2 sudo setfacl -m u:jellyfin:rx /home/user sudo setfacl -x u:jellyfin /home/user

2023-10-30 · 1 分钟 · 67 字 · Carinnan

在 Linux Bash 中使用 HTTP 代理

经常需要在 Linux 命令行中使用代理,大致操作如下。 编辑 /home/user/.bashrc,在其中添加: ...

2023-10-28 · 1 分钟 · 130 字 · Carinnan

Basic Usage of the NTP Service

I recently installed openSUSE on my ThinkPad X1 Tablet for daily use. By the way, Windows runs terribly on it. I noticed that the system time was incorrect, so I tried to fix it by installing the NTP service and running a manual synchronization. ...

2023-09-19 · 1 分钟 · 96 字 · Carinnan

喜报:本站升级为 Hugo 站

那么简记一下配置过程吧。 不论如何,请首先参阅 官方文档。 我的配置思路是: Run Nginx on the server and set the web root to a directory such as /var/www/blog/. Install Hugo locally. Install rsync on both the local machine and the server. Hugo 生成静态文件后,通过 rsync 将本地 public/ 目录中的文件同步到服务器的 /var/www/blog/,即可完成网站部署。使用 SSH 的 rsync 命令如下: ...

2023-09-17 · 2 分钟 · 625 字 · Carinnan