-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ac5334
commit 387079c
Showing
12 changed files
with
13,146 additions
and
11,518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Git | ||
|
||
|
||
## 常用命令 | ||
|
||
### 配置用户名 & 邮箱 | ||
```bash | ||
git config --global user.name "你的用户名" | ||
|
||
git config --global user.email "你的邮箱地址" | ||
``` | ||
|
||
### git stash | ||
|
||
git stash 命令用于临时保存当前工作区的改动,这样你就可以在不提交改动的情况下切换到其他分支。 | ||
|
||
以下是一些常用的 git stash 命令: | ||
|
||
* git stash save "message":将当前的改动保存到一个新的 stash 中,你可以提供一个可选的消息来描述这个 stash。 | ||
* git stash list:列出所有的 stash。 | ||
* git stash apply:应用最近的 stash 到当前工作区,但不会从 stash 列表中删除这个 stash。 | ||
* git stash pop:应用最近的 stash 到当前工作区,并从 stash 列表中删除这个 stash。 | ||
* git stash drop stash@{n}:删除指定的 stash。 | ||
* git stash clear:删除所有的 stash。 | ||
|
||
|
||
### git rebase | ||
|
||
git rebase 命令用于将一系列提交应用到另一个基点上,它是 Git 中用于整理提交以使其更清晰的主要工具之一。 | ||
|
||
以下是一些常用的 git rebase 命令: | ||
|
||
* git rebase <base>:将当前分支的提交应用到 <base> 分支上。这将使得当前分支的提交看起来像是在 <base> 分支的最新提交之后进行的。 | ||
* git rebase -i <base> 或 git rebase --interactive <base>:以交互方式进行 rebase。这将打开一个 UI,让你可以选择要如何处理每个提交(包括丢弃、修改提交信息、合并等)。 | ||
* git rebase --continue:在解决完 rebase 过程中的冲突后,使用此命令继续 rebase 进程。 | ||
* git rebase --abort:如果你想放弃当前的 rebase 进程,可以使用此命令。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Homebrew | ||
|
||
|
||
## 安装 | ||
```bash | ||
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# 安装NodeJS | ||
# NodeJS | ||
|
||
|
||
## 使用nvm管理工具安装 | ||
## 安装 | ||
|
||
```bash | ||
# 安装nvm | ||
|
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# iTem2 | ||
|
||
|
||
## 安装 | ||
```bash | ||
# 官网下载 | ||
https://iterm2.com/ | ||
``` | ||
|
||
## 美化改造 | ||
|
||
### 配置 | ||
|
||
将iTem2设置为默认终端:(菜单栏)iTerm2 -> Make iTerm2 Default Term | ||
|
||
 | ||
|
||
然后打开偏好设置preference,选中Keys,勾选Hotkey下的Show/hide iTerm2 with a system-wide hotkey,将热键设置为command+. ,这样你就可以通过command+. 全局热键来打开或关闭iTerm2窗口,非常方便。 | ||
|
||
 | ||
|
||
|
||
|
||
### 安装oh-my-zsh | ||
|
||
github连接:https://github.com/robbyrussell/oh-my-zsh | ||
|
||
使用 crul 安装: | ||
|
||
```bash | ||
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | ||
``` | ||
|
||
或使用wget: | ||
|
||
|
||
```bash | ||
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | ||
``` | ||
|
||
|
||
### 主题 | ||
|
||
安装成功后,用vim打开隐藏文件 .zshrc ,修改主题为 agnoster: | ||
|
||
```bash | ||
ZSH_THEME="agnoster" | ||
``` | ||
|
||
应用这个主题需要特殊的字体支持,否则会出现乱码情况,这时我们来配置字体: | ||
|
||
1.使用 [Meslo](https://github.com/powerline/fonts/blob/master/Meslo%20Slashed/Meslo%20LG%20M%20Regular%20for%20Powerline.ttf) 字体,点开连接点击 view raw 下载字体。 | ||
|
||
2.安装字体到系统字体册。 | ||
|
||
3.应用字体到iTerm2下,我自己喜欢将字号设置为14px,看着舒服(iTerm -> Preferences -> Profiles -> Text -> Change Font)。 | ||
|
||
4.重新打开iTerm2窗口,这时便可以看到效果了。 | ||
|
||
|
||
### 自动提示命令 | ||
|
||
当我们输入命令时,终端会自动提示你接下来可能要输入的命令,这时按 → 便可输出这些命令,非常方便。 | ||
|
||
设置如下: | ||
|
||
1.克隆仓库到本地 ~/.oh-my-zsh/custom/plugins 路径下 | ||
|
||
```bash | ||
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions | ||
``` | ||
|
||
2.用 vim 打开 .zshrc 文件,找到插件设置命令,默认是 plugins=(git) ,我们把它修改为 | ||
|
||
```bash | ||
plugins=(zsh-autosuggestions git) | ||
``` | ||
|
||
|
||
3.重新打开终端窗口。 | ||
|
||
PS:当你重新打开终端的时候可能看不到变化,可能你的字体颜色太淡了,我们把其改亮一些: | ||
|
||
移动到 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions 路径下 | ||
|
||
```bash | ||
cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions | ||
``` | ||
|
||
用 vim 打开 zsh-autosuggestions.zsh 文件,修改 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10' | ||
|
||
|
||
### 语法高亮 | ||
|
||
1.使用homebrew安装 zsh-syntax-highlighting 插件。 | ||
|
||
```bash | ||
brew install zsh-syntax-highlighting | ||
``` | ||
|
||
2.配置.zshrc文件,插入一行。 | ||
|
||
```bash | ||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | ||
``` | ||
|
||
3.输入命令。 | ||
|
||
```bash | ||
source ~/.zshrc | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
--- | ||
title: A static site based on dumi | ||
title: 一些文档 | ||
hero: | ||
title: Site | ||
description: A static site based on dumi | ||
title: Docs | ||
description: 一些文档 | ||
actions: | ||
- text: Hello | ||
link: / | ||
- text: World | ||
link: / | ||
features: | ||
- title: Hello | ||
emoji: 💎 | ||
description: Put hello description here | ||
- title: World | ||
emoji: 🌈 | ||
description: Put world description here | ||
- title: '!' | ||
emoji: 🚀 | ||
description: Put ! description here | ||
--- | ||
|
||
|
Oops, something went wrong.