From 553e8460591a8ad8a3c8439aaa247c40b44460bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E5=9B=BD=E4=BA=AE?= <647597435@qq.com> Date: Fri, 7 Jun 2024 04:36:34 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=94=90=E5=9B=BD=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 唐国亮 <647597435@qq.com> --- .../20240607vim.md" | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 "\345\224\220\345\233\275\344\272\256/20240607vim.md" diff --git "a/\345\224\220\345\233\275\344\272\256/20240607vim.md" "b/\345\224\220\345\233\275\344\272\256/20240607vim.md" new file mode 100644 index 0000000..5a0e386 --- /dev/null +++ "b/\345\224\220\345\233\275\344\272\256/20240607vim.md" @@ -0,0 +1,165 @@ +1. vi 编辑器有几种模式? + + ```apl + 三种模式:命令模式,输入模式,末行模式 + ``` + +2. 如何进入 vi 编辑器的插入模式 + + ```apl + 按 i + ``` + +3. 如何进入 vi 编辑器的可视化模式 + + ```apl + # 在Vim命令模式下,输入v或者V或者Ctrl + v都可进入可视化模式。这三个Vim可视化模式的主要区别在于: + 1. 字符选择模式:选中光标经过的所有字符,普通模式下按小写v进入。 + 2. 行选择模式:选中光标经过的所有行,普通模式下按大写V进入。 + 3. 块选择模式:选中一整个矩形框表示的所有文本,普通模式下按Ctrl + v进入 + ``` + +4. 在 vi 编辑器中如何进行粘贴 + + ```apl + 可以多次按 p 键多次粘贴文本,或使用 np,其中 n 是想要粘贴的次数 + P在当前位置前粘贴 + p在当前位置后粘贴 + ``` + +5. 在 vi 编辑器中如何复制一行 + + ```apl + :yy + ``` + +5. 如何删除从 3 行到 15 行的所有数据 + + ```apl + 1.按Esc键进入正常模式 + 2.输入:3,5d + 3.然后按Enter键以删除行 + ``` + +7. vim练习: + + - 光标移动练习,命令模式下: + + - 单位级 h j k l + - 单词级 w e b + - 块级 gg G 0 ^ $ H M L ngg nj nk + + 把下列句子按照第一句的正确顺序修改好并把多余的空行删除 + + ```apl + # 删除所有空行 + g/^$/d + # 显示行号 + :ste nu + ``` + + + + ```js + this is a simple easy vim tutorial + + tutorial simple a easy this vim is + is this tutorial vim simple a easy + + + tutorial vim this is a easy simple + tutorial easy vim simple a this is + simple a vim easy tutorial is this + + tutorial is easy vim a simple this + + + vim simple this tutorial a easy is + a vim tutorial simple easy is this + + + easy a simple vim is tutorial this + vim tutorial is a easy simple this + a this vim tutorial is easy simple + this tutorial simple easy a is vim + + + easy tutorial this simple a is vim + a tutorial easy is this simple vim + + a tutorial vim is easy this simple + simple this easy is vim tutorial a + + this tutorial is a easy simple vim + vim is tutorial simple this easy a + + vim is simple this tutorial easy a + easy a simple is vim this tutorial + vim is tutorial simple a easy this + this vim is tutorial simple easy a + ``` + + 先敲出以下代码,然后修正以下代码中的错误单词、重复单词、错误格式、多余行,修改函数名为 typing 并为定时器添加 300 毫秒延迟 + + ```js + const bbb = () => { + // this is is a description + // + // another descriptttion + const timer = setTimeout(( ) => { + console.log(that) alert('cool!') + // awosome man ! + }) + } + ------------------------------------------------------------ + const bbb = () => { + // this is is a description + // + // another descriptttion + const timer = setTimeout(( ) => { + console.log(that) alert('cool!',300) + // awosome man ! + }) + } + ``` + + 尝试在下面的文本中进行复制粘贴练习 + + ```apl + # 删除这一行 + dd + # 粘贴到这一行下面 + p + # 剪切 ABC 并把它粘贴到 XYZ 前面,使这部分内容看起来像 + 剪切 并把它粘贴到 ABC XYZ 前面。 + ``` + + 尝试修改下列文本的大小写 + + ```apl + Change this line to UPPERCASE, THEN TO lowercase. + # gu 全部修改为小写 + # gU 全部修改为大写 + # guw 单词修改为小写 + # gUw 单词修改为大写 + # gu~ 字符修改为小写 + ``` + + 按下面的说明进行操作 + + ```js + 按 dd 删除本行 + 按 . 重复删除操作 + 2. 再删除两行 + 这行也没了 + p 把刚才删掉的粘回来 + 3. 又多出 6 行 + ``` + + 左缩进、右缩进练习 + + ```js + 在这一行上依次按 3>>,<< 和 Date: Tue, 11 Jun 2024 04:40:02 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E5=94=90=E5=9B=BD=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 唐国亮 <647597435@qq.com> --- .../20240611sll.md" | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 "\345\224\220\345\233\275\344\272\256/20240611sll.md" diff --git "a/\345\224\220\345\233\275\344\272\256/20240611sll.md" "b/\345\224\220\345\233\275\344\272\256/20240611sll.md" new file mode 100644 index 0000000..6f95afb --- /dev/null +++ "b/\345\224\220\345\233\275\344\272\256/20240611sll.md" @@ -0,0 +1,62 @@ +### 一、申请SSL证书 + +1. **登录华为云控制台**: + - 访问 [华为云官网](https://www.huaweicloud.com/),点击“登录”,输入账号和密码。 +2. **进入SSL证书管理**: + - 在控制台主页,点击左侧菜单中的“安全与合规”,然后选择“SSL证书管理”。 +3. **申请新证书**: + - 点击“购买证书”按钮,选择适合的证书类型(如单域名、多域名或通配符证书),然后点击“立即购买”。 + - 填写证书信息,包括域名、申请者信息等。 + - 根据需要选择验证方式(如DNS验证、文件验证等)。 +4. **完成支付**: + - 确认订单信息,完成支付。 +5. **域名验证**: + - 根据选择的验证方式进行域名所有权验证。比如,如果选择DNS验证,需要根据提示在域名管理后台添加对应的DNS记录。 +6. **下载证书**: + - 验证通过后,证书颁发成功。可以在“SSL证书管理”页面中下载证书文件。 + +### 二、为网站设置SSL证书 + +#### 1. 使用Nginx配置SSL证书 + +1. **上传证书文件**: + + - 将下载的证书文件(一般包含一个证书文件和一个私钥文件)上传到服务器指定目录,如 `/etc/nginx/ssl/`。 + +2. **编辑Nginx配置文件**: + + - 打开Nginx配置文件,/etc/nginx/.con/配置文件 + - 添加或修改服务器块配置,启用HTTPS: + + ```js + 自己的配置下再添加一个sever就好 + server { + listen 443 ssl; + server_name yourdomain.com; + + ssl_certificate /etc/nginx/ssl/config.com.crt; + ssl_certificate_key /etc/nginx/ssl/config.com.key; + + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers HIGH:!aNULL:!MD5; + + location / { + root /var/www/html; + index index.html index.htm; + } + } + ``` + +3. **测试并重启Nginx**: + + - 测试Nginx配置文件是否正确: + + ```js + sudo nginx -t + ``` + + - 重启Nginx以应用新配置: + + ```js + sudo systemctl restart nginx + ``` \ No newline at end of file -- Gitee