Git Rebase
安全 Rebase 手册 🚦 什么是 Rebase?简单理解,rebase 就是把你当前分支上的提交“搬家”,放到目标分支(通常是 main)的最新提交之后。就像你写的代码排队等着接力跑,把你的改动“重新插队”到最新代码后面。 为什么要用 Rebase? 保持提交历史整洁、线性 🧹 方便回顾和审查代码 🔍 避免一堆杂乱的合并提交(merge commits) 🌀 但 Rebase 有啥坑? 频繁冲突,像“搬家拆迁”现场 🏚️ 改历史可能导致别人分支失效 💥 中断没解决冲突,Git 状态乱成一锅粥 🍲 安全 Rebase 操作步骤 🛡️12345678910111213141516171819202122232425262728293031# 1. 确保工作区干净(无未提交改动)git status# 如果有改动,先提交或 stashgit add .git commit -m "work in progress" # 提交# 或者git stash ...
Manage your own email server via Gmail and Cloudflare
IntroductionThis article will guide you through the process of setting up your own email server using Gmail and Cloudflare. By following these steps, you can manage your email without relying on third-party services, ensuring greater control and privacy. Prerequisites Domain Name: You need a registered domain name to set up your email server. Gmail Account: A Gmail account to use as your email client. Cloudflare Account: To manage your DNS settings and enhance security. Step 1: Set Up Your...
How to install Bitwarden
IntroductionAn alternative server implementation of the Bitwarden Client API, written in Rust and compatible with official Bitwarden clients disclaimer, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. Click Here to visit the official website Install VaultwardenInstall DockerClick here for more details. Install VaultwardenDocker compose: 1234567891011services: vaultwarden: image: vaultwarden/server:latest container_name:...
How to use Filebrowser
InstallationFilebrowser is a single binary that can be used as a standalone executable. Alternatively, you can use it with Docker or Caddy, a fantastic web server that enables HTTPS by default. Its installation is straightforward regardless of the system you use. Using Brew Note: Brew is available for both Linux and macOS. [[How to install Brew]] 123brew tap filebrowser/tapbrew install filebrowserfilebrowser -r /path/to/your/files Tip: Configure Filebrowser before running it for the first...
Install-Brew
IntroductionHomebrew is a package distribution manager for both MacOS and Linux InstallationOfficial website Just run the command below: 1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Frequent Questions:[[How to proxy your local traffic]]
How to add user in Linux and MacOS
Linux 与 MacOS 用户管理命令详解Introduction在 Linux 系统中,使用 useradd 命令可以添加新用户。以下是一些常用的 useradd 命令的用法和示例。 基本语法1useradd [选项] 用户名 常用选项 -m:创建用户的主目录(通常在 /home/username)。 -s:指定用户的默认 shell(例如 /bin/bash)。 -G:将用户添加到一个或多个附加组(用逗号分隔)。 -d:指定用户的主目录。 -e:设置用户的过期日期。 -r:创建一个系统用户(通常没有主目录)。 示例创建一个基本用户创建一个名为 newuser 的普通用户: 1sudo useradd newuser 创建一个用户并指定主目录创建名为 newuser 的用户并创建 /home/newuser 作为主目录: 1sudo useradd -m newuser 创建一个用户并指定默认 shell创建名为 newuser 的用户,主目录为 /home/newuser,默认 shell 为 /bin/bash: 1sudo useradd -m -s...
Why MacOS Doesn't Use `systemd`?
为什么 macOS 没有像 journalctl 那样统一的日志管理方式? 设计哲学差异 macOS 的设计哲学与 Linux 不同。macOS 更注重简洁和“透明”的用户体验,许多日志和系统管理工具被设计得较为分散。launchctl、syslog 和 log 工具各自承担不同的功能,使系统组件和日志管理更加模块化。相比之下,Linux 倾向于统一管理(如 systemd 和 journalctl),通过单一工具集中管理所有服务和系统日志。 兼容性与历史原因 macOS 的内核和用户空间组件有着历史延续性,launchd 和 syslog 等工具自早期版本就已存在。而 journalctl 是随着 systemd 在现代 Linux 发行版中普及后发展起来的。macOS 架构独立,不依赖 systemd,因此也没有统一的日志管理工具。 用户层级的简化 launchctl 和 log 工具主要面向系统管理员和开发者。macOS 更倾向于为普通用户提供图形化界面(如系统偏好设置、活动监视器等),而 Linux 更注重命令行工具的强大功能。因此,launchctl...
How to penetrate NAT via FRP
Deploy FRP ServerInstall FRPOfficial Repository: FRP Download the latest release for your operating system and architecture from the Release page. Here, we use Linux amd64 as an example: 1wget https://github.com/fatedier/frp/releases/download/v0.62.1/frp_0.62.1_linux_amd64.tar.gz After downloading, you should see: 12root@cc:~/download# lsfrp_0.62.1_linux_amd64.tar.gz Extract the archive using tar (see [[tar]] for more information): 123456789root@cc:~/download# tar -zxvf...
派生
英语派生构词是通过添加前缀(prefix)或后缀(suffix)来改变单词的意义或词性,形成新的单词。这种方法是英语词汇扩展的重要途径。以下是常见的前缀和后缀的归纳,以及对应的示例。前缀(Prefix)前缀通常放在词根前面,改变单词的含义,但通常不改变单词的词性。 1. 表示否定或反义的前缀un-: 表示“否定、不”。 example: unhappy(不开心的), unable(不能的) in-/im-: 表示“否定、不”。 example: incorrect(不正确的), impossible(不可能的) il-: 表示“否定、不”(用于以 l 开头的单词)。 example: illegal(非法的) ir-: 表示“否定、不”(用于以 r 开头的单词)。 example: irregular(不规则的) dis-: 表示“否定、取消”。 example: dislike(不喜欢), disconnect(断开) non-: 表示“非、不”。 example: nonviolent(非暴力的), nonlinear(非线性的) 2....
英语构词法
派生与中文类比注意:派生并不完全等于构词法 让固定的字母组合表示某种含义,类似于偏旁部首的感觉. For example: 氵:表示和水有关: 江、河、湖、海 hydr:表示和水有关:(来自希腊语)water:(来自日耳曼语) hydrate:水合物 hydrous:含水的 英语词汇通史{:height 394, :width 687} 其中日耳曼语往往多出现于日常生活,词汇更加简单,而希腊语,拉丁文和法语则更多出现于正式场合。 希腊语 -> 英语:telephone,grammar 西班牙语 -> 英语:mosquito,tornado 意大利语 -> 英语:lava,volcano 荷兰语 -> 英语:boss,cookie 波斯语 -> 英语:paradise,chess 澳大利亚土著语 -> kangaroo 阿拉伯语:alcohol,cotton 土耳其语:coffee 日本语:kimono(和服),samurai(武士) 印地语:shampoo 因纽特语:kayak(木舟),igloo(圆顶小屋) 中文->英文:茶...