update
This commit is contained in:
parent
fa3d9b0464
commit
fe03c58309
@ -1,7 +1,50 @@
|
||||
## thefuck
|
||||
thefuck 是一个强大的用于纠正命令行指令拼写的工具
|
||||
### 1.安装:
|
||||
```shell
|
||||
sudo apt install python3-dev python3-pip
|
||||
sudo pip3 install thefuck
|
||||
```
|
||||
如果报错不让使用 pip 来安装(如果你上一步成功了就跳过这一段,直接去看下一步):
|
||||
```shell
|
||||
sudo apt install pipx
|
||||
sudo pipx install thefuck
|
||||
```
|
||||
由于 `imp` 模块在 `python3.12` 中已经被移除,此问题在最新版 `thefuck` 中已经被修复,不过使用 `pipx` 安装貌似还是会出现这个问题,所以需要手动换掉 `imp` 模块
|
||||
**更改代码:**
|
||||
```shell
|
||||
vim ~/.local/share/pipx/venvs/thefuck/lib/python3.12/site-packages/thefuck/conf.py
|
||||
```
|
||||
把第一行的 `from imp import load_source` 修改为(*如果你的第一行不是这个就不要继续了,直接跳到第二步*):
|
||||
```python
|
||||
from importlib.machinery import SourceFileLoader
|
||||
|
||||
|
||||
def load_source(module_name, file_path):
|
||||
return SourceFileLoader(module_name, file_path).load_module()
|
||||
```
|
||||
```shell
|
||||
# 和上面做相同的操作
|
||||
vim ~/.local/share/pipx/venvs/thefuck/lib/python3.12/site-packages/thefuck/types.py
|
||||
```
|
||||
### 2.配置
|
||||
```shell
|
||||
# 编辑bashrc配置文件
|
||||
vim ~/.bashrc
|
||||
# 在文件尾加入一行给thefuck取别名fuck
|
||||
eval "$(thefuck --alias fuck)"
|
||||
# 使生效
|
||||
source ~/.bashrc
|
||||
```
|
||||
## nvtop
|
||||
监控 GPU 占用情况,不仅限于 nvida 显卡
|
||||
```shell
|
||||
sudo apt install nvtop
|
||||
nvtop
|
||||
```
|
||||
|
||||
|
||||
## dos2unix && unix2dos
|
||||
## dos2unix && unix2dos
|
||||
转换换行符等字符
|
||||
```shell
|
||||
sudo apt install dos2unix unix2dos
|
||||
dos2unix xxx.xx
|
||||
```
|
@ -0,0 +1,60 @@
|
||||
## 安装 gnome-shell 插件和主题
|
||||
1. 安装软件
|
||||
```shell
|
||||
sudo apt install gnome-tweaks chrome-gnome-shell
|
||||
```
|
||||
2. 安装浏览器插件
|
||||
在任意浏览器扩展商店(Edge需要在 Google 扩展商店)搜索 `GNOME Shell` 并安装 `GNOME Shell 集成`
|
||||
3. 安装插件
|
||||
进入 [extensions.gnome.org](https://extensions.gnome.org/)
|
||||
选择需要的插件安装,这里推荐 `Blur my shell`(让指定位置变透明)和 `user themes`(用于更改图标和安装你喜欢的主题)
|
||||
4. 安装主题
|
||||
进入网站下载主题:
|
||||
`https://www.gnome-look.org/browse/`
|
||||
或
|
||||
`https://www.pling.com/browse?cat=124&ord=latest`
|
||||
下载的文件中一般都有 `install.sh`
|
||||
### WhiteSur 主题
|
||||
我使用的是 `WhiteSur` 主题,仿 `Macos 11 Big Sur`:
|
||||
1. 安装 WhiteSur Gtk Theme
|
||||
```shell
|
||||
git clone https://github.com/vinceliuice/WhiteSur-gtk-theme.git --depth=1
|
||||
cd WhiteSur-gtk-theme
|
||||
./install.sh
|
||||
```
|
||||
2. 安装 WhiteSur icon
|
||||
```shell
|
||||
git clone https://github.com/vinceliuice/WhiteSur-icon-theme.git
|
||||
cd WhiteSur-icon-theme
|
||||
./install.sh -b
|
||||
```
|
||||
3. 安装 WhiteSur cursors
|
||||
```shell
|
||||
git clone https://github.com/vinceliuice/WhiteSur-cursors.git
|
||||
cd WhiteSur-cursors
|
||||
./install.sh
|
||||
```
|
||||
4. 安装 WhiteSur wallpapers
|
||||
```shell
|
||||
git clone https://github.com/vinceliuice/WhiteSur-wallpapers.git
|
||||
cd WhiteSur-wallpapers
|
||||
./install-wallpapers.sh
|
||||
```
|
||||
进入 优化-外观 在样式处找到主题的样式并选择
|
||||
|
||||
## GRUB 引导主题
|
||||
1. 安装主题
|
||||
在 `https://www.pling.com/browse?cat=124&ord=latest` 找到主题
|
||||
大部分主题会有 `install.sh`
|
||||
2. 欣赏主题
|
||||
有些系统默认不会显示 GRUB 引导项选择界面,需要更改配置来显示
|
||||
```shell
|
||||
vim /etc/default/grub
|
||||
```
|
||||
注释 `GRUB_TIMEOUT_STYLE` 配置
|
||||
修改 `GRUB_TIMEOUT` 配置为 10 (这项配置的单位是秒,按需修改)
|
||||
|
||||
## 参考
|
||||
[Ubuntu桌面美化教程,手把手教你。含GRUB引导界面美化。](https://blog.csdn.net/2301_76911706/article/details/133000145)
|
||||
[WhiteSur主题](https://skyao.io/learning-linux-mint/docs/installation/theme/whitesur/)
|
||||
[如何进入linux的grub引导界面](https://blog.csdn.net/yjj350418592/article/details/121759907)
|
@ -0,0 +1,7 @@
|
||||
## venv
|
||||
```shell
|
||||
# Create
|
||||
python3 -m venv myvenv
|
||||
# Activation
|
||||
. myvenv/bin/activate
|
||||
```
|
44
docs/src/03_Linux做主力/PVE.md
Normal file
44
docs/src/03_Linux做主力/PVE.md
Normal file
@ -0,0 +1,44 @@
|
||||
## 装后必做
|
||||
|
||||
1. 更新Debian源
|
||||
```shell
|
||||
sed -i.bak 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
|
||||
```
|
||||
```shell
|
||||
sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
|
||||
```
|
||||
2. 更新PVE软件源
|
||||
|
||||
**删除默认企业源**
|
||||
```shell
|
||||
rm -rf /etc/apt/sources.list.d/pve-enterprise.list
|
||||
```
|
||||
**更换中科大源**
|
||||
```shell
|
||||
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
|
||||
```
|
||||
3. 更新CEPH分布式源
|
||||
```shell
|
||||
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription" > /etc/apt/sources.list.d/ceph.list
|
||||
```
|
||||
```shell
|
||||
sed -i.bak "s#http://download.proxmox.com/debian#https://mirrors.ustc.edu.cn/proxmox/debian#g" /usr/share/perl5/PVE/CLI/pveceph.pm
|
||||
```
|
||||
4. 修复https证书并更新软件源
|
||||
```shell
|
||||
apt update && apt-get install -y apt-transport-https ca-certificates --fix-missing
|
||||
```
|
||||
5. 更新LXC容器仓库员(CT)
|
||||
```shell
|
||||
sed -i.bak "s#http://download.proxmox.com/images#https://mirrors.ustc.edu.cn/proxmox/images#g" /usr/share/perl5/PVE/APLInfo.pm
|
||||
# 重启PVE核心守护进程,稍等下手动刷新webui 页面
|
||||
systemctl restart pvedaemon
|
||||
```
|
||||
7. 删除无效订阅弹窗
|
||||
```shell
|
||||
# 重启pveproxy.service完成后,需注销PVE登录后, 重新启动浏览器
|
||||
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service
|
||||
```
|
||||
|
||||
## 参考
|
||||
[PVE8.3.0折腾记(一)——PVE初次安装后更换国内源](https://blog.csdn.net/weixin_52626278/article/details/144147244)
|
25
docs/src/03_Linux做主力/rsync.md
Normal file
25
docs/src/03_Linux做主力/rsync.md
Normal file
@ -0,0 +1,25 @@
|
||||
## 配置免密传输
|
||||
1. 生成 SSH 密钥对:
|
||||
```shell
|
||||
ssh-keygen -t rsa
|
||||
```
|
||||
2. 复制公钥到远程服务器:
|
||||
```shell
|
||||
ssh-copy-id user@remote
|
||||
```
|
||||
|
||||
## 通过 SSH 传输远程拷贝文件
|
||||
```shell
|
||||
# 从远程拉取文件到本地
|
||||
rsync -av username@remote_host:/源目录/ /本地目录/
|
||||
|
||||
# 从本地推送文件到远程
|
||||
rsync -av /本地目录/ username@remote_host:/远程目录/
|
||||
|
||||
# 备份机器拉取远端文件
|
||||
rsync -av --delete user@remote_host:/destination
|
||||
```
|
||||
|
||||
## 参考资料
|
||||
[rsync 用法教程](https://www.ruanyifeng.com/blog/2020/08/rsync.html)
|
||||
[rsync用法详解:最全面的rsync使用指南](https://blog.axiaoxin.com/post/rsync-guide/)
|
@ -1,6 +1,6 @@
|
||||
|
||||
## 2024年11月2日
|
||||
我妈去厦门玩,玩玩没想到他给我带了这个😮
|
||||
我妈去厦门玩,万万没想到他给我带了这个😮
|
||||

|
||||
|
||||
## 2024年6月14日
|
||||
|
@ -1 +1,12 @@
|
||||
## 清醒入睡
|
||||
过程感受:
|
||||
```
|
||||
第一阶段:有什么东西猛拽着自己,有强烈的想要反抗的感觉
|
||||
第二段:有重物从脚向头以一个不快不慢的速度压来,逐渐出现窒息感,四肢逐渐失去知觉
|
||||
第三阶段:感觉有一块大石头压在身上,只有眼睛能动
|
||||
第四阶段:无法分辨现实与脑中想法,思维逐渐模糊,奇奇怪怪的想法逐渐出现在思绪中
|
||||
第五阶段:陷入模糊的梦境,能勉强意识到是在做梦,但意识并不清醒,下意识的想要醒来并反抗
|
||||
第六阶段:可能反抗成功醒来,也可能睡下去
|
||||
```
|
||||
触发方法:
|
||||
在你很劳累的一天,上床后玩手机直到一个相对于你的作息规律很晚的睡觉时间,平躺着方空思维,不要想其他的,等待第一阶段到来,不要反抗
|
7
docs/src/996_其它/99_未来事记.md
Normal file
7
docs/src/996_其它/99_未来事记.md
Normal file
@ -0,0 +1,7 @@
|
||||
## 2038
|
||||
|
||||
- 北京时间2038年1月19日中午11:14:07,32位设备时间溢出
|
||||
|
||||
## 2050
|
||||
|
||||
- 他们说的真的是对的吗?
|
Loading…
Reference in New Issue
Block a user