style:highlight

This commit is contained in:
dichgrem
2025-12-28 16:47:05 +08:00
parent 8240a2df46
commit 8d959b9c1b
6 changed files with 193 additions and 72 deletions

View File

@@ -1,63 +0,0 @@
+++
title = "乱七八糟:2024年度总结"
date = 2025-01-04
[taxonomies]
tags = ["乱七八糟"]
+++
前言 又是新的一年,时间流速感觉越来越快了。
<!-- more -->
## 大事记
- 六月份暑假将家里大翻新,包括水晶头,吊灯,门锁,水龙头等等;
- 买了新柜子,房间更有序了;
- 和朋友们聚餐;
- 采用Mesh进行家庭组网
- 安装了一盏太阳能路灯,院子里更明亮了;
- 和父母看电影;
- 将博客迁移到新平台用上亚马逊CDN
- 更换域名,不再续费 .ink;
- 使用国家补贴更换电脑,换掉了故障百出的机械革命;
- 办理校园网套餐并注销掉旧的电话卡;
- 买了一台AX3000路由器并刷成openwrt绕过校园网检测
- 开了azure虚拟机并研究
- 卖掉了chromebook
- 配置了Qemu虚拟机
- 给父母加装了流量包;
- 更换了鼠标,并买了显示器和沙发椅;
- 家里更换新热水器;
- 修理亲戚家的网络问题;
- 在学校和家里两处配备常用药箱;
- 将所有设备更换为typec接口
- 整理并精简了RSS订阅源
- 重构了书签结构,增加用途分类;
- 用上了Android 15并使用多种开源软件
- 研究不同的root方案并完美隐藏环境
- 自制养生茶,咖啡和燕麦粥;
- 养成跑步习惯;
- 使用Deepl api进行翻译学习
- 看Netflix并研究浏览器环境检测
- 搭建Syncthing同步服务器实现三端同步
- 定时备份重要数据;
- 学习英语纪录片,每天背单词;
## 成长与反思
- 谋定而后动,不要冲动消费;
- 实践出真知,不要轻易下定论;
- 适合自己的才是最好的;
- 锻炼自身,早点睡觉,饮食规律是最好的养生;
## 新的一年的目标
- 在各大SRC平台挖点漏洞
- 封装一个完美的windows系统用于对外使用
- 研究并总结各大代理技术;
- 重构家庭数据中心;
- 学习一门新的语言并熟悉一种业务;
- 控制体重并研究低成本健身;

View File

@@ -315,5 +315,23 @@ git reset --soft HEAD~1
git reset --hard HEAD~1 git reset --hard HEAD~1
``` ```
### 教学复习
```
0. 如何配置Git
1. 为什么Git协作的时候往往是fork别人的仓库能不能直接在原仓库里面修改
2. fork完如何修改并提交更改
3. git clone 的 http 链接和 git 链接有什么不同?
4. 如何将修改合并到原仓库?
5. 如何合并发PR
6. 如何查看状态和日志
```
--- ---
**Done.** **Done.**

124
content/about-github.md Normal file
View File

@@ -0,0 +1,124 @@
+++
title = "乱七八糟:Github的使用"
date = 2025-08-24
[taxonomies]
tags = ["乱七八糟"]
+++
前言 对于GitHub相信我们都不陌生。本文介绍GitHub上许多好用的服务和资源。
<!-- more -->
## Github Gist
GitHub Gist 是 GitHub 提供的代码片段服务,用来``存放单个或少量文件的代码/文本``(如示例代码、配置片段、日志、临时笔记等)。
官方说明是
```
Instantly share code, notes, and snippets.
```
和 repo 相同的是gist 也分为``public``和``private``
我们可以从一个简单的书签同步服务来实践:
1. 创建一个gist权限为 private; 随后可以看到类似``Dichgrem / gist:37f2ebad89923d49d8854c368d7f5c91``gist后面这一串就是GistID
2. 在这个[界面](https://github.com/settings/tokens)创建一个token选择开启gist权限
3. 安装这个书签同步[浏览器扩展](https://www.github.com/dudor/BookmarkHub)
3. 将tokens 和 前面的 GistID 复制到这个浏览器扩展中;
4. 随后可以使用这个插件进行书签同步。
> 原理使用浏览器api提取出书签向 gist 仓库进行上传gist仓库验证 tokens 后保存,在另一个浏览器中用同样的插件进行下载,即可同步.
## GitHub Pages
GitHub Pages 是 GitHub 提供的静态托管服务,常常用于快速部署纯前端网站。
比如你有一个 Vue 写的网站仓库,在该仓库的``设置-Build and deployment``下选择source选择分支并将public目录部署到GitHub Pages随后会得到一个类似dichgrem.github.io 的域名,即可看到网站。
当然你也可以绑定自己的域名在custom dommain下添加并在你的dns解析处添加对应的CNAME记录。
> 具体流程可以参考Hexo的[文档](https://hexo.io/zh-cn/docs/github-pages)
> GitHub Pages 的限制
- 不能运行后端代码
- 站点大小有限制
- 构建和发布有时间限制
- 私有仓库 Pages 需要付费计划
## Github actions
GitHub Actions 是 GitHub 提供的 CI/CD 与自动化平台,用于``在代码仓库中自动执行任务,比如测试、构建、发布、部署``等。
听起来有点抽象实际上就是在仓库的这个位置放入一个yml文件 ``.github/workflows/*.yml``,比如
```bash
name: C Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-and-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Show compiler version
run: gcc --version
- name: Build
run: gcc -O2 -Wall -Wextra -std=c11 -o app main.c
- name: Run
run: ./app
```
这个文件的意思就是
- 触发条件push / pull_request / 手动触发
- actions/checkout@v4:拉取仓库代码
- gcc ... main.c将main.c编译成产物 app
- ./app运行确保编译出来的程序能执行
把本地的环境迁移到github的runner中这样做有几个好处
- 统一了编译环境,不用考虑开发成员之间的环境区别;
- 将构建自动化,开发者可以专注于代码,新人也可以快速上手;
- 自动发布到release极大方便了项目管理;
- GitHub Actions提供许多现有的steps类似乐高积木的体验;
> GitHub Actions的限制
- public仓库通常没有限制
- privat仓库为2,000 分钟500 MB
## GitHub Copilot
从11月起GitHub首页增加了AI对话功能调用的就是 [GitHub Copilot](https://github.com/features/copilot)。
GitHub Copilot 是一个 AI 驱动的 智能编码助手,由 GitHub 和 OpenAI 联合开发。可以调用GPT/gemini/Claude等多家模型.
你可以在vscode中下载copilot插件并使用它会给你带来自动补全以及按照上下文生成整段代码的功能.
> 现在copilot已经开源并且在vscode中自带直接登录就可以使用无须手动下载.
> GitHub Copilot的限制
- 免费版本约 2,000 次代码自动完成completions —— 即 Copilot 在 IDE 里根据你的输入生成代码的次数。
- 约 50 次 Copilot Chat 消息 / 会话请求 —— 即和 Copilot Chat 对话或高级问答次数。
---
**Done.**

View File

@@ -34,7 +34,7 @@ tags = ["综合工程"]
```bash ```bash
# gui # gui
paru -S floorp-bin keepassxc qemu-full virt-manager materialgram-bin legcord-bin onlyoffice-bin localsend-bin kazumi-bin foliate vlc krita qtscrcpy strawberry oculante obs-studio paru -S floorp-bin keepassxc qemu-full virt-manager materialgram-bin legcord-bin onlyoffice-bin localsend-bin kazumi-bin foliate vlc krita qtscrcpy strawberry oculante obs-studio scx-manager daed
# tui # tui
@@ -55,7 +55,7 @@ paru -S peazip
# Type # Type
paru -S fcitx5-configtool fcitx5-chinese-addons fcitx5-skin-material fcitx5-im fcitx5-rime paru -S fcitx5-configtool fcitx5-skin-material fcitx5-rime fcitx5-gtk
# Blog # Blog
@@ -63,11 +63,12 @@ paru -S zola npm pnpm just go
# ttf # ttf
paru -S ttf-jetbrains-mono-nerd paru -S ttf-jetbrains-mono-nerd ttf-sarasa-gothic-sc
# Wayland # Wayland
paru -S hyprland waybar wofi network-manager-applet swww wl-gammarelay-rs brightnessctl easyeffects wireplumber pipewire blueman wl-clipboard-rs swaync swayosd swappy grim wlogout hyprlock hyprpolkitagent paru -S hyprland waybar network-manager-applet swww wl-gammarelay-rs brightnessctl easyeffects wireplumber pipewire blueman bluez-utils wl-clipboard-rs wl-clip-persist swaync swayosd swappy grim wlogout hyprlock hyprpolkitagent
``` ```
| 分类 | 软件列表 | | 分类 | 软件列表 |
| ------------ | ------------------------------------------------ | | ------------ | ------------------------------------------------ |
@@ -198,6 +199,47 @@ menuentry "Windows 11 (Manual)" {
chainloader /EFI/Microsoft/Boot/bootmgfw.efi chainloader /EFI/Microsoft/Boot/bootmgfw.efi
} }
``` ```
## 制服华硕VMD
华硕的BIOS有一个VMD选项它的机制是这样的如果你想安linux得先关闭VMD但如果你的windows是出厂自带的没有重装过那又得开启VMD否则无法进入windows这里记录在不关闭VMD的情况下如何让linux支持它(以arch linux为例)
先使用这个命令查看磁盘:
```
> lsblk -f
nvme1n1
├─nvme1n1p1 vfat FAT32 SYSTEM xxxx-xxxx
├─nvme1n1p2 ntfs OS
├─nvme1n1p3 ntfs 新加卷
├─nvme1n1p4 ntfs 新加卷
├─nvme1n1p5 ntfs 新加卷
├─nvme1n1p6 ntfs 新加卷
nvme0n1
├─nvme0n1p1
├─nvme0n1p2 ntfs 新加卷
└─nvme0n1p3 xfs xxxxxxxxxxxxxx
```
随后使用以下方法将VMD支持加入initramfs
```
## 挂载linux根分区
mount /dev/nvme0n1p3 /mnt
## 创建boot目录
mkdir -p /mnt/boot
## 挂载EFI
mkdir -p /mnt/boot/EFI
mount /dev/nvme1n1p1 /mnt/boot/EFI
## Chroot进入已经安装的系统
arch-chroot /mnt
## 重新生成 initramfs
nano /etc/mkinitcpio.conf
MODULES=(vmd nvme)
mkinitcpio -P
## 退出重启
exit
reboot
```
## Arch中安装QEMU虚拟机 ## Arch中安装QEMU虚拟机
前面我们已经安装了Qemu高性能虚拟机平台和virt-manager用来管理虚拟机的图形界面随后配置virt-manager并安装Ubuntu-server 前面我们已经安装了Qemu高性能虚拟机平台和virt-manager用来管理虚拟机的图形界面随后配置virt-manager并安装Ubuntu-server

View File

@@ -76,7 +76,7 @@ Linux有许多不同的发行版但大致可以分为几个系
因此对于Linux而言文件系统是这样的 因此对于Linux而言文件系统是这样的
```shell ```bash
/ — 根 / — 根
/home — 用户家目录 /home — 用户家目录
/root — 超级用户的家 /root — 超级用户的家
@@ -114,7 +114,7 @@ Linux有许多不同的发行版但大致可以分为几个系
在Ubuntu的界面中李华看到了一个名为``终端``的应用,输入``apt install neofetch``,就安装成功...不,暂时还没有成功,再次输入``sudo apt install neofetch``,就成功安装了neofetch这个软件随后我们输入``neofetch``,可以看到系统的一些信息: 在Ubuntu的界面中李华看到了一个名为``终端``的应用,输入``apt install neofetch``,就安装成功...不,暂时还没有成功,再次输入``sudo apt install neofetch``,就成功安装了neofetch这个软件随后我们输入``neofetch``,可以看到系统的一些信息:
```shell ```bash
neofetch neofetch
.-/+oossssoo+/-. dich@uos .-/+oossssoo+/-. dich@uos
`:+ssssssssssssssssss+:` -------- `:+ssssssssssssssssss+:` --------

View File

@@ -130,7 +130,7 @@ bluetoothctl info AA:BB:CC:DD:EE:FF
交互式步骤(在 `bluetoothctl` 提示符下): 交互式步骤(在 `bluetoothctl` 提示符下):
```text ```bash
$ bluetoothctl $ bluetoothctl
[bluetooth]# power on [bluetooth]# power on
[bluetooth]# agent on [bluetooth]# agent on