-
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
Showing
164 changed files
with
7,144 additions
and
7,148 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# LLM相关 | ||
# AI相关 | ||
- [Ollama安装和使用](./ollama安装和使用.md) |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,29 +1,26 @@ | ||
# 目录 | ||
- [嵌入式相关](./嵌入式相关/) | ||
- [后端开发](./后端开发/) | ||
- [兴趣](./兴趣/) | ||
- [赞助和推广](./赞助和推广/) | ||
- [社会认知](./社会认知/) | ||
- [生活记录](./生活记录/) | ||
- [前端开发](./前端开发/) | ||
- [开发工具技巧](./开发工具技巧/) | ||
- [服务器](./服务器/服务器.md) | ||
- [赞助和推广](./赞助和推广/) | ||
- [兴趣](./兴趣/) | ||
- [容器](./容器/) | ||
- [python相关](./python相关/) | ||
- [LLM相关](./LLM相关/) | ||
- [容器技术](./容器技术/) | ||
- [Python语言](./Python语言/) | ||
- [AI相关](./AI相关/) | ||
- [Linux系统](./Linux系统/) | ||
- [Java语言相关](./Java语言相关/) | ||
- [Git版本管理](./Git版本管理/) | ||
- [安卓](./安卓/) | ||
- [生活记录](./生活记录/) | ||
- [社会认知](./社会认知/) | ||
- [计网](./计网/) | ||
- [金融](./金融/) | ||
- [博客](./博客/) | ||
- [安卓开发](./安卓开发/) | ||
- [计算机网络](./计算机网络/) | ||
- [金融知识](./金融知识/) | ||
- [博客搭建](./博客搭建/) | ||
- [数据库](./数据库/) | ||
- [架构师知识](./架构师知识/) | ||
- [Nginx](./Nginx/) | ||
- [系统架构](./系统架构/) | ||
- [Windows系统](./Windows系统/) | ||
- [About](./public/public.md) | ||
- [代码质量](./代码质量/) | ||
- [英语](./英语/) | ||
- [Rust语言](./Rust语言/) | ||
- [政治](./政治/) | ||
- [算法面试](./算法面试/) | ||
- [VitePress 博客](./Readme.md) |
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
File renamed without changes
File renamed without changes
152 changes: 76 additions & 76 deletions
152
...备份Powershell脚本/Hexo一键部署并备份Powershell脚本.md → ...备份Powershell脚本/Hexo一键部署并备份Powershell脚本.md
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,77 +1,77 @@ | ||
--- | ||
title: Hexo一键部署并备份Powershell脚本书写 | ||
tags: | ||
- Hexo | ||
- 一键部署 | ||
- Powershell | ||
categories: [博客技术,hexo部署] | ||
abbrlink: b608 | ||
--- | ||
# Hexo一键部署并备份Powershell脚本 | ||
|
||
最近玩Hexo每次写完博客都要一顿操作猛如虎来发表文章,一般人都会比较厌烦这些比较麻烦的步骤, | ||
本篇博客就是介绍如何书写一键部署脚本 | ||
|
||
## 为啥用Powershell | ||
|
||
Powershell是巨硬推出的新一代shell优点就是面向对象,并且可以跨平台使用,这是cmd和bash是无法匹敌的好玩意,并且可以调用cmd .dll类库(强大的.Net core支持)是真正意义上的乱炖大杂烩,学会之后可以为Linux和Mac os安装使用。我用起来还是比较方便哈,虽然本文这个脚本是很简单的脚本。 | ||
|
||
## 在屏幕上打印文本 | ||
|
||
`Win + x + i`打开Powershell输入 | ||
```powershell HelloWorld.ps1 | ||
Write-Output "Hello World"; | ||
``` | ||
你会看到 | ||
|
||
![](./2020-02-25-01-09-25.jpg) | ||
|
||
你可以将这一行命令保存在`HelloWorld.ps1`中直接在shell中打开该文件就可以运行了。 | ||
(由于powershell中文默认编码为gb2312所以如果有中文请保存为gbk或是gb2312编码) | ||
![](./2020-02-25-01-27-13.jpg) | ||
|
||
Powershell脚本会按照行一行一行的执行每行的命令 | ||
|
||
## 脚本实战 | ||
|
||
那么现在你现在学的已经可以写一些简单的脚本了,就比如 | ||
|
||
```powershell hexo_cl_g_s.ps1 | ||
Write-Output "---------清空开始---------"; | ||
hexo cl; | ||
Write-Output "----------清空结束---------"; | ||
Write-Output "---------生成开始-----------"; | ||
hexo g; | ||
Write-Output "----------生成结束----------"; | ||
Write-Output "--------启动本地服务器------"; | ||
hexo s; | ||
``` | ||
配合vscode使用体验贼好, | ||
|
||
## 本人的代码示例 | ||
|
||
```powershell push.ps1 | ||
Write-Output "--------------0/5开始清理数据库---------------------"; | ||
hexo cl; | ||
Write-Output "-------------1/5清理完毕,开始生成页面---------------"; | ||
hexo g; | ||
Write-Output "-------------2/5生成完毕,开始代码压缩---------------"; | ||
gulp; | ||
Write-Output "------------3/5压缩完毕,开始部署--------------------"; | ||
hexo d; | ||
Write-Output "-------------4/5部署完毕,开始备份-------------------"; | ||
git add .; | ||
git commit -m "backup"; | ||
git push; | ||
Write-Output "-------------5/5备份完毕,全部任务完成---------------"; | ||
``` | ||
|
||
## 总结 | ||
|
||
Powershell是很强的shell工具感兴趣的可以查看微软的官方文档,作为win10用户用powershell作为自己的自动化工具真的很省心,而且微软也在努力的将powershell推向linux和mac os具有很好的跨平台性,是我们值得学习的好工具。 | ||
|
||
## 推荐阅读 | ||
|
||
[PowerShell 文档 - PowerShell | Microsoft Docs]( | ||
--- | ||
title: Hexo一键部署并备份Powershell脚本书写 | ||
tags: | ||
- Hexo | ||
- 一键部署 | ||
- Powershell | ||
categories: [博客技术,hexo部署] | ||
abbrlink: b608 | ||
--- | ||
# Hexo一键部署并备份Powershell脚本 | ||
|
||
最近玩Hexo每次写完博客都要一顿操作猛如虎来发表文章,一般人都会比较厌烦这些比较麻烦的步骤, | ||
本篇博客就是介绍如何书写一键部署脚本 | ||
|
||
## 为啥用Powershell | ||
|
||
Powershell是巨硬推出的新一代shell优点就是面向对象,并且可以跨平台使用,这是cmd和bash是无法匹敌的好玩意,并且可以调用cmd .dll类库(强大的.Net core支持)是真正意义上的乱炖大杂烩,学会之后可以为Linux和Mac os安装使用。我用起来还是比较方便哈,虽然本文这个脚本是很简单的脚本。 | ||
|
||
## 在屏幕上打印文本 | ||
|
||
`Win + x + i`打开Powershell输入 | ||
```powershell HelloWorld.ps1 | ||
Write-Output "Hello World"; | ||
``` | ||
你会看到 | ||
|
||
![](./2020-02-25-01-09-25.jpg) | ||
|
||
你可以将这一行命令保存在`HelloWorld.ps1`中直接在shell中打开该文件就可以运行了。 | ||
(由于powershell中文默认编码为gb2312所以如果有中文请保存为gbk或是gb2312编码) | ||
![](./2020-02-25-01-27-13.jpg) | ||
|
||
Powershell脚本会按照行一行一行的执行每行的命令 | ||
|
||
## 脚本实战 | ||
|
||
那么现在你现在学的已经可以写一些简单的脚本了,就比如 | ||
|
||
```powershell hexo_cl_g_s.ps1 | ||
Write-Output "---------清空开始---------"; | ||
hexo cl; | ||
Write-Output "----------清空结束---------"; | ||
Write-Output "---------生成开始-----------"; | ||
hexo g; | ||
Write-Output "----------生成结束----------"; | ||
Write-Output "--------启动本地服务器------"; | ||
hexo s; | ||
``` | ||
配合vscode使用体验贼好, | ||
|
||
## 本人的代码示例 | ||
|
||
```powershell push.ps1 | ||
Write-Output "--------------0/5开始清理数据库---------------------"; | ||
hexo cl; | ||
Write-Output "-------------1/5清理完毕,开始生成页面---------------"; | ||
hexo g; | ||
Write-Output "-------------2/5生成完毕,开始代码压缩---------------"; | ||
gulp; | ||
Write-Output "------------3/5压缩完毕,开始部署--------------------"; | ||
hexo d; | ||
Write-Output "-------------4/5部署完毕,开始备份-------------------"; | ||
git add .; | ||
git commit -m "backup"; | ||
git push; | ||
Write-Output "-------------5/5备份完毕,全部任务完成---------------"; | ||
``` | ||
|
||
## 总结 | ||
|
||
Powershell是很强的shell工具感兴趣的可以查看微软的官方文档,作为win10用户用powershell作为自己的自动化工具真的很省心,而且微软也在努力的将powershell推向linux和mac os具有很好的跨平台性,是我们值得学习的好工具。 | ||
|
||
## 推荐阅读 | ||
|
||
[PowerShell 文档 - PowerShell | Microsoft Docs]( | ||
https://docs.microsoft.com/zh-cn/powershell/) |
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
File renamed without changes
60 changes: 30 additions & 30 deletions
60
...访问/使用cloudflare开启githubPages的强制https访问.md → ...访问/使用cloudflare开启githubPages的强制https访问.md
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,31 +1,31 @@ | ||
# 使用cloudflare开启githubPages的强制https访问 | ||
|
||
## 前言 | ||
|
||
如果你和我一样使用github Pages搭建了自己的博客但是遇到了无法开启强制https的情况可以使用我这里的方法来试试。 | ||
|
||
|
||
![github设置https页面](./2020-02-25-20-30-33.jpg) | ||
|
||
我就是这样我设置了开启但是,这个小勾一直勾选不上,气得很。 | ||
|
||
经过一番探索我用cloudflare的页面规则解决了这个问题。 | ||
|
||
## 前置要求 | ||
|
||
- 使用cloudflare作为你的dns服务商 | ||
- 还有至少一条页面规则可以用(免费的账户最多支持三条页面规则) | ||
- 开启了cloudflare的cdn云朵 | ||
|
||
|
||
## 开始操作 | ||
|
||
打开cloudflare页面,添加一个页面规则,设置成下图所示即可 | ||
|
||
![](./设置页面规则.jpg) | ||
|
||
## 测试成果 | ||
|
||
设置好之后你输入 http://你的网站直接就会跳转到 https://的页面 | ||
|
||
# 使用cloudflare开启githubPages的强制https访问 | ||
|
||
## 前言 | ||
|
||
如果你和我一样使用github Pages搭建了自己的博客但是遇到了无法开启强制https的情况可以使用我这里的方法来试试。 | ||
|
||
|
||
![github设置https页面](./2020-02-25-20-30-33.jpg) | ||
|
||
我就是这样我设置了开启但是,这个小勾一直勾选不上,气得很。 | ||
|
||
经过一番探索我用cloudflare的页面规则解决了这个问题。 | ||
|
||
## 前置要求 | ||
|
||
- 使用cloudflare作为你的dns服务商 | ||
- 还有至少一条页面规则可以用(免费的账户最多支持三条页面规则) | ||
- 开启了cloudflare的cdn云朵 | ||
|
||
|
||
## 开始操作 | ||
|
||
打开cloudflare页面,添加一个页面规则,设置成下图所示即可 | ||
|
||
![](./设置页面规则.jpg) | ||
|
||
## 测试成果 | ||
|
||
设置好之后你输入 http://你的网站直接就会跳转到 https://的页面 | ||
|
||
到这,全部就完成了,可以试试。 |
File renamed without changes
File renamed without changes.
File renamed without changes.
Oops, something went wrong.