diff --git a/2022/09/14/Hexo安装摸索/index.html b/2022/09/14/Hexo安装摸索/index.html index 1a22c889f..61e834e0c 100644 --- a/2022/09/14/Hexo安装摸索/index.html +++ b/2022/09/14/Hexo安装摸索/index.html @@ -1 +1 @@ -Hexo 安装摸索 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# hexo 博客安装

  1. 安装 nodejs

  2. 安装 git

  3. 安装 hexo(windows 需进入 git bash)

    npm install -g hexo-cli

  4. 初始化博客目录

    hexo init blog

  5. 进入博客目录

    cd blog

  6. 初始化 hexo 到博客目录

    npm install

# shoka 主题安装

  1. 下载主题

    git clone https://github.com/amehime/hexo-theme-shoka.git ./themes/shoka

  2. 卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器

    npm un hexo-renderer-marked --save

  3. 安装(md 文件渲染器,压缩 css/js/html)

    npm i hexo-renderer-multi-markdown-it --save

如果出现安装报错的情况,可使用 yarn 进行安装
npm install -g yarn #安装 yarn
yarn config set registry https://registry.npm.taobao.org #使用淘宝源
yarn add hexo-renderer-multi-markdown-it

  1. 安装(给生成的 css 文件们添加浏览器前缀)

    npm i hexo-autoprefixer --save

  2. 安装(站内搜索功能)

    npm i hexo-algoliasearch --save

  3. 安装(文章或站点字数及阅读时间统计)

    npm i hexo-symbols-count-time --save

  4. 安装(生成 Feed 文件)

    npm i hexo-feed --save

# Hexo 部分常用命令

  • 清除静态文件

    hexo clean

  • 生成静态文件

    hexo g

  • 安装 git 推送插件

    npm install hexo-deployer-git --save

  • 推送静态文件到 git

    hexo d

# 安装 hexo-admin(编写博客插件)

admin:
username: username
password_hash: xxxxxx
secret: 'my super secret phrase' #用单引号包裹
deployCommand: 'hexo_publish.sh' #windows 用 hexo_publish.bat,linux 用 hexo_publish.sh

当出现 Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default. 时,需要修改 /blog/node_modules/hexo-admin/api.js 文件。把 yml.safeLoad (fs.readFileSync (path)) 改为 yml.load (fs.readFileSync (path)),然后重启 hexo-admin 服务即可。出现此问题的原因是:yaml.safeLoad 已经弃用!

# hexo_publish.sh

#!/bin/bash
hexo clean
hexo g
hexo d

# hexo_publish.bat

@echo off
cd D:\blog
d:
@cmd /c "hexo clean&& hexo g&&hexo d&&echo success"
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Hexo 安装摸索 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# hexo 博客安装

  1. 安装 nodejs

  2. 安装 git

  3. 安装 hexo(windows 需进入 git bash)

    npm install -g hexo-cli

  4. 初始化博客目录

    hexo init blog

  5. 进入博客目录

    cd blog

  6. 初始化 hexo 到博客目录

    npm install

# shoka 主题安装

  1. 下载主题

    git clone https://github.com/amehime/hexo-theme-shoka.git ./themes/shoka

  2. 卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器

    npm un hexo-renderer-marked --save

  3. 安装(md 文件渲染器,压缩 css/js/html)

    npm i hexo-renderer-multi-markdown-it --save

如果出现安装报错的情况,可使用 yarn 进行安装
npm install -g yarn #安装 yarn
yarn config set registry https://registry.npm.taobao.org #使用淘宝源
yarn add hexo-renderer-multi-markdown-it

  1. 安装(给生成的 css 文件们添加浏览器前缀)

    npm i hexo-autoprefixer --save

  2. 安装(站内搜索功能)

    npm i hexo-algoliasearch --save

  3. 安装(文章或站点字数及阅读时间统计)

    npm i hexo-symbols-count-time --save

  4. 安装(生成 Feed 文件)

    npm i hexo-feed --save

# Hexo 部分常用命令

  • 清除静态文件

    hexo clean

  • 生成静态文件

    hexo g

  • 安装 git 推送插件

    npm install hexo-deployer-git --save

  • 推送静态文件到 git

    hexo d

# 安装 hexo-admin(编写博客插件)

admin:
username: username
password_hash: xxxxxx
secret: 'my super secret phrase' #用单引号包裹
deployCommand: 'hexo_publish.sh' #windows 用 hexo_publish.bat,linux 用 hexo_publish.sh

当出现 Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default. 时,需要修改 /blog/node_modules/hexo-admin/api.js 文件。把 yml.safeLoad (fs.readFileSync (path)) 改为 yml.load (fs.readFileSync (path)),然后重启 hexo-admin 服务即可。出现此问题的原因是:yaml.safeLoad 已经弃用!

# hexo_publish.sh

#!/bin/bash
hexo clean
hexo g
hexo d

# hexo_publish.bat

@echo off
cd D:\blog
d:
@cmd /c "hexo clean&& hexo g&&hexo d&&echo success"
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/09/16/极空间chevereto图床docker版安装/index.html b/2022/09/16/极空间chevereto图床docker版安装/index.html index 8cfcce918..070ed2746 100644 --- a/2022/09/16/极空间chevereto图床docker版安装/index.html +++ b/2022/09/16/极空间chevereto图床docker版安装/index.html @@ -1 +1 @@ -极空间 chevereto 图床 docker 版安装 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 安装准备

  1. 需要先安装好 mysql 数据库

  2. 选择版本,1.5 版以前支持中文,之后被维护的团队删除只支持英文

  3. 本文介绍使用的是 linuxserver_chevereto 的镜像

  4. 需要预先创建好给 chevereto 使用的库、账户、密码

  • 经过测试,使用 surenkid_chevereto 的镜像可以完美支持多国语言,配置同 linuxserver_chevereto 一样


# 容器配置

  1. 映射路径(不要放在高速盘,否则会有权限问题)
    6150d69d9a170d96e66ca69420f8c4e8.png

  2. 端口
    08eafb3b30a7eb9b0c0be26ea7a1502a.png

  3. 环境(puid 和 pgid 使用 1000,不要使用 0,否则会报错)
    01567ca9f31f87f832276be35cc4554b.png

# 初始化配置

  1. 使用 http:// 极空间 ip:81 (端口号使用上面配置的,我配置的是 81) 进行 web 访问(数据库配置)
    0.png

  2. 管理员配置(注意 website 配置选择个人,除非需要提供给其它人注册)
    1.png
    2.png

  3. 默认上传大小是 2M,可通过修改 php.ini 配置提升(路径 /etc/php7/php.ini 查找 upload_max_filesize 和 post_max_size 进行修改)。之后用管理员登录通过页面 http://xxx/dashboard/settings/image-upload 修改。
    upload_max_filesize = 256M
    post_max_size = 256M
    max_execution_time = 300
    max_input_time = 300
    memory_limit = 1024M

# 安装完成

  1. 作为图片管理和链接分享服务完全够用。图片链接 url 支持的也很全面。
    2022-09-16-14-52-29.png
    2022-09-16-14-54-58.png
    2022-09-16-14-56-13.png
\ No newline at end of file +极空间 chevereto 图床 docker 版安装 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 安装准备

  1. 需要先安装好 mysql 数据库

  2. 选择版本,1.5 版以前支持中文,之后被维护的团队删除只支持英文

  3. 本文介绍使用的是 linuxserver_chevereto 的镜像

  4. 需要预先创建好给 chevereto 使用的库、账户、密码

  • 经过测试,使用 surenkid_chevereto 的镜像可以完美支持多国语言,配置同 linuxserver_chevereto 一样


# 容器配置

  1. 映射路径(不要放在高速盘,否则会有权限问题)
    6150d69d9a170d96e66ca69420f8c4e8.png

  2. 端口
    08eafb3b30a7eb9b0c0be26ea7a1502a.png

  3. 环境(puid 和 pgid 使用 1000,不要使用 0,否则会报错)
    01567ca9f31f87f832276be35cc4554b.png

# 初始化配置

  1. 使用 http:// 极空间 ip:81 (端口号使用上面配置的,我配置的是 81) 进行 web 访问(数据库配置)
    0.png

  2. 管理员配置(注意 website 配置选择个人,除非需要提供给其它人注册)
    1.png
    2.png

  3. 默认上传大小是 2M,可通过修改 php.ini 配置提升(路径 /etc/php7/php.ini 查找 upload_max_filesize 和 post_max_size 进行修改)。之后用管理员登录通过页面 http://xxx/dashboard/settings/image-upload 修改。
    upload_max_filesize = 256M
    post_max_size = 256M
    max_execution_time = 300
    max_input_time = 300
    memory_limit = 1024M

# 安装完成

  1. 作为图片管理和链接分享服务完全够用。图片链接 url 支持的也很全面。
    2022-09-16-14-52-29.png
    2022-09-16-14-54-58.png
    2022-09-16-14-56-13.png
\ No newline at end of file diff --git a/2022/09/17/Hexo-Theme-Shoka-algolia搜索踩坑/index.html b/2022/09/17/Hexo-Theme-Shoka-algolia搜索踩坑/index.html index 519935a37..87221f31b 100644 --- a/2022/09/17/Hexo-Theme-Shoka-algolia搜索踩坑/index.html +++ b/2022/09/17/Hexo-Theme-Shoka-algolia搜索踩坑/index.html @@ -1 +1 @@ -Hexo + Theme.Shoka + algolia 搜索踩坑 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# Hexo + Theme.Shoka 安装

安装介绍

# algolia 注册

  1. algolia 不支持国内邮箱注册,而 google 和 github 由于国内被墙也没法使用。所以只能先注册 netlify 然后通过 netlify 注册 algolia。

  2. 登录 algolia 后创建一个 index,名字随意记住既可。

    2022-09-17-23-32-20.png

  3. 点击右上角红点,弹出窗口点 settings 按钮。

    2022-09-17-23-35-04.png

  4. 点击 API KEYS,获取 appId 和 adminApiKey 填入 hexo 的_config.yml 中 apiKey 暂时不填。

algolia:
  appId: #Your appId
  apiKey: #Your apiKey
  adminApiKey: #Your adminApiKey
  chunkSize: 5000
  indexName: blog #"shoka"
  fields:
    - title #必须配置
    - path #必须配置
    - categories #推荐配置
    - content:strip:truncate,0,2000
    - gallery
    - photos
    - tags
  1. 点击 All Api Keys - New Api key 创建一个 api key,Indices 选先前让记住的 index,ACL 选下面图片中的选项。

    2022-09-17-23-47-50.png

  2. 把第 5 步中新建的 api key 填入到第 4 步中的配置中,到此已经完成了百分之九十,只需要重新编译发布即可。不过编译步骤多了一步,在 hexo g 后需要再执行 hexo algolia,至此搜索功能就大功告成了。

\ No newline at end of file +Hexo + Theme.Shoka + algolia 搜索踩坑 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# Hexo + Theme.Shoka 安装

安装介绍

# algolia 注册

  1. algolia 不支持国内邮箱注册,而 google 和 github 由于国内被墙也没法使用。所以只能先注册 netlify 然后通过 netlify 注册 algolia。

  2. 登录 algolia 后创建一个 index,名字随意记住既可。

    2022-09-17-23-32-20.png

  3. 点击右上角红点,弹出窗口点 settings 按钮。

    2022-09-17-23-35-04.png

  4. 点击 API KEYS,获取 appId 和 adminApiKey 填入 hexo 的_config.yml 中 apiKey 暂时不填。

algolia:
  appId: #Your appId
  apiKey: #Your apiKey
  adminApiKey: #Your adminApiKey
  chunkSize: 5000
  indexName: blog #"shoka"
  fields:
    - title #必须配置
    - path #必须配置
    - categories #推荐配置
    - content:strip:truncate,0,2000
    - gallery
    - photos
    - tags
  1. 点击 All Api Keys - New Api key 创建一个 api key,Indices 选先前让记住的 index,ACL 选下面图片中的选项。

    2022-09-17-23-47-50.png

  2. 把第 5 步中新建的 api key 填入到第 4 步中的配置中,到此已经完成了百分之九十,只需要重新编译发布即可。不过编译步骤多了一步,在 hexo g 后需要再执行 hexo algolia,至此搜索功能就大功告成了。

\ No newline at end of file diff --git a/2022/09/21/记一次netty-socket-io服务端连接不上的问题/index.html b/2022/09/21/记一次netty-socket-io服务端连接不上的问题/index.html index 1f88675be..1513631bf 100644 --- a/2022/09/21/记一次netty-socket-io服务端连接不上的问题/index.html +++ b/2022/09/21/记一次netty-socket-io服务端连接不上的问题/index.html @@ -1 +1 @@ -记一次 netty-socketio 服务端连接不上的问题 - 心得体会 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

今天前端开发跟我反馈用 vue 的 socketio 连接不上后台服务,连接无反应无任何报错。所以不清楚是前端代码问题还是后台服务的问题。由于框架为另一同事搭建,我只负责处理后端业务逻辑部分,所以第一时间我也不清楚具体的原因。于是我找了个第三方的 socket 工具尝试连接,果然有问题。但是只是提示连接不上,无明显错误原因。到后台查看发现有提示 Unknown transport for request 错误,最后通过调试发现 netty-socketio 的库中 AuthorizeHandler 类有段处理 transport 的代码只能接受大写的 WEBSOCKET 或者 POLLING,于是我在工具中按要求填上结果还是不行。然后我在网上搜索也未发现有相关问题,只发现有网友提示需要用 socketio 的库,不要自己写 socket 连接。于是我找了 socket.io.js 来连接,结果还是一样。经过大量调试改代码,最后突发奇想,有没有可能跟 netty-socketio 的版本有关系,于是我把版本从 1.7.20 升级到 1.7.21,结果就奇迹般的好了。

# 总结:就好像大力出奇迹,实在找不到原因的时候不妨升级一下版本,说不定问题就解决了呢!O (∩_∩) O
\ No newline at end of file +记一次 netty-socketio 服务端连接不上的问题 - 心得体会 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

今天前端开发跟我反馈用 vue 的 socketio 连接不上后台服务,连接无反应无任何报错。所以不清楚是前端代码问题还是后台服务的问题。由于框架为另一同事搭建,我只负责处理后端业务逻辑部分,所以第一时间我也不清楚具体的原因。于是我找了个第三方的 socket 工具尝试连接,果然有问题。但是只是提示连接不上,无明显错误原因。到后台查看发现有提示 Unknown transport for request 错误,最后通过调试发现 netty-socketio 的库中 AuthorizeHandler 类有段处理 transport 的代码只能接受大写的 WEBSOCKET 或者 POLLING,于是我在工具中按要求填上结果还是不行。然后我在网上搜索也未发现有相关问题,只发现有网友提示需要用 socketio 的库,不要自己写 socket 连接。于是我找了 socket.io.js 来连接,结果还是一样。经过大量调试改代码,最后突发奇想,有没有可能跟 netty-socketio 的版本有关系,于是我把版本从 1.7.20 升级到 1.7.21,结果就奇迹般的好了。

# 总结:就好像大力出奇迹,实在找不到原因的时候不妨升级一下版本,说不定问题就解决了呢!O (∩_∩) O
\ No newline at end of file diff --git a/2022/09/22/protobuf生成js文件/index.html b/2022/09/22/protobuf生成js文件/index.html index 7755d44c8..a68b466f2 100644 --- a/2022/09/22/protobuf生成js文件/index.html +++ b/2022/09/22/protobuf生成js文件/index.html @@ -1 +1 @@ -protobuf 生成 js 文件 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 下载工具

protoc-3.19.5-win64.zip

# 生成 js 文件

  1. 把 xxx.proto 文件拷贝到解压的 protoc-3.19.5-win64\bin 目录下

  2. cmd 到相同的 bin 目录下

  3. 执行 protoc.exe --js_out=import_style=commonjs,binary:. ./xxx.proto 命令,就会在 bin 目录下生成 xxx_pb.js 文件

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +protobuf 生成 js 文件 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 下载工具

protoc-3.19.5-win64.zip

# 生成 js 文件

  1. 把 xxx.proto 文件拷贝到解压的 protoc-3.19.5-win64\bin 目录下

  2. cmd 到相同的 bin 目录下

  3. 执行 protoc.exe --js_out=import_style=commonjs,binary:. ./xxx.proto 命令,就会在 bin 目录下生成 xxx_pb.js 文件

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/09/23/解决域名ip变动后需要重启nginx的问题/index.html b/2022/09/23/解决域名ip变动后需要重启nginx的问题/index.html index 7b380d64c..a5d3a3588 100644 --- a/2022/09/23/解决域名ip变动后需要重启nginx的问题/index.html +++ b/2022/09/23/解决域名ip变动后需要重启nginx的问题/index.html @@ -1 +1 @@ -解决域名 ip 变动后需要重启 nginx 的问题 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

今天突然发现自己的网站不能访问了。经过一顿排查,发现是家里的外网 ip 变动后 nginx 解析的域名 ip 还是旧 ip 导致的。手动重启 nginx 后恢复正常。但这不是长久之计,如果每次 ip 变动都需要重启一次 nginx,想想都头大。于是查询资料后获得了解决办法,方法如下:

location / {	
	resolver 114.114.114.114 valid=60s; #自定义缓存有效时间间隔对变量中的域名进行解析
	set $my_server "https://ip:port";
	proxy_pass $my_server;
}
\ No newline at end of file +解决域名 ip 变动后需要重启 nginx 的问题 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

今天突然发现自己的网站不能访问了。经过一顿排查,发现是家里的外网 ip 变动后 nginx 解析的域名 ip 还是旧 ip 导致的。手动重启 nginx 后恢复正常。但这不是长久之计,如果每次 ip 变动都需要重启一次 nginx,想想都头大。于是查询资料后获得了解决办法,方法如下:

location / {	
	resolver 114.114.114.114 valid=60s; #自定义缓存有效时间间隔对变量中的域名进行解析
	set $my_server "https://ip:port";
	proxy_pass $my_server;
}
\ No newline at end of file diff --git a/2022/09/26/解决Hexo-Shoka背景音乐无法播放的问题/index.html b/2022/09/26/解决Hexo-Shoka背景音乐无法播放的问题/index.html index 944a21425..dc5647031 100644 --- a/2022/09/26/解决Hexo-Shoka背景音乐无法播放的问题/index.html +++ b/2022/09/26/解决Hexo-Shoka背景音乐无法播放的问题/index.html @@ -1 +1 @@ -解决 Hexo+Shoka 背景音乐无法播放的问题 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 问题描述

今天突然发现博客的音乐无法播放了,经过一顿查找,发现是因为 https://api.i-meto.com/meting/api 获取的音乐地址出现了问题,估计是被网易云给封禁了。shoka 主题应该是通过这个网站提取音乐地址、图片等信息。通过断点发现网易播放列表还是能正常获取的,只是列表中的具体音乐、图片出现了问题。因为 meto 是把音乐的 url 指向自己的服务地址,然后通过参数获取的最终音乐,所以我通过参数拼凑出最终的网易云音乐地址,自此问题基本解决。只针对网易播放列表,图片只能使用一张固定的(因为图片的具体规律不知道 O (∩_∩) O~)。

# 解决方法

到 themes\shoka\source\js\_app 目录下打开 player.js 文件,替换成如下代码。

var NOWPLAYING = null
const isMobile = /mobile/i.test(window.navigator.userAgent);
const mediaPlayer = function (t, config) {
    var option = {
        type: 'audio',
        mode: 'random',
        btns: ['play-pause', 'music'],
        controls: ['mode', 'backward', 'play-pause', 'forward', 'volume'],
        events: {
            "play-pause": function (event) {
                if (source.paused) {
                    t.player.play()
                } else {
                    t.player.pause()
                }
            },
            "music": function (event) {
                if (info.el.hasClass('show')) {
                    info.hide()
                } else {
                    info.el.addClass('show');
                    playlist.scroll().title()
                }
            }
        }
    }, utils = {
        random: function (len) {
            return Math.floor((Math.random() * len))
        },
        parse: function (link) {
            var result = [];
            [
                ['music.163.com.*song.*id=(\\d+)', 'netease', 'song'],
                ['music.163.com.*album.*id=(\\d+)', 'netease', 'album'],
                ['music.163.com.*artist.*id=(\\d+)', 'netease', 'artist'],
                ['music.163.com.*playlist.*id=(\\d+)', 'netease', 'playlist'],
                ['music.163.com.*discover/toplist.*id=(\\d+)', 'netease', 'playlist'],
                ['y.qq.com.*song/(\\w+).html', 'tencent', 'song'],
                ['y.qq.com.*album/(\\w+).html', 'tencent', 'album'],
                ['y.qq.com.*singer/(\\w+).html', 'tencent', 'artist'],
                ['y.qq.com.*playsquare/(\\w+).html', 'tencent', 'playlist'],
                ['y.qq.com.*playlist/(\\w+).html', 'tencent', 'playlist'],
                ['xiami.com.*song/(\\w+)', 'xiami', 'song'],
                ['xiami.com.*album/(\\w+)', 'xiami', 'album'],
                ['xiami.com.*artist/(\\w+)', 'xiami', 'artist'],
                ['xiami.com.*collect/(\\w+)', 'xiami', 'playlist'],
            ].forEach(function (rule) {
                var patt = new RegExp(rule[0])
                var res = patt.exec(link)
                if (res !== null) {
                    result = [rule[1], rule[2], res[1]]
                }
            })
            return result
        },
        fetch: function (source) {
            var list = []
            return new Promise(function (resolve, reject) {
                source.forEach(function (raw) {
                    var meta = utils.parse(raw)
                    if (meta[0]) {
                        var skey = JSON.stringify(meta)
                        var playlist = store.get(skey)
                        if (playlist) {
                            // 自己修改 - start
                            var audioInfos = JSON.parse(playlist);
                            audioInfos.forEach(function (item, i) {
                                item.company = meta[0];
                            });
                            list.push.apply(list, audioInfos);
                            resolve(list);
                            // 自己修改 - end
                        } else {
                            fetch('https://api.i-meto.com/meting/api?server=' + meta[0] + '&type=' + meta[1] + '&id=' + meta[2] + '&r=' + Math.random())
                                .then(function (response) {
                                    return response.json()
                                }).then(function (json) {
                                    store.set(skey, JSON.stringify(json))
                                    list.push.apply(list, json);
                                    resolve(list);
                                }).catch(function (ex) { })
                        }
                    } else {
                        list.push(raw);
                        resolve(list);
                    }
                })
            })
        },
        secondToTime: function (second) {
            var add0 = function (num) {
                return isNaN(num) ? '00' : (num < 10 ? '0' + num : '' + num)
            };
            var hour = Math.floor(second / 3600);
            var min = Math.floor((second - hour * 3600) / 60);
            var sec = Math.floor(second - hour * 3600 - min * 60);
            return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':');
        },
        nameMap: {
            dragStart: isMobile ? 'touchstart' : 'mousedown',
            dragMove: isMobile ? 'touchmove' : 'mousemove',
            dragEnd: isMobile ? 'touchend' : 'mouseup',
        }
    }, source = null;
    t.player = {
        _id: utils.random(999999),
        group: true,
        // 加载播放列表
        load: function (newList) {
            var d = ""
            var that = this
            if (newList && newList.length > 0) {
                if (this.options.rawList !== newList) {
                    this.options.rawList = newList;
                    playlist.clear()
                    // 获取新列表
                    //this.fetch()
                }
            } else {
                // 没有列表时,隐藏按钮
                d = "none"
                this.pause()
            }
            for (var el in buttons.el) {
                buttons.el[el].display(d)
            }
            return this
        },
        fetch: function () {
            var that = this;
            return new Promise(function (resolve, reject) {
                if (playlist.data.length > 0) {
                    resolve()
                } else {
                    if (that.options.rawList) {
                        var promises = [];
                        that.options.rawList.forEach(function (raw, index) {
                            promises.push(new Promise(function (resolve, reject) {
                                var group = index
                                var source
                                if (!raw.list) {
                                    group = 0
                                    that.group = false
                                    source = [raw]
                                } else {
                                    that.group = true
                                    source = raw.list
                                }
                                utils.fetch(source).then(function (list) {
                                    playlist.add(group, list)
                                    resolve()
                                })
                            }))
                        })
                        Promise.all(promises).then(function () {
                            resolve(true)
                        })
                    }
                }
            }).then(function (c) {
                if (c) {
                    playlist.create()
                    controller.create()
                    that.mode()
                }
            })
        },
        // 根据模式切换当前曲目 index
        mode: function () {
            var total = playlist.data.length;
            if (!total || playlist.errnum == total)
                return;
            var step = controller.step == 'next' ? 1 : -1
            var next = function () {
                var index = playlist.index + step
                if (index > total || index < 0) {
                    index = controller.step == 'next' ? 0 : total - 1;
                }
                playlist.index = index;
            }
            var random = function () {
                var p = utils.random(total)
                if (playlist.index !== p) {
                    playlist.index = p
                } else {
                    next()
                }
            }
            switch (this.options.mode) {
                case 'random':
                    random()
                    break;
                case 'order':
                    next()
                    break;
                case 'loop':
                    if (controller.step)
                        next()
                    if (playlist.index == -1)
                        random()
                    break;
            }
            this.init()
        },
        // 直接设置当前曲目 index
        switch: function (index) {
            if (typeof index == 'number'
                && index != playlist.index
                && playlist.current()
                && !playlist.current().error) {
                playlist.index = index;
                this.init()
            }
        },
        // 更新 source 为当前曲目 index
        init: function () {
            var item = playlist.current()
            if (!item || item['error']) {
                this.mode();
                return;
            }
            var playing = false;
            if (!source.paused) {
                playing = true
                this.stop()
            }
            source.attr('src', item.url);
            source.attr('title', item.name + ' - ' + item.artist);
            this.volume(store.get('_PlayerVolume') || '0.7')
            this.muted(store.get('_PlayerMuted'))
            progress.create()
            if (this.options.type == 'audio')
                preview.create()
            if (playing == true) {
                this.play()
            }
        },
        play: function () {
            NOWPLAYING && NOWPLAYING.player.pause()
            if (playlist.current().error) {
                this.mode();
                return;
            }
            var that = this
            source.play().then(function () {
                playlist.scroll()
            }).catch(function (e) { });
        },
        pause: function () {
            source.pause()
            document.title = originTitle
        },
        stop: function () {
            source.pause();
            source.currentTime = 0;
            document.title = originTitle;
        },
        seek: function (time) {
            time = Math.max(time, 0)
            time = Math.min(time, source.duration)
            if (isNaN(time)) {
                time = 0;
            }
            source.currentTime = time;
            progress.update(time / source.duration)
        },
        muted: function (status) {
            if (status == 'muted') {
                source.muted = status
                store.set('_PlayerMuted', status)
                controller.update(0)
            } else {
                store.del('_PlayerMuted')
                source.muted = false
                controller.update(source.volume)
            }
        },
        volume: function (percentage) {
            if (!isNaN(percentage)) {
                controller.update(percentage)
                store.set('_PlayerVolume', percentage)
                source.volume = percentage
            }
        },
        mini: function () {
            info.hide()
        }
    };
    var info = {
        el: null,
        create: function () {
            if (this.el)
                return;
            this.el = t.createChild('div', {
                className: 'player-info',
                innerHTML: (t.player.options.type == 'audio' ? '<div class="preview"></div>' : '') + '<div class="controller"></div><div class="playlist"></div>'
            }, 'after');
            preview.el = this.el.child(".preview");
            playlist.el = this.el.child(".playlist");
            controller.el = this.el.child(".controller");
        },
        hide: function () {
            var el = this.el
            el.addClass('hide');
            window.setTimeout(function () {
                el.removeClass('show hide')
            }, 300);
        }
    }
    var playlist = {
        el: null,
        data: [],
        index: -1,
        errnum: 0,
        add: function (group, list) {
            var that = this
            list.forEach(function (item, i) {
                item.group = group;
                item.name = item.name || item.title || 'Meida name';
                item.artist = item.artist || item.author || 'Anonymous';
                item.cover = item.cover || item.pic;
                item.type = item.type || 'normal';
                that.data.push(item);
            });
        },
        clear: function () {
            this.data = []
            this.el.innerHTML = ""
            if (this.index !== -1) {
                this.index = -1
                t.player.fetch()
            }
        },
        create: function () {
            var el = this.el
            this.data.map(function (item, index) {
                if (item.el)
                    return
                var id = 'list-' + t.player._id + '-' + item.group
                var tab = $('#' + id)
                if (!tab) {
                    tab = el.createChild('div', {
                        id: id,
                        className: t.player.group ? 'tab' : '',
                        innerHTML: '<ol></ol>',
                    })
                    if (t.player.group) {
                        tab.attr('data-title', t.player.options.rawList[item.group]['title'])
                            .attr('data-id', t.player._id)
                    }
                }
                item.el = tab.child('ol').createChild('li', {
                    title: item.name + ' - ' + item.artist,
                    innerHTML: '<span class="info"><span>' + item.name + '</span><span>' + item.artist + '</span></span>',
                    onclick: function (event) {
                        var current = event.currentTarget;
                        if (playlist.index === index && progress.el) {
                            if (source.paused) {
                                t.player.play();
                            } else {
                                t.player.seek(source.duration * progress.percent(event, current))
                            }
                            return;
                        }
                        t.player.switch(index);
                        t.player.play();
                    }
                })
                return item
            })
            tabFormat()
        },
        current: function () {
            return this.data[this.index]
        },
        scroll: function () {
            var item = this.current()
            var li = this.el.child('li.active')
            li && li.removeClass('active')
            var tab = this.el.child('.tab.active')
            tab && tab.removeClass('active')
            li = this.el.find('.nav li')[item.group]
            li && li.addClass('active')
            tab = this.el.find('.tab')[item.group]
            tab && tab.addClass('active')
            pageScroll(item.el, item.el.offsetTop)
            return this
        },
        title: function () {
            if (source.paused)
                return
            var current = this.current()
            document.title = 'Now Playing...' + current['name'] + ' - ' + current['artist'] + ' | ' + originTitle;
        },
        error: function () {
            var current = this.current()
            current.el.removeClass('current').addClass('error')
            current.error = true
            this.errnum++
        }
    }
    var lyrics = {
        el: null,
        data: null,
        index: 0,
        create: function (box) {
            var current = playlist.index
            var that = this
            var raw = playlist.current().lrc
            var callback = function (body) {
                if (current !== playlist.index)
                    return;
                that.data = that.parse(body)
                var lrc = ''
                that.data.forEach(function (line, index) {
                    lrc += '<p' + (index === 0 ? ' class="current"' : '') + '>' + line[1] + '</p>';
                })
                that.el = box.createChild('div', {
                    className: 'inner',
                    innerHTML: lrc
                }, 'replace')
                that.index = 0;
            }
            if (raw && raw.startsWith('http'))
                this.fetch(raw, callback)
            else
                callback(raw)
        },
        update: function (currentTime) {
            if (!this.data)
                return
            if (this.index > this.data.length - 1 || currentTime < this.data[this.index][0] || (!this.data[this.index + 1] || currentTime >= this.data[this.index + 1][0])) {
                for (var i = 0; i < this.data.length; i++) {
                    if (currentTime >= this.data[i][0] && (!this.data[i + 1] || currentTime < this.data[i + 1][0])) {
                        this.index = i;
                        var y = -(this.index - 1);
                        this.el.style.transform = 'translateY(' + y + 'rem)';
                        this.el.style.webkitTransform = 'translateY(' + y + 'rem)';
                        this.el.getElementsByClassName('current')[0].removeClass('current');
                        this.el.getElementsByTagName('p')[i].addClass('current');
                    }
                }
            }
        },
        parse: function (lrc_s) {
            if (lrc_s) {
                lrc_s = lrc_s.replace(/([^\]^\n])\[/g, function (match, p1) { return p1 + '\n[' });
                const lyric = lrc_s.split('\n');
                var lrc = [];
                const lyricLen = lyric.length;
                for (var i = 0; i < lyricLen; i++) {
                    // match lrc time
                    const lrcTimes = lyric[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g);
                    // match lrc text
                    const lrcText = lyric[i]
                        .replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g, '')
                        .replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, '')
                        .replace(/^\s+|\s+$/g, '');
                    if (lrcTimes) {
                        // handle multiple time tag
                        const timeLen = lrcTimes.length;
                        for (var j = 0; j < timeLen; j++) {
                            const oneTime = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(lrcTimes[j]);
                            const min2sec = oneTime[1] * 60;
                            const sec2sec = parseInt(oneTime[2]);
                            const msec2sec = oneTime[4] ? parseInt(oneTime[4]) / ((oneTime[4] + '').length === 2 ? 100 : 1000) : 0;
                            const lrcTime = min2sec + sec2sec + msec2sec;
                            lrc.push([lrcTime, lrcText]);
                        }
                    }
                }
                // sort by time
                lrc = lrc.filter(function (item) { return item[1] });
                lrc.sort(function (a, b) { return a[0] - b[0] });
                return lrc;
            } else {
                return [];
            }
        },
        fetch: function (url, callback) {
            fetch(url)
                .then(function (response) {
                    return response.text()
                }).then(function (body) {
                    callback(body)
                }).catch(function (ex) { })
        }
    }
    var preview = {
        el: null,
        create: function () {
            var current = playlist.current()
            this.el.innerHTML = '<div class="cover"><div class="disc"><img src="' + (current.cover) + '" class="blur" /></div></div>'
                + '<div class="info"><h4 class="title">' + current.name + '</h4><span>' + current.artist + '</span>'
                + '<div class="lrc"></div></div>'
            this.el.child('.cover').addEventListener('click', t.player.options.events['play-pause'])
            lyrics.create(this.el.child('.lrc'))
        }
    }
    var progress = {
        el: null,
        bar: null,
        create: function () {
            var current = playlist.current().el
            if (current) {
                if (this.el) {
                    this.el.parentNode.removeClass('current')
                        .removeEventListener(utils.nameMap.dragStart, this.drag)
                    this.el.remove()
                }
                this.el = current.createChild('div', {
                    className: 'progress'
                })
                this.el.attr('data-dtime', utils.secondToTime(0))
                this.bar = this.el.createChild('div', {
                    className: 'bar',
                })
                current.addClass('current')
                current.addEventListener(utils.nameMap.dragStart, this.drag);
                playlist.scroll()
            }
        },
        update: function (percent) {
            this.bar.width(Math.floor(percent * 100) + '%')
            this.el.attr('data-ptime', utils.secondToTime(percent * source.duration))
        },
        seeking: function (type) {
            if (type)
                this.el.addClass('seeking')
            else
                this.el.removeClass('seeking')
        },
        percent: function (e, el) {
            var percentage = ((e.clientX || e.changedTouches[0].clientX) - el.left()) / el.width();
            percentage = Math.max(percentage, 0);
            return Math.min(percentage, 1)
        },
        drag: function (e) {
            e.preventDefault()
            var current = playlist.current().el
            var thumbMove = function (e) {
                e.preventDefault()
                var percentage = progress.percent(e, current)
                progress.update(percentage)
                lyrics.update(percentage * source.duration);
            };
            var thumbUp = function (e) {
                e.preventDefault()
                current.removeEventListener(utils.nameMap.dragEnd, thumbUp)
                current.removeEventListener(utils.nameMap.dragMove, thumbMove)
                var percentage = progress.percent(e, current)
                progress.update(percentage)
                t.player.seek(percentage * source.duration)
                source.disableTimeupdate = false
                progress.seeking(false)
            };
            source.disableTimeupdate = true
            progress.seeking(true)
            current.addEventListener(utils.nameMap.dragMove, thumbMove)
            current.addEventListener(utils.nameMap.dragEnd, thumbUp)
        }
    }
    var controller = {
        el: null,
        btns: {},
        step: 'next',
        create: function () {
            if (!t.player.options.controls)
                return
            var that = this
            t.player.options.controls.forEach(function (item) {
                if (that.btns[item])
                    return;
                var opt = {
                    onclick: function (event) {
                        that.events[item] ? that.events[item](event) : t.player.options.events[item](event)
                    }
                }
                switch (item) {
                    case 'volume':
                        opt.className = ' ' + (source.muted ? 'off' : 'on')
                        opt.innerHTML = '<div class="bar"></div>'
                        opt['on' + utils.nameMap.dragStart] = that.events['volume']
                        opt.onclick = null
                        break;
                    case 'mode':
                        opt.className = ' ' + t.player.options.mode
                        break;
                    default:
                        opt.className = ''
                        break;
                }
                opt.className = item + opt.className + ' btn'
                that.btns[item] = that.el.createChild('div', opt)
            })
            that.btns['volume'].bar = that.btns['volume'].child('.bar')
        },
        events: {
            mode: function (e) {
                switch (t.player.options.mode) {
                    case 'loop':
                        t.player.options.mode = 'random'
                        break;
                    case 'random':
                        t.player.options.mode = 'order'
                        break;
                    default:
                        t.player.options.mode = 'loop'
                }
                controller.btns['mode'].className = 'mode ' + t.player.options.mode + ' btn'
                store.set('_PlayerMode', t.player.options.mode)
            },
            volume: function (e) {
                e.preventDefault()
                var current = e.currentTarget
                var drag = false
                var thumbMove = function (e) {
                    e.preventDefault()
                    t.player.volume(controller.percent(e, current))
                    drag = true
                };
                var thumbUp = function (e) {
                    e.preventDefault()
                    current.removeEventListener(utils.nameMap.dragEnd, thumbUp)
                    current.removeEventListener(utils.nameMap.dragMove, thumbMove)
                    if (drag) {
                        t.player.muted()
                        t.player.volume(controller.percent(e, current))
                    } else {
                        if (source.muted) {
                            t.player.muted()
                            t.player.volume(source.volume)
                        } else {
                            t.player.muted('muted')
                            controller.update(0)
                        }
                    }
                };
                current.addEventListener(utils.nameMap.dragMove, thumbMove)
                current.addEventListener(utils.nameMap.dragEnd, thumbUp)
            },
            backward: function (e) {
                controller.step = 'prev'
                t.player.mode()
            },
            forward: function (e) {
                controller.step = 'next'
                t.player.mode()
            },
        },
        update: function (percent) {
            controller.btns['volume'].className = 'volume ' + (!source.muted && percent > 0 ? 'on' : 'off') + ' btn'
            controller.btns['volume'].bar.width(Math.floor(percent * 100) + '%')
        },
        percent: function (e, el) {
            var percentage = ((e.clientX || e.changedTouches[0].clientX) - el.left()) / el.width();
            percentage = Math.max(percentage, 0);
            return Math.min(percentage, 1);
        }
    }
    var events = {
        onerror: function () {
            // 自己修改 - start
            var item = playlist.current();
            if (!item.repair && item.company && item.company == "netease") {
                var id = item.url.substring(item.url.indexOf("id=") + 3, item.url.indexOf("&auth="));
                item.url = "https://music.163.com/song/media/outer/url?id=" + id; // 修正的网易云 url
                item.pic = "https://p3.music.126.net/Vji3PQJAZ2C7gS_6X51NFQ==/109951164723650033.jpg?param=200y200"; // 使用网易云上固定的一张封面
                item.cover = item.pic;
                item.repair = true; // 已修正
                t.player.init(); // 重新播放
            } else {
                playlist.error()
                t.player.mode()
            }
            // 自己修改 - end
        },
        ondurationchange: function () {
            if (source.duration !== 1) {
                progress.el.attr('data-dtime', utils.secondToTime(source.duration))
            }
        },
        onloadedmetadata: function () {
            t.player.seek(0)
            progress.el.attr('data-dtime', utils.secondToTime(source.duration))
        },
        onplay: function () {
            t.parentNode.addClass('playing')
            showtip(this.attr('title'))
            NOWPLAYING = t
        },
        onpause: function () {
            t.parentNode.removeClass('playing')
            NOWPLAYING = null
        },
        ontimeupdate: function () {
            if (!this.disableTimeupdate) {
                progress.update(this.currentTime / this.duration)
                lyrics.update(this.currentTime)
            }
        },
        onended: function (argument) {
            t.player.mode()
            t.player.play()
        }
    }
    var buttons = {
        el: {},
        create: function () {
            if (!t.player.options.btns)
                return
            var that = this
            t.player.options.btns.forEach(function (item) {
                if (that.el[item])
                    return;
                that.el[item] = t.createChild('div', {
                    className: item + ' btn',
                    onclick: function (event) {
                        t.player.fetch().then(function () {
                            t.player.options.events[item](event)
                        })
                    }
                });
            });
        }
    }
    var init = function (config) {
        if (t.player.created)
            return;
        t.player.options = Object.assign(option, config);
        t.player.options.mode = store.get('_PlayerMode') || t.player.options.mode
        // 初始化 button、controls 以及 click 事件
        buttons.create()
        // 初始化 audio or video
        source = t.createChild(t.player.options.type, events);
        // 初始化播放列表、预览、控件按钮等
        info.create();
        t.parentNode.addClass(t.player.options.type)
        t.player.created = true;
    }
    init(config)
    return t;
}
\ No newline at end of file +解决 Hexo+Shoka 背景音乐无法播放的问题 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 问题描述

今天突然发现博客的音乐无法播放了,经过一顿查找,发现是因为 https://api.i-meto.com/meting/api 获取的音乐地址出现了问题,估计是被网易云给封禁了。shoka 主题应该是通过这个网站提取音乐地址、图片等信息。通过断点发现网易播放列表还是能正常获取的,只是列表中的具体音乐、图片出现了问题。因为 meto 是把音乐的 url 指向自己的服务地址,然后通过参数获取的最终音乐,所以我通过参数拼凑出最终的网易云音乐地址,自此问题基本解决。只针对网易播放列表,图片只能使用一张固定的(因为图片的具体规律不知道 O (∩_∩) O~)。

# 解决方法

到 themes\shoka\source\js\_app 目录下打开 player.js 文件,替换成如下代码。

var NOWPLAYING = null
const isMobile = /mobile/i.test(window.navigator.userAgent);
const mediaPlayer = function (t, config) {
    var option = {
        type: 'audio',
        mode: 'random',
        btns: ['play-pause', 'music'],
        controls: ['mode', 'backward', 'play-pause', 'forward', 'volume'],
        events: {
            "play-pause": function (event) {
                if (source.paused) {
                    t.player.play()
                } else {
                    t.player.pause()
                }
            },
            "music": function (event) {
                if (info.el.hasClass('show')) {
                    info.hide()
                } else {
                    info.el.addClass('show');
                    playlist.scroll().title()
                }
            }
        }
    }, utils = {
        random: function (len) {
            return Math.floor((Math.random() * len))
        },
        parse: function (link) {
            var result = [];
            [
                ['music.163.com.*song.*id=(\\d+)', 'netease', 'song'],
                ['music.163.com.*album.*id=(\\d+)', 'netease', 'album'],
                ['music.163.com.*artist.*id=(\\d+)', 'netease', 'artist'],
                ['music.163.com.*playlist.*id=(\\d+)', 'netease', 'playlist'],
                ['music.163.com.*discover/toplist.*id=(\\d+)', 'netease', 'playlist'],
                ['y.qq.com.*song/(\\w+).html', 'tencent', 'song'],
                ['y.qq.com.*album/(\\w+).html', 'tencent', 'album'],
                ['y.qq.com.*singer/(\\w+).html', 'tencent', 'artist'],
                ['y.qq.com.*playsquare/(\\w+).html', 'tencent', 'playlist'],
                ['y.qq.com.*playlist/(\\w+).html', 'tencent', 'playlist'],
                ['xiami.com.*song/(\\w+)', 'xiami', 'song'],
                ['xiami.com.*album/(\\w+)', 'xiami', 'album'],
                ['xiami.com.*artist/(\\w+)', 'xiami', 'artist'],
                ['xiami.com.*collect/(\\w+)', 'xiami', 'playlist'],
            ].forEach(function (rule) {
                var patt = new RegExp(rule[0])
                var res = patt.exec(link)
                if (res !== null) {
                    result = [rule[1], rule[2], res[1]]
                }
            })
            return result
        },
        fetch: function (source) {
            var list = []
            return new Promise(function (resolve, reject) {
                source.forEach(function (raw) {
                    var meta = utils.parse(raw)
                    if (meta[0]) {
                        var skey = JSON.stringify(meta)
                        var playlist = store.get(skey)
                        if (playlist) {
                            // 自己修改 - start
                            var audioInfos = JSON.parse(playlist);
                            audioInfos.forEach(function (item, i) {
                                item.company = meta[0];
                            });
                            list.push.apply(list, audioInfos);
                            resolve(list);
                            // 自己修改 - end
                        } else {
                            fetch('https://api.i-meto.com/meting/api?server=' + meta[0] + '&type=' + meta[1] + '&id=' + meta[2] + '&r=' + Math.random())
                                .then(function (response) {
                                    return response.json()
                                }).then(function (json) {
                                    store.set(skey, JSON.stringify(json))
                                    list.push.apply(list, json);
                                    resolve(list);
                                }).catch(function (ex) { })
                        }
                    } else {
                        list.push(raw);
                        resolve(list);
                    }
                })
            })
        },
        secondToTime: function (second) {
            var add0 = function (num) {
                return isNaN(num) ? '00' : (num < 10 ? '0' + num : '' + num)
            };
            var hour = Math.floor(second / 3600);
            var min = Math.floor((second - hour * 3600) / 60);
            var sec = Math.floor(second - hour * 3600 - min * 60);
            return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':');
        },
        nameMap: {
            dragStart: isMobile ? 'touchstart' : 'mousedown',
            dragMove: isMobile ? 'touchmove' : 'mousemove',
            dragEnd: isMobile ? 'touchend' : 'mouseup',
        }
    }, source = null;
    t.player = {
        _id: utils.random(999999),
        group: true,
        // 加载播放列表
        load: function (newList) {
            var d = ""
            var that = this
            if (newList && newList.length > 0) {
                if (this.options.rawList !== newList) {
                    this.options.rawList = newList;
                    playlist.clear()
                    // 获取新列表
                    //this.fetch()
                }
            } else {
                // 没有列表时,隐藏按钮
                d = "none"
                this.pause()
            }
            for (var el in buttons.el) {
                buttons.el[el].display(d)
            }
            return this
        },
        fetch: function () {
            var that = this;
            return new Promise(function (resolve, reject) {
                if (playlist.data.length > 0) {
                    resolve()
                } else {
                    if (that.options.rawList) {
                        var promises = [];
                        that.options.rawList.forEach(function (raw, index) {
                            promises.push(new Promise(function (resolve, reject) {
                                var group = index
                                var source
                                if (!raw.list) {
                                    group = 0
                                    that.group = false
                                    source = [raw]
                                } else {
                                    that.group = true
                                    source = raw.list
                                }
                                utils.fetch(source).then(function (list) {
                                    playlist.add(group, list)
                                    resolve()
                                })
                            }))
                        })
                        Promise.all(promises).then(function () {
                            resolve(true)
                        })
                    }
                }
            }).then(function (c) {
                if (c) {
                    playlist.create()
                    controller.create()
                    that.mode()
                }
            })
        },
        // 根据模式切换当前曲目 index
        mode: function () {
            var total = playlist.data.length;
            if (!total || playlist.errnum == total)
                return;
            var step = controller.step == 'next' ? 1 : -1
            var next = function () {
                var index = playlist.index + step
                if (index > total || index < 0) {
                    index = controller.step == 'next' ? 0 : total - 1;
                }
                playlist.index = index;
            }
            var random = function () {
                var p = utils.random(total)
                if (playlist.index !== p) {
                    playlist.index = p
                } else {
                    next()
                }
            }
            switch (this.options.mode) {
                case 'random':
                    random()
                    break;
                case 'order':
                    next()
                    break;
                case 'loop':
                    if (controller.step)
                        next()
                    if (playlist.index == -1)
                        random()
                    break;
            }
            this.init()
        },
        // 直接设置当前曲目 index
        switch: function (index) {
            if (typeof index == 'number'
                && index != playlist.index
                && playlist.current()
                && !playlist.current().error) {
                playlist.index = index;
                this.init()
            }
        },
        // 更新 source 为当前曲目 index
        init: function () {
            var item = playlist.current()
            if (!item || item['error']) {
                this.mode();
                return;
            }
            var playing = false;
            if (!source.paused) {
                playing = true
                this.stop()
            }
            source.attr('src', item.url);
            source.attr('title', item.name + ' - ' + item.artist);
            this.volume(store.get('_PlayerVolume') || '0.7')
            this.muted(store.get('_PlayerMuted'))
            progress.create()
            if (this.options.type == 'audio')
                preview.create()
            if (playing == true) {
                this.play()
            }
        },
        play: function () {
            NOWPLAYING && NOWPLAYING.player.pause()
            if (playlist.current().error) {
                this.mode();
                return;
            }
            var that = this
            source.play().then(function () {
                playlist.scroll()
            }).catch(function (e) { });
        },
        pause: function () {
            source.pause()
            document.title = originTitle
        },
        stop: function () {
            source.pause();
            source.currentTime = 0;
            document.title = originTitle;
        },
        seek: function (time) {
            time = Math.max(time, 0)
            time = Math.min(time, source.duration)
            if (isNaN(time)) {
                time = 0;
            }
            source.currentTime = time;
            progress.update(time / source.duration)
        },
        muted: function (status) {
            if (status == 'muted') {
                source.muted = status
                store.set('_PlayerMuted', status)
                controller.update(0)
            } else {
                store.del('_PlayerMuted')
                source.muted = false
                controller.update(source.volume)
            }
        },
        volume: function (percentage) {
            if (!isNaN(percentage)) {
                controller.update(percentage)
                store.set('_PlayerVolume', percentage)
                source.volume = percentage
            }
        },
        mini: function () {
            info.hide()
        }
    };
    var info = {
        el: null,
        create: function () {
            if (this.el)
                return;
            this.el = t.createChild('div', {
                className: 'player-info',
                innerHTML: (t.player.options.type == 'audio' ? '<div class="preview"></div>' : '') + '<div class="controller"></div><div class="playlist"></div>'
            }, 'after');
            preview.el = this.el.child(".preview");
            playlist.el = this.el.child(".playlist");
            controller.el = this.el.child(".controller");
        },
        hide: function () {
            var el = this.el
            el.addClass('hide');
            window.setTimeout(function () {
                el.removeClass('show hide')
            }, 300);
        }
    }
    var playlist = {
        el: null,
        data: [],
        index: -1,
        errnum: 0,
        add: function (group, list) {
            var that = this
            list.forEach(function (item, i) {
                item.group = group;
                item.name = item.name || item.title || 'Meida name';
                item.artist = item.artist || item.author || 'Anonymous';
                item.cover = item.cover || item.pic;
                item.type = item.type || 'normal';
                that.data.push(item);
            });
        },
        clear: function () {
            this.data = []
            this.el.innerHTML = ""
            if (this.index !== -1) {
                this.index = -1
                t.player.fetch()
            }
        },
        create: function () {
            var el = this.el
            this.data.map(function (item, index) {
                if (item.el)
                    return
                var id = 'list-' + t.player._id + '-' + item.group
                var tab = $('#' + id)
                if (!tab) {
                    tab = el.createChild('div', {
                        id: id,
                        className: t.player.group ? 'tab' : '',
                        innerHTML: '<ol></ol>',
                    })
                    if (t.player.group) {
                        tab.attr('data-title', t.player.options.rawList[item.group]['title'])
                            .attr('data-id', t.player._id)
                    }
                }
                item.el = tab.child('ol').createChild('li', {
                    title: item.name + ' - ' + item.artist,
                    innerHTML: '<span class="info"><span>' + item.name + '</span><span>' + item.artist + '</span></span>',
                    onclick: function (event) {
                        var current = event.currentTarget;
                        if (playlist.index === index && progress.el) {
                            if (source.paused) {
                                t.player.play();
                            } else {
                                t.player.seek(source.duration * progress.percent(event, current))
                            }
                            return;
                        }
                        t.player.switch(index);
                        t.player.play();
                    }
                })
                return item
            })
            tabFormat()
        },
        current: function () {
            return this.data[this.index]
        },
        scroll: function () {
            var item = this.current()
            var li = this.el.child('li.active')
            li && li.removeClass('active')
            var tab = this.el.child('.tab.active')
            tab && tab.removeClass('active')
            li = this.el.find('.nav li')[item.group]
            li && li.addClass('active')
            tab = this.el.find('.tab')[item.group]
            tab && tab.addClass('active')
            pageScroll(item.el, item.el.offsetTop)
            return this
        },
        title: function () {
            if (source.paused)
                return
            var current = this.current()
            document.title = 'Now Playing...' + current['name'] + ' - ' + current['artist'] + ' | ' + originTitle;
        },
        error: function () {
            var current = this.current()
            current.el.removeClass('current').addClass('error')
            current.error = true
            this.errnum++
        }
    }
    var lyrics = {
        el: null,
        data: null,
        index: 0,
        create: function (box) {
            var current = playlist.index
            var that = this
            var raw = playlist.current().lrc
            var callback = function (body) {
                if (current !== playlist.index)
                    return;
                that.data = that.parse(body)
                var lrc = ''
                that.data.forEach(function (line, index) {
                    lrc += '<p' + (index === 0 ? ' class="current"' : '') + '>' + line[1] + '</p>';
                })
                that.el = box.createChild('div', {
                    className: 'inner',
                    innerHTML: lrc
                }, 'replace')
                that.index = 0;
            }
            if (raw && raw.startsWith('http'))
                this.fetch(raw, callback)
            else
                callback(raw)
        },
        update: function (currentTime) {
            if (!this.data)
                return
            if (this.index > this.data.length - 1 || currentTime < this.data[this.index][0] || (!this.data[this.index + 1] || currentTime >= this.data[this.index + 1][0])) {
                for (var i = 0; i < this.data.length; i++) {
                    if (currentTime >= this.data[i][0] && (!this.data[i + 1] || currentTime < this.data[i + 1][0])) {
                        this.index = i;
                        var y = -(this.index - 1);
                        this.el.style.transform = 'translateY(' + y + 'rem)';
                        this.el.style.webkitTransform = 'translateY(' + y + 'rem)';
                        this.el.getElementsByClassName('current')[0].removeClass('current');
                        this.el.getElementsByTagName('p')[i].addClass('current');
                    }
                }
            }
        },
        parse: function (lrc_s) {
            if (lrc_s) {
                lrc_s = lrc_s.replace(/([^\]^\n])\[/g, function (match, p1) { return p1 + '\n[' });
                const lyric = lrc_s.split('\n');
                var lrc = [];
                const lyricLen = lyric.length;
                for (var i = 0; i < lyricLen; i++) {
                    // match lrc time
                    const lrcTimes = lyric[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g);
                    // match lrc text
                    const lrcText = lyric[i]
                        .replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g, '')
                        .replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, '')
                        .replace(/^\s+|\s+$/g, '');
                    if (lrcTimes) {
                        // handle multiple time tag
                        const timeLen = lrcTimes.length;
                        for (var j = 0; j < timeLen; j++) {
                            const oneTime = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(lrcTimes[j]);
                            const min2sec = oneTime[1] * 60;
                            const sec2sec = parseInt(oneTime[2]);
                            const msec2sec = oneTime[4] ? parseInt(oneTime[4]) / ((oneTime[4] + '').length === 2 ? 100 : 1000) : 0;
                            const lrcTime = min2sec + sec2sec + msec2sec;
                            lrc.push([lrcTime, lrcText]);
                        }
                    }
                }
                // sort by time
                lrc = lrc.filter(function (item) { return item[1] });
                lrc.sort(function (a, b) { return a[0] - b[0] });
                return lrc;
            } else {
                return [];
            }
        },
        fetch: function (url, callback) {
            fetch(url)
                .then(function (response) {
                    return response.text()
                }).then(function (body) {
                    callback(body)
                }).catch(function (ex) { })
        }
    }
    var preview = {
        el: null,
        create: function () {
            var current = playlist.current()
            this.el.innerHTML = '<div class="cover"><div class="disc"><img src="' + (current.cover) + '" class="blur" /></div></div>'
                + '<div class="info"><h4 class="title">' + current.name + '</h4><span>' + current.artist + '</span>'
                + '<div class="lrc"></div></div>'
            this.el.child('.cover').addEventListener('click', t.player.options.events['play-pause'])
            lyrics.create(this.el.child('.lrc'))
        }
    }
    var progress = {
        el: null,
        bar: null,
        create: function () {
            var current = playlist.current().el
            if (current) {
                if (this.el) {
                    this.el.parentNode.removeClass('current')
                        .removeEventListener(utils.nameMap.dragStart, this.drag)
                    this.el.remove()
                }
                this.el = current.createChild('div', {
                    className: 'progress'
                })
                this.el.attr('data-dtime', utils.secondToTime(0))
                this.bar = this.el.createChild('div', {
                    className: 'bar',
                })
                current.addClass('current')
                current.addEventListener(utils.nameMap.dragStart, this.drag);
                playlist.scroll()
            }
        },
        update: function (percent) {
            this.bar.width(Math.floor(percent * 100) + '%')
            this.el.attr('data-ptime', utils.secondToTime(percent * source.duration))
        },
        seeking: function (type) {
            if (type)
                this.el.addClass('seeking')
            else
                this.el.removeClass('seeking')
        },
        percent: function (e, el) {
            var percentage = ((e.clientX || e.changedTouches[0].clientX) - el.left()) / el.width();
            percentage = Math.max(percentage, 0);
            return Math.min(percentage, 1)
        },
        drag: function (e) {
            e.preventDefault()
            var current = playlist.current().el
            var thumbMove = function (e) {
                e.preventDefault()
                var percentage = progress.percent(e, current)
                progress.update(percentage)
                lyrics.update(percentage * source.duration);
            };
            var thumbUp = function (e) {
                e.preventDefault()
                current.removeEventListener(utils.nameMap.dragEnd, thumbUp)
                current.removeEventListener(utils.nameMap.dragMove, thumbMove)
                var percentage = progress.percent(e, current)
                progress.update(percentage)
                t.player.seek(percentage * source.duration)
                source.disableTimeupdate = false
                progress.seeking(false)
            };
            source.disableTimeupdate = true
            progress.seeking(true)
            current.addEventListener(utils.nameMap.dragMove, thumbMove)
            current.addEventListener(utils.nameMap.dragEnd, thumbUp)
        }
    }
    var controller = {
        el: null,
        btns: {},
        step: 'next',
        create: function () {
            if (!t.player.options.controls)
                return
            var that = this
            t.player.options.controls.forEach(function (item) {
                if (that.btns[item])
                    return;
                var opt = {
                    onclick: function (event) {
                        that.events[item] ? that.events[item](event) : t.player.options.events[item](event)
                    }
                }
                switch (item) {
                    case 'volume':
                        opt.className = ' ' + (source.muted ? 'off' : 'on')
                        opt.innerHTML = '<div class="bar"></div>'
                        opt['on' + utils.nameMap.dragStart] = that.events['volume']
                        opt.onclick = null
                        break;
                    case 'mode':
                        opt.className = ' ' + t.player.options.mode
                        break;
                    default:
                        opt.className = ''
                        break;
                }
                opt.className = item + opt.className + ' btn'
                that.btns[item] = that.el.createChild('div', opt)
            })
            that.btns['volume'].bar = that.btns['volume'].child('.bar')
        },
        events: {
            mode: function (e) {
                switch (t.player.options.mode) {
                    case 'loop':
                        t.player.options.mode = 'random'
                        break;
                    case 'random':
                        t.player.options.mode = 'order'
                        break;
                    default:
                        t.player.options.mode = 'loop'
                }
                controller.btns['mode'].className = 'mode ' + t.player.options.mode + ' btn'
                store.set('_PlayerMode', t.player.options.mode)
            },
            volume: function (e) {
                e.preventDefault()
                var current = e.currentTarget
                var drag = false
                var thumbMove = function (e) {
                    e.preventDefault()
                    t.player.volume(controller.percent(e, current))
                    drag = true
                };
                var thumbUp = function (e) {
                    e.preventDefault()
                    current.removeEventListener(utils.nameMap.dragEnd, thumbUp)
                    current.removeEventListener(utils.nameMap.dragMove, thumbMove)
                    if (drag) {
                        t.player.muted()
                        t.player.volume(controller.percent(e, current))
                    } else {
                        if (source.muted) {
                            t.player.muted()
                            t.player.volume(source.volume)
                        } else {
                            t.player.muted('muted')
                            controller.update(0)
                        }
                    }
                };
                current.addEventListener(utils.nameMap.dragMove, thumbMove)
                current.addEventListener(utils.nameMap.dragEnd, thumbUp)
            },
            backward: function (e) {
                controller.step = 'prev'
                t.player.mode()
            },
            forward: function (e) {
                controller.step = 'next'
                t.player.mode()
            },
        },
        update: function (percent) {
            controller.btns['volume'].className = 'volume ' + (!source.muted && percent > 0 ? 'on' : 'off') + ' btn'
            controller.btns['volume'].bar.width(Math.floor(percent * 100) + '%')
        },
        percent: function (e, el) {
            var percentage = ((e.clientX || e.changedTouches[0].clientX) - el.left()) / el.width();
            percentage = Math.max(percentage, 0);
            return Math.min(percentage, 1);
        }
    }
    var events = {
        onerror: function () {
            // 自己修改 - start
            var item = playlist.current();
            if (!item.repair && item.company && item.company == "netease") {
                var id = item.url.substring(item.url.indexOf("id=") + 3, item.url.indexOf("&auth="));
                item.url = "https://music.163.com/song/media/outer/url?id=" + id; // 修正的网易云 url
                item.pic = "https://p3.music.126.net/Vji3PQJAZ2C7gS_6X51NFQ==/109951164723650033.jpg?param=200y200"; // 使用网易云上固定的一张封面
                item.cover = item.pic;
                item.repair = true; // 已修正
                t.player.init(); // 重新播放
            } else {
                playlist.error()
                t.player.mode()
            }
            // 自己修改 - end
        },
        ondurationchange: function () {
            if (source.duration !== 1) {
                progress.el.attr('data-dtime', utils.secondToTime(source.duration))
            }
        },
        onloadedmetadata: function () {
            t.player.seek(0)
            progress.el.attr('data-dtime', utils.secondToTime(source.duration))
        },
        onplay: function () {
            t.parentNode.addClass('playing')
            showtip(this.attr('title'))
            NOWPLAYING = t
        },
        onpause: function () {
            t.parentNode.removeClass('playing')
            NOWPLAYING = null
        },
        ontimeupdate: function () {
            if (!this.disableTimeupdate) {
                progress.update(this.currentTime / this.duration)
                lyrics.update(this.currentTime)
            }
        },
        onended: function (argument) {
            t.player.mode()
            t.player.play()
        }
    }
    var buttons = {
        el: {},
        create: function () {
            if (!t.player.options.btns)
                return
            var that = this
            t.player.options.btns.forEach(function (item) {
                if (that.el[item])
                    return;
                that.el[item] = t.createChild('div', {
                    className: item + ' btn',
                    onclick: function (event) {
                        t.player.fetch().then(function () {
                            t.player.options.events[item](event)
                        })
                    }
                });
            });
        }
    }
    var init = function (config) {
        if (t.player.created)
            return;
        t.player.options = Object.assign(option, config);
        t.player.options.mode = store.get('_PlayerMode') || t.player.options.mode
        // 初始化 button、controls 以及 click 事件
        buttons.create()
        // 初始化 audio or video
        source = t.createChild(t.player.options.type, events);
        // 初始化播放列表、预览、控件按钮等
        info.create();
        t.parentNode.addClass(t.player.options.type)
        t.player.created = true;
    }
    init(config)
    return t;
}
\ No newline at end of file diff --git a/2022/09/27/nginx负载均衡配置/index.html b/2022/09/27/nginx负载均衡配置/index.html index 9e5d8d943..69fe8fd13 100644 --- a/2022/09/27/nginx负载均衡配置/index.html +++ b/2022/09/27/nginx负载均衡配置/index.html @@ -1 +1 @@ -nginx 负载均衡配置 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# nginx 负载均衡配置

  1. 轮询(默认)

每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器 down 掉,能自动剔除。

upstream my_server {
	server 192.168.0.2:8080;
	server 192.168.0.3:8080;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. weight 权重策略

weight 代表权重,默认为 1,权重越高被分配的客户端越多,指定轮询几率。weight 和访问比率成正比,用于后端服务器性能不均的情况。

upstream my_server {
	server 192.168.0.2:8080 weight=1;
	server 192.168.0.3:8080 weight=2;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. ip_hash

每个请求按访问 ip 的 hash 结果分配,这样每个访客固定访问一个后端服务器,可以解决 session 的问题。

upstream my_server {
	ip_hash;
	server 192.168.0.2:8080;
	server 192.168.0.3:8080;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. fair (第三方)

按后端服务器的响应时间来分配请求,响应时间短的优先分配。

upstream my_server {
	server 192.168.0.2:8080;
	server 192.168.0.3:8080;
	fair;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. 动静分离

把静态的资源,比如图片,css,js 等先加载到 Nginx 的服务器里。

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +nginx 负载均衡配置 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# nginx 负载均衡配置

  1. 轮询(默认)

每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器 down 掉,能自动剔除。

upstream my_server {
	server 192.168.0.2:8080;
	server 192.168.0.3:8080;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. weight 权重策略

weight 代表权重,默认为 1,权重越高被分配的客户端越多,指定轮询几率。weight 和访问比率成正比,用于后端服务器性能不均的情况。

upstream my_server {
	server 192.168.0.2:8080 weight=1;
	server 192.168.0.3:8080 weight=2;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. ip_hash

每个请求按访问 ip 的 hash 结果分配,这样每个访客固定访问一个后端服务器,可以解决 session 的问题。

upstream my_server {
	ip_hash;
	server 192.168.0.2:8080;
	server 192.168.0.3:8080;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. fair (第三方)

按后端服务器的响应时间来分配请求,响应时间短的优先分配。

upstream my_server {
	server 192.168.0.2:8080;
	server 192.168.0.3:8080;
	fair;
}
server {
	listen 80;
	server_name 192.168.0.1;
	# Path to the root of your installation
	location / {
		proxy_pass http://my_server;
	}
	
}
  1. 动静分离

把静态的资源,比如图片,css,js 等先加载到 Nginx 的服务器里。

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/09/28/深深的挫败和无助感/index.html b/2022/09/28/深深的挫败和无助感/index.html index 99ce01b0c..1b7c2c65e 100644 --- a/2022/09/28/深深的挫败和无助感/index.html +++ b/2022/09/28/深深的挫败和无助感/index.html @@ -1 +1 @@ -深深的挫败和无助感 - 心情 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

一个月都过去了,工作还没有着落!

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +深深的挫败和无助感 - 心情 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

一个月都过去了,工作还没有着落!

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/06/Nginx配置iframe访问/index.html b/2022/10/06/Nginx配置iframe访问/index.html index e9b06b341..37b99b353 100644 --- a/2022/10/06/Nginx配置iframe访问/index.html +++ b/2022/10/06/Nginx配置iframe访问/index.html @@ -1 +1 @@ -Nginx 配置 iframe 访问 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# X-Frame-Options 响应头配置详解

X-Frame-Options HTTP 响应头是用来给浏览器指示允许一个页面可否在,或者 中展现的标记。网站可以使用此功能,来确保自己网站的内容没有被嵌套到别人的网站中去,也从而避免了点击劫持 (clickjacking) 的攻击。
X-Frame-Options 三个参数:

1、 DENY

表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。

2、SAMEORIGIN

表示该页面可以在相同域名页面的 frame 中展示。

3、ALLOW-FROM uri

表示该页面可以在指定来源的 frame 中展示。

4、ALLOWALL

表示该页面可以在任何来源的 frame 中展示。

换一句话说,如果设置为 DENY,不光在别人的网站 frame 嵌入时会无法加载,在同域名页面中同样会无法加载。另一方面,如果设置为 SAMEORIGIN,那么页面就可以在同域名页面的 frame 中嵌套。正常情况下我们通常使用 SAMEORIGIN 参数。

# Apache 配置

需要把下面这行添加到'site' 的配置中

Header always append X-Frame-Options SAMEORIGIN

# Nginx 配置

需要添加到 ‘http’, ‘server’ 或者 ‘location’ 的配置项中,个人来讲喜欢配置在‘server’ 中

正常情况下都是使用 SAMEORIGIN 参数,允许同域嵌套
add_header X-Frame-Options SAMEORIGIN;

允许单个域名 iframe 嵌套
add_header X-Frame-Options ALLOW-FROM http://xxx.com/;

允许多个域名 iframe 嵌套,注意这里是用逗号分隔
add_header X-Frame-Options "ALLOW-FROM http://xxx.com/,https://xxx.com/";

允许任何域名 iframe 嵌套
add_header X-Frame-Options ALLOWALL;

# Tomcat 配置

在‘conf/web.xml’填加以下配置

<filter>
        <filter-name>httpHeaderSecurity</filter-name>
        <filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
        <init-param>
            <param-name>antiClickJackingOption</param-name>
            <param-value>SAMEORIGIN</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </filter>
<filter-mapping>
        <filter-name>httpHeaderSecurity</filter-name>
        <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

# IIS 配置

添加下面的配置到 ‘Web.config’文件中

<system.webServer>
  <httpProtocol>
    <customHeaders>
      <add name="X-Frame-Options" value="SAMEORIGIN" />
    </customHeaders>
  </httpProtocol>
</system.webServer>
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Nginx 配置 iframe 访问 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# X-Frame-Options 响应头配置详解

X-Frame-Options HTTP 响应头是用来给浏览器指示允许一个页面可否在,或者 中展现的标记。网站可以使用此功能,来确保自己网站的内容没有被嵌套到别人的网站中去,也从而避免了点击劫持 (clickjacking) 的攻击。
X-Frame-Options 三个参数:

1、 DENY

表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。

2、SAMEORIGIN

表示该页面可以在相同域名页面的 frame 中展示。

3、ALLOW-FROM uri

表示该页面可以在指定来源的 frame 中展示。

4、ALLOWALL

表示该页面可以在任何来源的 frame 中展示。

换一句话说,如果设置为 DENY,不光在别人的网站 frame 嵌入时会无法加载,在同域名页面中同样会无法加载。另一方面,如果设置为 SAMEORIGIN,那么页面就可以在同域名页面的 frame 中嵌套。正常情况下我们通常使用 SAMEORIGIN 参数。

# Apache 配置

需要把下面这行添加到'site' 的配置中

Header always append X-Frame-Options SAMEORIGIN

# Nginx 配置

需要添加到 ‘http’, ‘server’ 或者 ‘location’ 的配置项中,个人来讲喜欢配置在‘server’ 中

正常情况下都是使用 SAMEORIGIN 参数,允许同域嵌套
add_header X-Frame-Options SAMEORIGIN;

允许单个域名 iframe 嵌套
add_header X-Frame-Options ALLOW-FROM http://xxx.com/;

允许多个域名 iframe 嵌套,注意这里是用逗号分隔
add_header X-Frame-Options "ALLOW-FROM http://xxx.com/,https://xxx.com/";

允许任何域名 iframe 嵌套
add_header X-Frame-Options ALLOWALL;

# Tomcat 配置

在‘conf/web.xml’填加以下配置

<filter>
        <filter-name>httpHeaderSecurity</filter-name>
        <filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
        <init-param>
            <param-name>antiClickJackingOption</param-name>
            <param-value>SAMEORIGIN</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </filter>
<filter-mapping>
        <filter-name>httpHeaderSecurity</filter-name>
        <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

# IIS 配置

添加下面的配置到 ‘Web.config’文件中

<system.webServer>
  <httpProtocol>
    <customHeaders>
      <add name="X-Frame-Options" value="SAMEORIGIN" />
    </customHeaders>
  </httpProtocol>
</system.webServer>
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/11/svn库转git库/index.html b/2022/10/11/svn库转git库/index.html index 1c2d042f4..5b5af9b36 100644 --- a/2022/10/11/svn库转git库/index.html +++ b/2022/10/11/svn库转git库/index.html @@ -1 +1 @@ -svn 库转 git 库 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 前期准备

首先安装好 svn 和 git 工具。

# svn 转 git

1、 到 svn 项目目录右键选中 gitbash 打开窗口,执行获取用户并映射成 git 样式账号命令如下:
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > users.txt

然后会在目录下生成文件 users.txt 样式如:zhansan = 张三 zhansan@xxx.com

2、新建个文件夹,将生成的 users.txt 放入新建的文件夹,然后在新建的文件夹中右键选中 gitbash 弹出窗口后执行下面命令(https://svn_project_url/ 为 svn 库的 url),拉取 svn 代码到本地新建文件夹中。
git svn clone https://svn_project_url/ --no-metadata --no-minimize-url --authors-file=users.txt

  • 期间可能会弹出 svn 的账户密码验证窗口,正确输入即可。

# 推送项目到 git 库

1、在 gitbash 窗口 cd 到 git 项目文件夹中执行以下命令把 git 仓库地址加入到 remote 中(https://git_project_url/ 为 git 库的 url)。
git remote add origin https://git_project_url/

2、push 项目到 git 库中。
git push origin master

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +svn 库转 git 库 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 前期准备

首先安装好 svn 和 git 工具。

# svn 转 git

1、 到 svn 项目目录右键选中 gitbash 打开窗口,执行获取用户并映射成 git 样式账号命令如下:
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > users.txt

然后会在目录下生成文件 users.txt 样式如:zhansan = 张三 zhansan@xxx.com

2、新建个文件夹,将生成的 users.txt 放入新建的文件夹,然后在新建的文件夹中右键选中 gitbash 弹出窗口后执行下面命令(https://svn_project_url/ 为 svn 库的 url),拉取 svn 代码到本地新建文件夹中。
git svn clone https://svn_project_url/ --no-metadata --no-minimize-url --authors-file=users.txt

  • 期间可能会弹出 svn 的账户密码验证窗口,正确输入即可。

# 推送项目到 git 库

1、在 gitbash 窗口 cd 到 git 项目文件夹中执行以下命令把 git 仓库地址加入到 remote 中(https://git_project_url/ 为 git 库的 url)。
git remote add origin https://git_project_url/

2、push 项目到 git 库中。
git push origin master

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/12/使用picgo上传图片到chevereto/index.html b/2022/10/12/使用picgo上传图片到chevereto/index.html index acef554a6..00fa3b004 100644 --- a/2022/10/12/使用picgo上传图片到chevereto/index.html +++ b/2022/10/12/使用picgo上传图片到chevereto/index.html @@ -1 +1 @@ -使用 PicGo 上传图片到 chevereto - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 简介

PicGo 是一款开源的图床管理工具,十分流行。

PicGo 官方指南:PicGo | PicGo

# 配置

  1. 安装插件(需要先安装 NodeJS)

  2. 图床配置
    url 后缀必须用红线圈中的部分,key 在 chevereto 登陆后 api 配置中查找

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +使用 PicGo 上传图片到 chevereto - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 简介

PicGo 是一款开源的图床管理工具,十分流行。

PicGo 官方指南:PicGo | PicGo

# 配置

  1. 安装插件(需要先安装 NodeJS)

  2. 图床配置
    url 后缀必须用红线圈中的部分,key 在 chevereto 登陆后 api 配置中查找

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/14/nginx允许跨域获取cookies方法/index.html b/2022/10/14/nginx允许跨域获取cookies方法/index.html index 81968298c..724b32187 100644 --- a/2022/10/14/nginx允许跨域获取cookies方法/index.html +++ b/2022/10/14/nginx允许跨域获取cookies方法/index.html @@ -1 +1 @@ -nginx 允许跨域获取 cookie 的方法 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 使用场景

在 A 域名的页面向 B 域名提交数据时需要代入 B 域名的 cookie,否则 B 域名会跳转到登陆页面。解决方式需要使用到 nginx 反向代理,配置如下:

server {
	listen port ssl http2;
	server_name xxx.com;
	ssl_certificate_key /xxx.key;
	ssl_certificate /xxx.pem;
	proxy_cookie_path ~(.*) "$1; SameSite=None; secure; httponly";
	location / {
		#允许镶套的方式(可以同域镶套、指定域名镶套或者所有域名镶套)
		add_header X-Frame-Options ALLOWALL; #允许被所有域名镶套
		proxy_pass http://xxx;
	}
}
\ No newline at end of file +nginx 允许跨域获取 cookie 的方法 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 使用场景

在 A 域名的页面向 B 域名提交数据时需要代入 B 域名的 cookie,否则 B 域名会跳转到登陆页面。解决方式需要使用到 nginx 反向代理,配置如下:

server {
	listen port ssl http2;
	server_name xxx.com;
	ssl_certificate_key /xxx.key;
	ssl_certificate /xxx.pem;
	proxy_cookie_path ~(.*) "$1; SameSite=None; secure; httponly";
	location / {
		#允许镶套的方式(可以同域镶套、指定域名镶套或者所有域名镶套)
		add_header X-Frame-Options ALLOWALL; #允许被所有域名镶套
		proxy_pass http://xxx;
	}
}
\ No newline at end of file diff --git a/2022/10/17/redis主从基础配置记录/index.html b/2022/10/17/redis主从基础配置记录/index.html index 6913b98ab..fc0687ea4 100644 --- a/2022/10/17/redis主从基础配置记录/index.html +++ b/2022/10/17/redis主从基础配置记录/index.html @@ -1 +1 @@ -redis 主从基础配置 - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 主服务

  1. 基础配置
port 6379
requirepass 123456(密码,建议不设置)
vm-enabled no (虚拟内存,内存够的情况下可以不使用)
maxmemory 1GB(告诉Redis当使用了多少物理内存后就开始拒绝后续的写入)
bind 127.0.0.1 (注释掉,否则不能外部连接)
rdbchecksum no(持久化数据检查)
list-max-ziplist-size 1024(ziplist的最大容量,正数为自己指定的大小。负数-1到-5为对应的值4到64Kb)
list-compress-depth 20(quicklist的两端多少个node不压缩,0为全部不压缩)
sysctl vm.overcommit_memory=1 (立即生效)
修改/etc/sysctl.conf添加vm.overcommit_memory=1(表示内核允许分配所有的物理内存,而不管当前的内存状态如何。Redis的RDB持久化实现是folk一个子进程,然后让子进程将内存镜像dump到RDB文件中。理论上来说是需要跟父进程一样的内存空间,但是由于linux很早就支持的copy-on-write技术,所以实际上并不需要这么多的物理内存的。)
  1. 禁用透明大页(影响性能)
需要sudo su 切换到root身份(sudo 没用)
echo never > /sys/kernel/mm/transparent_hugepage/enabled
修改/etc/init.d/redis-server,加入/bin/echo never > /sys/kernel/mm/transparent_hugepage/enabled
  1. 修复 TCP 警告
sysctl net.core.somaxconn=1024(立即生效)
修改/etc/sysctl.conf添加net.core.somaxconn=1024
  1. 客户端缓冲区限制
客户端的输出缓冲区的限制,因为某种原因客户端从服务器读取数据的速度不够快,可用于强制断开连接(一个常见的原因是一个发布 / 订阅客户端消费消息的速度无法赶上生产它们的速度)。
可以三种不同客户端的方式进行设置:
normal ->  正常客户端
slave  -> slave 和 MONITOR 客户端
pubsub ->  至少订阅了一个 pubsub channel 或 pattern 的客户端
语法 :
client-output-buffer-limit <class><hard limit> <soft limit> <soft seconds>
一旦达到硬限制客户端会立即断开,或者达到软限制并保持达成的指定秒数(连续)。
例如,如果硬限制为 32 兆字节和软限制为 16 兆字节 /10 秒,客户端将会立即断开。如果输出缓冲区的大小达到 32 兆字节,客户端达到 16 兆字节和连续超过了限制 10 秒,也将断开连接。默认 normal 客户端不做限制,因为他们在一个请求后未要求时(以推的方式)不接收数据,
只有异步客户端可能会出现请求数据的速度比它可以读取的速度快的场景。
把硬限制和软限制都设置为 0 来禁用该特性
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 5gb 512mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
  1. 持久化配置
---关闭RDB持久化---
save ""
默认配置如下:
save 900 1 #900 秒内有 1 次更新就持久化
save 300 10 #300 秒内有 10 次更新就持久化
save 60 10000 #60 秒内有 10000 次更新就持久化
---关闭RDB持久化---
主从同步支持两种策略,即disk和socket方式。
新的slave端和重连的salve端不允许去继续同步进程,这被称之为“完全同步”。
一个RDB文件从master端传到slave端,分为两种情况:
1、支持disk:master端将RDB file写到disk,稍后再传送到slave端;
2、无磁盘diskless:master端直接将RDB file传到slave socket,不需要与disk进行交互。无磁盘diskless方式适合磁盘读写速度慢但网络带宽非常高的环境。
repl-diskless-sync no 默认不使用diskless同步方式
repl-diskless-sync-delay 30 无磁盘diskless方式在进行数据传递之前会有一个时间的延迟,以便slave端能够进行到待传送的目标队列中,这个时间默认是5秒
repl-ping-slave-period 60 slave端向server端发送pings的时间区间设置,默认为10秒
repl-timeout 3600 设置超时时间
repl-disable-tcp-nodelay no 是否启用TCP_NODELAY,如果启用则会使用少量的TCP包和带宽去进行数据传输到slave端,当然速度会比较慢;如果不启用则传输速度比较快,但是会占用比较多的带宽。
repl-backlog-size 1mb 设置backlog的大小,backlog是一个缓冲区,在slave端失连时存放要同步到slave的数据,因此当一个slave要重连时,经常是不需要完全同步的,执行局部同步就足够了。
backlog设置的越大,slave可以失连的时间就越长。
repl-backlog-ttl 3600 如果一段时间后没有slave连接到master,则backlog size的内存将会被释放。如果值为0则表示永远不释放这部份内存。
slave-priority 100 slave端的优先级设置,值是一个整数,数字越小表示优先级越高。当master故障时将会按照优先级来选择slave端进行恢复,如果值设置为0,则表示该slave永远不会被选择。
min-slaves-to-write 3
min-slaves-max-lag 10 设置当一个master端的可用slave少于N个,延迟时间大于M秒时,不接收写操作。

# 从服务

基本配置同主服务一致
slaveof 127.0.0.1 6379(主redis的ip和端口)
masterauth 123456 (主redis的密码)
可以通过slaveof no one命令将Slaver升级为Maste
bgsave (持久化命令,在redis-cli中执行,默认创建dump.rdb文件,路径为 /var/lib/redis/dump.rdb。可通过find / -name dump.rd查找)

# 相关命令

看状态
sudo /etc/init.d/redis-server status
看端口
netstat -nlt|grep 6379
外部连接
sudo vim /etc/redis/redis.conf把protected-mode改为no,把bind ip注释掉
重启
sudo server redis-server restart
查看内存
free -m
批量删除指定key
redis-cli -n 6 scan 0 match *2020-06-12 count 10000| xargs redis-cli -n 6 del
大量删除key后快速释放被占用的内存
memory purge

# 问题解决

写入问题
redis-cli config set stop-writes-on-bgsave-error no
sudo vim /etc/redis/redis.conf把stop-writes-on-bgsave-error改为no
修改系统 sudo vim /etc/sysctl.conf加入vm.overcommit_memory=1
sudo sysctl vm.overcommit_memory=1
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +redis 主从基础配置 - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 主服务

  1. 基础配置
port 6379
requirepass 123456(密码,建议不设置)
vm-enabled no (虚拟内存,内存够的情况下可以不使用)
maxmemory 1GB(告诉Redis当使用了多少物理内存后就开始拒绝后续的写入)
bind 127.0.0.1 (注释掉,否则不能外部连接)
rdbchecksum no(持久化数据检查)
list-max-ziplist-size 1024(ziplist的最大容量,正数为自己指定的大小。负数-1到-5为对应的值4到64Kb)
list-compress-depth 20(quicklist的两端多少个node不压缩,0为全部不压缩)
sysctl vm.overcommit_memory=1 (立即生效)
修改/etc/sysctl.conf添加vm.overcommit_memory=1(表示内核允许分配所有的物理内存,而不管当前的内存状态如何。Redis的RDB持久化实现是folk一个子进程,然后让子进程将内存镜像dump到RDB文件中。理论上来说是需要跟父进程一样的内存空间,但是由于linux很早就支持的copy-on-write技术,所以实际上并不需要这么多的物理内存的。)
  1. 禁用透明大页(影响性能)
需要sudo su 切换到root身份(sudo 没用)
echo never > /sys/kernel/mm/transparent_hugepage/enabled
修改/etc/init.d/redis-server,加入/bin/echo never > /sys/kernel/mm/transparent_hugepage/enabled
  1. 修复 TCP 警告
sysctl net.core.somaxconn=1024(立即生效)
修改/etc/sysctl.conf添加net.core.somaxconn=1024
  1. 客户端缓冲区限制
客户端的输出缓冲区的限制,因为某种原因客户端从服务器读取数据的速度不够快,可用于强制断开连接(一个常见的原因是一个发布 / 订阅客户端消费消息的速度无法赶上生产它们的速度)。
可以三种不同客户端的方式进行设置:
normal ->  正常客户端
slave  -> slave 和 MONITOR 客户端
pubsub ->  至少订阅了一个 pubsub channel 或 pattern 的客户端
语法 :
client-output-buffer-limit <class><hard limit> <soft limit> <soft seconds>
一旦达到硬限制客户端会立即断开,或者达到软限制并保持达成的指定秒数(连续)。
例如,如果硬限制为 32 兆字节和软限制为 16 兆字节 /10 秒,客户端将会立即断开。如果输出缓冲区的大小达到 32 兆字节,客户端达到 16 兆字节和连续超过了限制 10 秒,也将断开连接。默认 normal 客户端不做限制,因为他们在一个请求后未要求时(以推的方式)不接收数据,
只有异步客户端可能会出现请求数据的速度比它可以读取的速度快的场景。
把硬限制和软限制都设置为 0 来禁用该特性
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 5gb 512mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
  1. 持久化配置
---关闭RDB持久化---
save ""
默认配置如下:
save 900 1 #900 秒内有 1 次更新就持久化
save 300 10 #300 秒内有 10 次更新就持久化
save 60 10000 #60 秒内有 10000 次更新就持久化
---关闭RDB持久化---
主从同步支持两种策略,即disk和socket方式。
新的slave端和重连的salve端不允许去继续同步进程,这被称之为“完全同步”。
一个RDB文件从master端传到slave端,分为两种情况:
1、支持disk:master端将RDB file写到disk,稍后再传送到slave端;
2、无磁盘diskless:master端直接将RDB file传到slave socket,不需要与disk进行交互。无磁盘diskless方式适合磁盘读写速度慢但网络带宽非常高的环境。
repl-diskless-sync no 默认不使用diskless同步方式
repl-diskless-sync-delay 30 无磁盘diskless方式在进行数据传递之前会有一个时间的延迟,以便slave端能够进行到待传送的目标队列中,这个时间默认是5秒
repl-ping-slave-period 60 slave端向server端发送pings的时间区间设置,默认为10秒
repl-timeout 3600 设置超时时间
repl-disable-tcp-nodelay no 是否启用TCP_NODELAY,如果启用则会使用少量的TCP包和带宽去进行数据传输到slave端,当然速度会比较慢;如果不启用则传输速度比较快,但是会占用比较多的带宽。
repl-backlog-size 1mb 设置backlog的大小,backlog是一个缓冲区,在slave端失连时存放要同步到slave的数据,因此当一个slave要重连时,经常是不需要完全同步的,执行局部同步就足够了。
backlog设置的越大,slave可以失连的时间就越长。
repl-backlog-ttl 3600 如果一段时间后没有slave连接到master,则backlog size的内存将会被释放。如果值为0则表示永远不释放这部份内存。
slave-priority 100 slave端的优先级设置,值是一个整数,数字越小表示优先级越高。当master故障时将会按照优先级来选择slave端进行恢复,如果值设置为0,则表示该slave永远不会被选择。
min-slaves-to-write 3
min-slaves-max-lag 10 设置当一个master端的可用slave少于N个,延迟时间大于M秒时,不接收写操作。

# 从服务

基本配置同主服务一致
slaveof 127.0.0.1 6379(主redis的ip和端口)
masterauth 123456 (主redis的密码)
可以通过slaveof no one命令将Slaver升级为Maste
bgsave (持久化命令,在redis-cli中执行,默认创建dump.rdb文件,路径为 /var/lib/redis/dump.rdb。可通过find / -name dump.rd查找)

# 相关命令

看状态
sudo /etc/init.d/redis-server status
看端口
netstat -nlt|grep 6379
外部连接
sudo vim /etc/redis/redis.conf把protected-mode改为no,把bind ip注释掉
重启
sudo server redis-server restart
查看内存
free -m
批量删除指定key
redis-cli -n 6 scan 0 match *2020-06-12 count 10000| xargs redis-cli -n 6 del
大量删除key后快速释放被占用的内存
memory purge

# 问题解决

写入问题
redis-cli config set stop-writes-on-bgsave-error no
sudo vim /etc/redis/redis.conf把stop-writes-on-bgsave-error改为no
修改系统 sudo vim /etc/sysctl.conf加入vm.overcommit_memory=1
sudo sysctl vm.overcommit_memory=1
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/18/搭建nagios监控/index.html b/2022/10/18/搭建nagios监控/index.html index f7d97d301..277d227a6 100644 --- a/2022/10/18/搭建nagios监控/index.html +++ b/2022/10/18/搭建nagios监控/index.html @@ -1 +1 @@ -搭建 nagios 监控 - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 监控端服务安装与配置

  1. nagios 需要安装主程序 core 和 nrpe(nagios 和各被监控主机都必须安装)。如需使用自研前端可通过安装 ndoutils (用于把 nagios 监控信息写入数据库) 和 mysql 实现。具体安装见官网
  2. nagios 默认监控命令脚本放置在 libexec 中,自定义脚本也放到此处
  3. etc/objects/commands.cfg 用于保存 nagios 默认监控命令
  4. etc/nrpe.cfg 文件中需要添加用于被监控执行命令项(各被监控主机中都需要添加)
  5. etc/objects/hosts 目录下配置需要被监控的主机信息
  6. etc/objects/servers 目录下配置需要在被监控主机上执行的监控命令(第 4 项中的命令)

# 被监控端服务安装与配置

  1. 被监控端需要安装 nrpe
  2. 被监控端需要把监控端的命令写入到 nrpe 的配置文件中
  3. 被监控端需要把命令执行脚本放入 libexec 目录中
  4. 被监控端自动安装脚本(可借鉴)
1、请先修改脚本中的服务端IP。
2、如被监控端不支持let计算命令请执行sudo dpkg-reconfigure dash命令,弹出选择窗口后选择no。
3、需要在脚本同目录下创建CentOS、Ubuntu、sh和conf目录,目录下分别放置nrpe的tar安装包、监控脚本和nrpe配置文件。
#!/bin/bash
#服务端 ip
SERVER_IP=10.10.10.121
#安装目录
INSTALL_HOME=`pwd`
#安装 ubuntu 版本
INSTALL_UBUNTU()
{
	sudo apt-get update
	sudo apt-get install -y autoconf automake gcc libc6 libmcrypt-dev make libssl-dev wget openssl
	
	cd /tmp
	#wget --no-check-certificate -O nrpe.tar.gz https://github.com/NagiosEnterprises/nrpe/archive/nrpe-4.0.3.tar.gz
	cp $INSTALL_HOME/Ubuntu/nrpe.tar.gz ./
	tar xzf nrpe.tar.gz
	cd /tmp/nrpe-nrpe-4.0.3/
	sudo ./configure --enable-command-args --with-ssl-lib=/usr/lib/x86_64-linux-gnu/
	sudo make all
	sudo make install-groups-users
	sudo make install
	sudo make install-config
	sudo sh -c "echo >> /etc/services"
	sudo sh -c "sudo echo '# Nagios services' >> /etc/services"
	sudo sh -c "sudo echo 'nrpe    5666/tcp' >> /etc/services"
	
	#判断系统是高版本还是低版本
	VERSION=`lsb_release -r --short`
	IS_LOW_VERSION=`echo "$VERSION < 15" | bc`
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		sudo make install-init
	else
		#高版本
		sudo make install-init
		sudo systemctl enable nrpe.service
	fi
	
	sudo mkdir -p /etc/ufw/applications.d
	sudo sh -c "echo '[NRPE]' > /etc/ufw/applications.d/nagios"
	sudo sh -c "echo 'title=Nagios Remote Plugin Executor' >> /etc/ufw/applications.d/nagios"
	sudo sh -c "echo 'description=Allows remote execution of Nagios plugins' >> /etc/ufw/applications.d/nagios"
	sudo sh -c "echo 'ports=5666/tcp' >> /etc/ufw/applications.d/nagios"
	sudo ufw allow NRPE
	sudo ufw reload
	
	sudo sh -c "sed -i '/^allowed_hosts=/s/$/,$SERVER_IP/' /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "sed -i 's/^dont_blame_nrpe=.*/dont_blame_nrpe=1/g' /usr/local/nagios/etc/nrpe.cfg"
	
	cd $INSTALL_HOME
	sudo cp ./sh/* /usr/local/nagios/libexec/
	sudo chmod +xr /usr/local/nagios/libexec/*
	
	sudo sh -c "echo 'command[check_ping]=/usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_cpu]=/usr/local/nagios/libexec/check_cpu.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_mem]=/usr/local/nagios/libexec/check_mem.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_disk]=/usr/local/nagios/libexec/check_disk.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_my_service]=/usr/local/nagios/libexec/check_my_service.sh \$ARG1\$' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_system_info]=/usr/local/nagios/libexec/check_system_info.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	NETWORK_INDEX=1
	for NETWORK_NAME in `cat /proc/net/dev | awk '{i++; if(i>2){print $1}}' | sed 's/^[\t]*//g' | sed 's/[:]*$//g'`;do
			if [ $NETWORK_NAME != 'lo' ]; then
					sudo sh -c "echo 'command[check_network$NETWORK_INDEX]=/usr/local/nagios/libexec/check_network.sh $NETWORK_NAME' >> /usr/local/nagios/etc/nrpe.cfg"
					NETWORK_INDEX=`expr $NETWORK_INDEX + 1 `
			fi
	done
	
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		sudo start nrpe
	else
		#高版本
		sudo systemctl start nrpe.service
	fi
}
#安装 centos 版本
INSTALL_CENTOS()
{
	yum install -y gcc glibc glibc-common openssl openssl-devel perl wget
	cd /tmp
	#wget --no-check-certificate -O nrpe.tar.gz https://github.com/NagiosEnterprises/nrpe/archive/nrpe-4.0.3.tar.gz
	cp $INSTALL_HOME/CentOS/nrpe.tar.gz ./
	tar xzf nrpe.tar.gz
	cd /tmp/nrpe-nrpe-4.0.3/
	./configure --enable-command-args
	make all
	make install-groups-users
	make install
	make install-config
	echo >> /etc/services
	echo '# Nagios services' >> /etc/services
	echo 'nrpe    5666/tcp' >> /etc/services
	
	#判断系统是高版本还是低版本
	VERSION=`rpm -q centos-release|cut -d- -f3`
	#安装 bc 命令
	yum -y install bc
	IS_LOW_VERSION=`echo "$VERSION < 7" | bc`
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		make install-init
		
		iptables -I INPUT -p tcp --destination-port 5666 -j ACCEPT
		service iptables save
		ip6tables -I INPUT -p tcp --destination-port 5666 -j ACCEPT
		service ip6tables save
	else
		#高版本
		make install-init
		systemctl enable nrpe.service
		
		firewall-cmd --zone=public --add-port=5666/tcp
		firewall-cmd --zone=public --add-port=5666/tcp --permanent
	fi
	
	sudo sh -c "sed -i '/^allowed_hosts=/s/$/,$SERVER_IP/' /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "sed -i 's/^dont_blame_nrpe=.*/dont_blame_nrpe=1/g' /usr/local/nagios/etc/nrpe.cfg"
	
	cd $INSTALL_HOME
	sudo cp ./sh/* /usr/local/nagios/libexec/
	sudo chmod +xr /usr/local/nagios/libexec/*
	
	sudo sh -c "echo 'command[check_ping]=/usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_cpu]=/usr/local/nagios/libexec/check_cpu.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_mem]=/usr/local/nagios/libexec/check_mem.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_disk]=/usr/local/nagios/libexec/check_disk.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_my_service]=/usr/local/nagios/libexec/check_my_service.sh \$ARG1\$' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_system_info]=/usr/local/nagios/libexec/check_system_info.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	NETWORK_INDEX=1
	for NETWORK_NAME in `cat /proc/net/dev | awk '{i++; if(i>2){print $1}}' | sed 's/^[\t]*//g' | sed 's/[:]*$//g'`;do
			if [ $NETWORK_NAME != 'lo' ]; then
					sudo sh -c "echo 'command[check_network$NETWORK_INDEX]=/usr/local/nagios/libexec/check_network.sh $NETWORK_NAME' >> /usr/local/nagios/etc/nrpe.cfg"
					NETWORK_INDEX=`expr $NETWORK_INDEX + 1 `
			fi
	done
	
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		if [ $(echo "$VERSION < 6" | bc) -eq 1 ]; then
			service nrpe start
		else
			start nrpe
		fi
	else
		#高版本
		systemctl start nrpe.service
	fi
}
#安装其它版本
INSTALL_OTHER()
{
	echo "Not supported at the moment."
}
#根据不同系统安装不同版本
INSTALL()
{
	if grep -Eqii "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
		DISTRO='CentOS'
        PM='yum'
		INSTALL_CENTOS
    elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then
        DISTRO='RHEL'
        PM='yum'
		INSTALL_OTHER
    elif grep -Eqi "Aliyun" /etc/issue || grep -Eq "Aliyun" /etc/*-release; then
        DISTRO='Aliyun'
        PM='yum'
		INSTALL_OTHER
    elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
        DISTRO='Fedora'
        PM='yum'
		INSTALL_OTHER
    elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
        DISTRO='Debian'
        PM='apt'
		INSTALL_OTHER
    elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
        DISTRO='Ubuntu'
        PM='apt'
		INSTALL_UBUNTU
    elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
        DISTRO='Raspbian'
        PM='apt'
		INSTALL_OTHER
    else
        echo "unknow linux."
        exit 1
    fi
    echo $DISTRO
}
INSTALL
exit 0

# 登录

地址:http:// 服务器 IP/nagios
用户名:nagiosadmin
密码:nagiosadmin

# 常见问题

  1. 监控日志未写入 mysql(可能是 ndoutils 服务不正常导致)。采用以下脚本命令解决
#!/bin/bash
sudo rm -f /usr/local/nagios/var/ndo2db.pid
sudo rm -f /usr/local/nagios/var/ndo.sock
sudo systemctl restart ndo2db.service
sudo systemctl status ndo2db.service
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +搭建 nagios 监控 - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 监控端服务安装与配置

  1. nagios 需要安装主程序 core 和 nrpe(nagios 和各被监控主机都必须安装)。如需使用自研前端可通过安装 ndoutils (用于把 nagios 监控信息写入数据库) 和 mysql 实现。具体安装见官网
  2. nagios 默认监控命令脚本放置在 libexec 中,自定义脚本也放到此处
  3. etc/objects/commands.cfg 用于保存 nagios 默认监控命令
  4. etc/nrpe.cfg 文件中需要添加用于被监控执行命令项(各被监控主机中都需要添加)
  5. etc/objects/hosts 目录下配置需要被监控的主机信息
  6. etc/objects/servers 目录下配置需要在被监控主机上执行的监控命令(第 4 项中的命令)

# 被监控端服务安装与配置

  1. 被监控端需要安装 nrpe
  2. 被监控端需要把监控端的命令写入到 nrpe 的配置文件中
  3. 被监控端需要把命令执行脚本放入 libexec 目录中
  4. 被监控端自动安装脚本(可借鉴)
1、请先修改脚本中的服务端IP。
2、如被监控端不支持let计算命令请执行sudo dpkg-reconfigure dash命令,弹出选择窗口后选择no。
3、需要在脚本同目录下创建CentOS、Ubuntu、sh和conf目录,目录下分别放置nrpe的tar安装包、监控脚本和nrpe配置文件。
#!/bin/bash
#服务端 ip
SERVER_IP=10.10.10.121
#安装目录
INSTALL_HOME=`pwd`
#安装 ubuntu 版本
INSTALL_UBUNTU()
{
	sudo apt-get update
	sudo apt-get install -y autoconf automake gcc libc6 libmcrypt-dev make libssl-dev wget openssl
	
	cd /tmp
	#wget --no-check-certificate -O nrpe.tar.gz https://github.com/NagiosEnterprises/nrpe/archive/nrpe-4.0.3.tar.gz
	cp $INSTALL_HOME/Ubuntu/nrpe.tar.gz ./
	tar xzf nrpe.tar.gz
	cd /tmp/nrpe-nrpe-4.0.3/
	sudo ./configure --enable-command-args --with-ssl-lib=/usr/lib/x86_64-linux-gnu/
	sudo make all
	sudo make install-groups-users
	sudo make install
	sudo make install-config
	sudo sh -c "echo >> /etc/services"
	sudo sh -c "sudo echo '# Nagios services' >> /etc/services"
	sudo sh -c "sudo echo 'nrpe    5666/tcp' >> /etc/services"
	
	#判断系统是高版本还是低版本
	VERSION=`lsb_release -r --short`
	IS_LOW_VERSION=`echo "$VERSION < 15" | bc`
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		sudo make install-init
	else
		#高版本
		sudo make install-init
		sudo systemctl enable nrpe.service
	fi
	
	sudo mkdir -p /etc/ufw/applications.d
	sudo sh -c "echo '[NRPE]' > /etc/ufw/applications.d/nagios"
	sudo sh -c "echo 'title=Nagios Remote Plugin Executor' >> /etc/ufw/applications.d/nagios"
	sudo sh -c "echo 'description=Allows remote execution of Nagios plugins' >> /etc/ufw/applications.d/nagios"
	sudo sh -c "echo 'ports=5666/tcp' >> /etc/ufw/applications.d/nagios"
	sudo ufw allow NRPE
	sudo ufw reload
	
	sudo sh -c "sed -i '/^allowed_hosts=/s/$/,$SERVER_IP/' /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "sed -i 's/^dont_blame_nrpe=.*/dont_blame_nrpe=1/g' /usr/local/nagios/etc/nrpe.cfg"
	
	cd $INSTALL_HOME
	sudo cp ./sh/* /usr/local/nagios/libexec/
	sudo chmod +xr /usr/local/nagios/libexec/*
	
	sudo sh -c "echo 'command[check_ping]=/usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_cpu]=/usr/local/nagios/libexec/check_cpu.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_mem]=/usr/local/nagios/libexec/check_mem.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_disk]=/usr/local/nagios/libexec/check_disk.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_my_service]=/usr/local/nagios/libexec/check_my_service.sh \$ARG1\$' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_system_info]=/usr/local/nagios/libexec/check_system_info.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	NETWORK_INDEX=1
	for NETWORK_NAME in `cat /proc/net/dev | awk '{i++; if(i>2){print $1}}' | sed 's/^[\t]*//g' | sed 's/[:]*$//g'`;do
			if [ $NETWORK_NAME != 'lo' ]; then
					sudo sh -c "echo 'command[check_network$NETWORK_INDEX]=/usr/local/nagios/libexec/check_network.sh $NETWORK_NAME' >> /usr/local/nagios/etc/nrpe.cfg"
					NETWORK_INDEX=`expr $NETWORK_INDEX + 1 `
			fi
	done
	
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		sudo start nrpe
	else
		#高版本
		sudo systemctl start nrpe.service
	fi
}
#安装 centos 版本
INSTALL_CENTOS()
{
	yum install -y gcc glibc glibc-common openssl openssl-devel perl wget
	cd /tmp
	#wget --no-check-certificate -O nrpe.tar.gz https://github.com/NagiosEnterprises/nrpe/archive/nrpe-4.0.3.tar.gz
	cp $INSTALL_HOME/CentOS/nrpe.tar.gz ./
	tar xzf nrpe.tar.gz
	cd /tmp/nrpe-nrpe-4.0.3/
	./configure --enable-command-args
	make all
	make install-groups-users
	make install
	make install-config
	echo >> /etc/services
	echo '# Nagios services' >> /etc/services
	echo 'nrpe    5666/tcp' >> /etc/services
	
	#判断系统是高版本还是低版本
	VERSION=`rpm -q centos-release|cut -d- -f3`
	#安装 bc 命令
	yum -y install bc
	IS_LOW_VERSION=`echo "$VERSION < 7" | bc`
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		make install-init
		
		iptables -I INPUT -p tcp --destination-port 5666 -j ACCEPT
		service iptables save
		ip6tables -I INPUT -p tcp --destination-port 5666 -j ACCEPT
		service ip6tables save
	else
		#高版本
		make install-init
		systemctl enable nrpe.service
		
		firewall-cmd --zone=public --add-port=5666/tcp
		firewall-cmd --zone=public --add-port=5666/tcp --permanent
	fi
	
	sudo sh -c "sed -i '/^allowed_hosts=/s/$/,$SERVER_IP/' /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "sed -i 's/^dont_blame_nrpe=.*/dont_blame_nrpe=1/g' /usr/local/nagios/etc/nrpe.cfg"
	
	cd $INSTALL_HOME
	sudo cp ./sh/* /usr/local/nagios/libexec/
	sudo chmod +xr /usr/local/nagios/libexec/*
	
	sudo sh -c "echo 'command[check_ping]=/usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_cpu]=/usr/local/nagios/libexec/check_cpu.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_mem]=/usr/local/nagios/libexec/check_mem.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_disk]=/usr/local/nagios/libexec/check_disk.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_my_service]=/usr/local/nagios/libexec/check_my_service.sh \$ARG1\$' >> /usr/local/nagios/etc/nrpe.cfg"
	sudo sh -c "echo 'command[check_system_info]=/usr/local/nagios/libexec/check_system_info.sh' >> /usr/local/nagios/etc/nrpe.cfg"
	NETWORK_INDEX=1
	for NETWORK_NAME in `cat /proc/net/dev | awk '{i++; if(i>2){print $1}}' | sed 's/^[\t]*//g' | sed 's/[:]*$//g'`;do
			if [ $NETWORK_NAME != 'lo' ]; then
					sudo sh -c "echo 'command[check_network$NETWORK_INDEX]=/usr/local/nagios/libexec/check_network.sh $NETWORK_NAME' >> /usr/local/nagios/etc/nrpe.cfg"
					NETWORK_INDEX=`expr $NETWORK_INDEX + 1 `
			fi
	done
	
	if [ $IS_LOW_VERSION = 1 ]; then
		#低版本
		if [ $(echo "$VERSION < 6" | bc) -eq 1 ]; then
			service nrpe start
		else
			start nrpe
		fi
	else
		#高版本
		systemctl start nrpe.service
	fi
}
#安装其它版本
INSTALL_OTHER()
{
	echo "Not supported at the moment."
}
#根据不同系统安装不同版本
INSTALL()
{
	if grep -Eqii "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then
		DISTRO='CentOS'
        PM='yum'
		INSTALL_CENTOS
    elif grep -Eqi "Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "Red Hat Enterprise Linux Server" /etc/*-release; then
        DISTRO='RHEL'
        PM='yum'
		INSTALL_OTHER
    elif grep -Eqi "Aliyun" /etc/issue || grep -Eq "Aliyun" /etc/*-release; then
        DISTRO='Aliyun'
        PM='yum'
		INSTALL_OTHER
    elif grep -Eqi "Fedora" /etc/issue || grep -Eq "Fedora" /etc/*-release; then
        DISTRO='Fedora'
        PM='yum'
		INSTALL_OTHER
    elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then
        DISTRO='Debian'
        PM='apt'
		INSTALL_OTHER
    elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then
        DISTRO='Ubuntu'
        PM='apt'
		INSTALL_UBUNTU
    elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then
        DISTRO='Raspbian'
        PM='apt'
		INSTALL_OTHER
    else
        echo "unknow linux."
        exit 1
    fi
    echo $DISTRO
}
INSTALL
exit 0

# 登录

地址:http:// 服务器 IP/nagios
用户名:nagiosadmin
密码:nagiosadmin

# 常见问题

  1. 监控日志未写入 mysql(可能是 ndoutils 服务不正常导致)。采用以下脚本命令解决
#!/bin/bash
sudo rm -f /usr/local/nagios/var/ndo2db.pid
sudo rm -f /usr/local/nagios/var/ndo.sock
sudo systemctl restart ndo2db.service
sudo systemctl status ndo2db.service
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/19/长了一岁/index.html b/2022/10/19/长了一岁/index.html index 8a72f4320..7e858be06 100644 --- a/2022/10/19/长了一岁/index.html +++ b/2022/10/19/长了一岁/index.html @@ -1 +1 @@ -又长了一岁 - 心情 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

一年一次的总结时间又到了,这一年前半年平平无奇,后半年惊涛骇浪。中年危机如期而遇,人身的低谷终究还是来了。很沮丧也很无助,但还是要坚强面对。人生起起伏伏,时好时坏,终归还是会好起来的。加油!加油!加油

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +又长了一岁 - 心情 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

一年一次的总结时间又到了,这一年前半年平平无奇,后半年惊涛骇浪。中年危机如期而遇,人身的低谷终究还是来了。很沮丧也很无助,但还是要坚强面对。人生起起伏伏,时好时坏,终归还是会好起来的。加油!加油!加油

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/20/极空间Docker版Wordpress安装与配置/index.html b/2022/10/20/极空间Docker版Wordpress安装与配置/index.html index 8b2119161..35d8edc1e 100644 --- a/2022/10/20/极空间Docker版Wordpress安装与配置/index.html +++ b/2022/10/20/极空间Docker版Wordpress安装与配置/index.html @@ -1 +1 @@ -极空间 Docker 版 Wordpress 安装与配置 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 安装

  • 下载最新版 wordpress 镜像,如极空间无法下载,可到 passerma 网站下载。
  • 需要先在 mysql 中创建给 wordpress 使用的库。
  • 文件路径映射(目前极空间不能映射到高速盘,否则无法启动)。
  • 端口映射。
  • 通过映射的端口访问安装界面(一定要通过最终访问的页面进行安装,否则修改配置比较麻烦。如最终是域名访问,就先把域名解析代理等先配置好,再通过域名访问安装)。

# 配置

  • 如需使用 https 访问,需要在 wp-config.php 中加入以下代码,否则资源文件无法访问。
if((!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) || (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) {
    $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
    $_SERVER['HTTPS'] = 'on';
}
  • 后台安装插件时如果跳转到 ftp 配置,则需要在 wp-config.php 中加入以下代码,并到 wp-content 目录下创建 tmp 目录,最后还需要给 tmp 目录赋予读写权限。
define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');
define('FS_METHOD', 'direct');
define('FS_CHMOD_DIR', 0777);
define('FS_CHMOD_FILE', 0777);
  • 目录和文件所有者、组会自动变为 root,目前我是通过访问页面时通过命令修正。暂时未发现问题,如果不行则只能通过定时任务来定时修正了。需要在 wp-config.php 中加入以下代码。
chown('/var/www/html', 'www-data');
chgrp('/var/www/html', 'www-data');
chmod('/var/www/html/wp-content/plugins', 0777);
chmod('/var/www/html/wp-content/themes', 0777);
chmod('/var/www/html/wp-content/tmp', 0777);
  • 隐藏后台访问需要在 wp-login.php 中加入以下代码,key、value 和 https://www.xxx.com/ 需要修改为自己的。修改后只能通过 https://www.xxx.com/wp-login.php?key=value 访问,其它访问需要登录的页面都会跳转到配置的 https://www.xxx.com/ 地址。
if($_GET['key'] != 'value') {
	header('Location: https://www.xxx.com/');
}
\ No newline at end of file +极空间 Docker 版 Wordpress 安装与配置 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 安装

  • 下载最新版 wordpress 镜像,如极空间无法下载,可到 passerma 网站下载。
  • 需要先在 mysql 中创建给 wordpress 使用的库。
  • 文件路径映射(目前极空间不能映射到高速盘,否则无法启动)。
  • 端口映射。
  • 通过映射的端口访问安装界面(一定要通过最终访问的页面进行安装,否则修改配置比较麻烦。如最终是域名访问,就先把域名解析代理等先配置好,再通过域名访问安装)。

# 配置

  • 如需使用 https 访问,需要在 wp-config.php 中加入以下代码,否则资源文件无法访问。
if((!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) || (!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) {
    $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
    $_SERVER['HTTPS'] = 'on';
}
  • 后台安装插件时如果跳转到 ftp 配置,则需要在 wp-config.php 中加入以下代码,并到 wp-content 目录下创建 tmp 目录,最后还需要给 tmp 目录赋予读写权限。
define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');
define('FS_METHOD', 'direct');
define('FS_CHMOD_DIR', 0777);
define('FS_CHMOD_FILE', 0777);
  • 目录和文件所有者、组会自动变为 root,目前我是通过访问页面时通过命令修正。暂时未发现问题,如果不行则只能通过定时任务来定时修正了。需要在 wp-config.php 中加入以下代码。
chown('/var/www/html', 'www-data');
chgrp('/var/www/html', 'www-data');
chmod('/var/www/html/wp-content/plugins', 0777);
chmod('/var/www/html/wp-content/themes', 0777);
chmod('/var/www/html/wp-content/tmp', 0777);
  • 隐藏后台访问需要在 wp-login.php 中加入以下代码,key、value 和 https://www.xxx.com/ 需要修改为自己的。修改后只能通过 https://www.xxx.com/wp-login.php?key=value 访问,其它访问需要登录的页面都会跳转到配置的 https://www.xxx.com/ 地址。
if($_GET['key'] != 'value') {
	header('Location: https://www.xxx.com/');
}
\ No newline at end of file diff --git a/2022/10/21/Hexo-Theme-Shoka-Valine评论配置/index.html b/2022/10/21/Hexo-Theme-Shoka-Valine评论配置/index.html index 5eb092b98..7f5e00094 100644 --- a/2022/10/21/Hexo-Theme-Shoka-Valine评论配置/index.html +++ b/2022/10/21/Hexo-Theme-Shoka-Valine评论配置/index.html @@ -1 +1 @@ -Hexo + Theme.Shoka + Valine 评论配置 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
  • valine 评论需要 LeanCloud 支持

# LeanCloud 注册

  1. LeanCloud 网站完成注册。
  2. 创建应用。
  3. 名称随便取,方案看自己选择。开发版免费但是有限制,商业版收费无限制。
  4. 点击配置按钮进行配置。
  5. 点击设置 - 应用凭证可获取 App ID 和 App Key
  6. 点击设置 - 安全中心根据自己的需求配置

# 修改 Theme.Shoka 配置

valine:
  appId: 粘贴5中获取的App ID #Your_appId
  appKey: 粘贴5中获取的App Key #Your_appkey
  placeholder: ヽ(○´∀`)ノ♪欢迎畅所欲言 # Comment box placeholder
  avatar: mp #默认头像设置 Gravatar style : mp, identicon, monsterid, wavatar, robohash, retro
  pageSize: 10 # Pagination size
  lang: zh-CN
  visitor: true # Article reading statistic 这个要设置为 false,以免与 leancloud_visitors 突冲 
  NoRecordIP: false # Whether to record the commenter IP
  serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
  powerMode: true
  tagMeta:
    visitor: 新朋友
    master: 博主
    friend: 小伙伴
    investor: 金主粑粑
  tagColor:
    master: "var(--color-orange)"
    friend: "var(--color-aqua)"
    investor: "var(--color-pink)"
  tagMember:
    master:
      # - hash of master@email.com
      # - hash of master2@email.com
    friend:
      # - hash of friend@email.com
      # - hash of friend2@email.com
    investor:
      # - hash of investor1@email.com
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Hexo + Theme.Shoka + Valine 评论配置 - Hexo - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
  • valine 评论需要 LeanCloud 支持

# LeanCloud 注册

  1. LeanCloud 网站完成注册。
  2. 创建应用。
  3. 名称随便取,方案看自己选择。开发版免费但是有限制,商业版收费无限制。
  4. 点击配置按钮进行配置。
  5. 点击设置 - 应用凭证可获取 App ID 和 App Key
  6. 点击设置 - 安全中心根据自己的需求配置

# 修改 Theme.Shoka 配置

valine:
  appId: 粘贴5中获取的App ID #Your_appId
  appKey: 粘贴5中获取的App Key #Your_appkey
  placeholder: ヽ(○´∀`)ノ♪欢迎畅所欲言 # Comment box placeholder
  avatar: mp #默认头像设置 Gravatar style : mp, identicon, monsterid, wavatar, robohash, retro
  pageSize: 10 # Pagination size
  lang: zh-CN
  visitor: true # Article reading statistic 这个要设置为 false,以免与 leancloud_visitors 突冲 
  NoRecordIP: false # Whether to record the commenter IP
  serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)
  powerMode: true
  tagMeta:
    visitor: 新朋友
    master: 博主
    friend: 小伙伴
    investor: 金主粑粑
  tagColor:
    master: "var(--color-orange)"
    friend: "var(--color-aqua)"
    investor: "var(--color-pink)"
  tagMember:
    master:
      # - hash of master@email.com
      # - hash of master2@email.com
    friend:
      # - hash of friend@email.com
      # - hash of friend2@email.com
    investor:
      # - hash of investor1@email.com
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/10/21/极空间Docker版mariadb安装与配置/index.html b/2022/10/21/极空间Docker版mariadb安装与配置/index.html index 480e30304..2b52154df 100644 --- a/2022/10/21/极空间Docker版mariadb安装与配置/index.html +++ b/2022/10/21/极空间Docker版mariadb安装与配置/index.html @@ -1 +1 @@ -极空间 Docker 版 mariadb 安装与配置 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • mariadb 属于 mysql 的一个分支,完全兼容 mysql,使用方式和 mysql 无区别。

# 安装

  • 本文介绍安装的镜像为 linuxserver_mariadb 的 10.5.13-r0-ls45,原则上使用最新版即可
  • 配置文件映射
  • 端口
  • 环境(MYSQL_ROOT_PASSWORD 为数据库 root 用户密码)
  • 到此已经可以在内网使用了,连接方法同 mysql 一样

按本文设置内网连接信息为:
ip:极空间内网 ip
端口:3306
用户名:root
密码:MYSQL_ROOT_PASSWORD 对应的值

# 配置

  • 配置 nginx 反向代理
stream {
	
	#极空间 - docker-mariadb
	upstream mariadb {
		hash $remote_addr consistent;
		server 192.168.0.254:3306; #192.168.0.254 为极空间内网 ip
	}
	server {
		listen 8090; #8090 为 nginx 监听端口,需要在路由器开放 8090 端口并映射给极空间内网 IP(nginx 部署在极空间上)
		proxy_connect_timeout 30s;
		proxy_timeout 300s;
		proxy_pass mariadb;
	}
    
}
\ No newline at end of file +极空间 Docker 版 mariadb 安装与配置 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • mariadb 属于 mysql 的一个分支,完全兼容 mysql,使用方式和 mysql 无区别。

# 安装

  • 本文介绍安装的镜像为 linuxserver_mariadb 的 10.5.13-r0-ls45,原则上使用最新版即可
  • 配置文件映射
  • 端口
  • 环境(MYSQL_ROOT_PASSWORD 为数据库 root 用户密码)
  • 到此已经可以在内网使用了,连接方法同 mysql 一样

按本文设置内网连接信息为:
ip:极空间内网 ip
端口:3306
用户名:root
密码:MYSQL_ROOT_PASSWORD 对应的值

# 配置

  • 配置 nginx 反向代理
stream {
	
	#极空间 - docker-mariadb
	upstream mariadb {
		hash $remote_addr consistent;
		server 192.168.0.254:3306; #192.168.0.254 为极空间内网 ip
	}
	server {
		listen 8090; #8090 为 nginx 监听端口,需要在路由器开放 8090 端口并映射给极空间内网 IP(nginx 部署在极空间上)
		proxy_connect_timeout 30s;
		proxy_timeout 300s;
		proxy_pass mariadb;
	}
    
}
\ No newline at end of file diff --git a/2022/10/22/极空间Docker版青龙面板安装与配置/index.html b/2022/10/22/极空间Docker版青龙面板安装与配置/index.html index ce7aa1007..313f6efd2 100644 --- a/2022/10/22/极空间Docker版青龙面板安装与配置/index.html +++ b/2022/10/22/极空间Docker版青龙面板安装与配置/index.html @@ -1 +1 @@ -极空间 Docker 版青龙面板安装与配置 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • 青龙面板是一个支持 python3、javascript、shell、typescript 的定时任务管理面板。它支持在线管理脚本、环境变量、配置文件,支持在线查看日志及支持多种方式的消息通知。

# 安装

  • 本文使用的是 whyour/qinglong 的镜像。
  • 路径映射(由于青龙面板有 nodejs 环境,所以我把 hexo 博客的编译也放置在上面,再把 nginx 的 html 映射过来,这样就可以直接编译发布了。)
#青龙面板装载路径
/ql/data
#博客装载路径(如果你不部署 hexo 博客可以不用配置)
/root/.ssh  #ssh 证书文件(如果你不用把 hexo 推送到 git 上可以不用配置)
/blog      #hexo 博客编译目录
/blog/nginx_blog  #nginx 上放置博客的目录(例如:/Docker/nginx/html/blog)
  • 端口

    4000端口是hexo-admin使用的,如果你不用可以不配置
  • 环境
  • 登录
    地址:http:// 极空间 IP:5700
    默认账号:admin
    默认密码:admin

# 配置

  • 我主要用青龙面板跑京东的脚本,所以也只介绍相关的配置方法
  • 定时任务 (我使用的是 KingRan/KR 的集合库,以下是拉取命令)
    ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp|wskey" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"
  • 定时规则(我是每 3 小时拉取一次,不要拉取太频繁否则可能被封)
    0 */3 * * *
  • 环境变量
名称:JD_COOKIE
值:web京东登陆后按F12在网络tab页中的请求内查找cookie,然后复制pt_key=到pt_pin=等
  • 配置文件 (主要修改和添加以下配置)
repo命令拉取脚本时需要拉取的文件后缀,直接写文件后缀名即可
RepoFileExtensions="js py ts"
钉钉(消息推送)
export DD_BOT_TOKEN=
export DD_BOT_SECRET=
## 开卡
export guaopencard_All="true"
export guaopencard_addSku_All="true"
export guaopencardRun_All="true"
export guaopencard_draw="true"
export JD_TRY="true"
export exjxbeans="true"
export DY_OPENALL="true"
#抽奖
export opencard_draw=3
#开启脚本依赖文件缺失修复
export ec_fix_dep="true" 
#开启脚本依赖文件更新
export ec_re_dep="true" 
#清空购物车
export JD_CART_REMOVE="true"
export JD_CART="true"
#去掉多余的双十一红包脚本
export FLCODE=''
#加购物车抽奖
export RUN_CAR=true
#停用小额免密支付
export JD_PAY_CONTRACT=true
  • 依赖管理
#nodejs 依赖
crypto-js	
prettytable	
dotenv	
jsdom	
date-fns	
tough-cookie	
tslib	
ws@7.4.3	
ts-md5	
jsdom -g	
jieba	
fs	
form-data	
json5	
global-agent	
png-js	
@types/node	
require	
typescript	
js-base64	
axios
#pythone 依赖
requests	
canvas	
ping3	
jieba	
aiohttp	
PyExecJS
#Linux 依赖
bizCode
bizMsg
lxml

# 其它

#配置国内源
pip config --global set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config --global set install.trusted-host https://mirrors.aliyun.com
#升级 pip
pip install --upgrade pip
#更新青龙
ql update
#已知要安装的依赖(不安装部分脚本任务会失败)
pnpm install ds
#一键安装所有依赖(基于 Faker 一键脚本安装的青龙
可通过执行/ql/data/scripts下的QLDependency.sh脚本安装,如脚本已经更新则通过下面命令执行
curl -fsSL https://git.metauniverse-cn.com/https://raw.githubusercontent.com/shufflewzc/QLDependency/main/Shell/QLOneKeyDependency.sh | sh
#一般出现这种错误:(缺依赖)
Error: Cannot find module 'xx'
执行pnpm install xxx
#一般出现这种错误:(缺文件)
Error: Cannot find module './xx'
那就是拉库命令不完整,请检查或复制完整的拉库命
#Python3 依赖安装失败修复(基于 Faker 一键脚本安装的青龙)
curl -sS https://bootstrap.pypa.io/get-pip.py | python3
\ No newline at end of file +极空间 Docker 版青龙面板安装与配置 - Docker - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • 青龙面板是一个支持 python3、javascript、shell、typescript 的定时任务管理面板。它支持在线管理脚本、环境变量、配置文件,支持在线查看日志及支持多种方式的消息通知。

# 安装

  • 本文使用的是 whyour/qinglong 的镜像。
  • 路径映射(由于青龙面板有 nodejs 环境,所以我把 hexo 博客的编译也放置在上面,再把 nginx 的 html 映射过来,这样就可以直接编译发布了。)
#青龙面板装载路径
/ql/data
#博客装载路径(如果你不部署 hexo 博客可以不用配置)
/root/.ssh  #ssh 证书文件(如果你不用把 hexo 推送到 git 上可以不用配置)
/blog      #hexo 博客编译目录
/blog/nginx_blog  #nginx 上放置博客的目录(例如:/Docker/nginx/html/blog)
  • 端口

    4000端口是hexo-admin使用的,如果你不用可以不配置
  • 环境
  • 登录
    地址:http:// 极空间 IP:5700
    默认账号:admin
    默认密码:admin

# 配置

  • 我主要用青龙面板跑京东的脚本,所以也只介绍相关的配置方法
  • 定时任务 (我使用的是 KingRan/KR 的集合库,以下是拉取命令)
    ql repo https://github.com/KingRan/KR.git "jd_|jx_|jdCookie" "activity|backUp|wskey" "^jd[^_]|USER|utils|function|sign|sendNotify|ql|JDJR"
  • 定时规则(我是每 3 小时拉取一次,不要拉取太频繁否则可能被封)
    0 */3 * * *
  • 环境变量
名称:JD_COOKIE
值:web京东登陆后按F12在网络tab页中的请求内查找cookie,然后复制pt_key=到pt_pin=等
  • 配置文件 (主要修改和添加以下配置)
repo命令拉取脚本时需要拉取的文件后缀,直接写文件后缀名即可
RepoFileExtensions="js py ts"
钉钉(消息推送)
export DD_BOT_TOKEN=
export DD_BOT_SECRET=
## 开卡
export guaopencard_All="true"
export guaopencard_addSku_All="true"
export guaopencardRun_All="true"
export guaopencard_draw="true"
export JD_TRY="true"
export exjxbeans="true"
export DY_OPENALL="true"
#抽奖
export opencard_draw=3
#开启脚本依赖文件缺失修复
export ec_fix_dep="true" 
#开启脚本依赖文件更新
export ec_re_dep="true" 
#清空购物车
export JD_CART_REMOVE="true"
export JD_CART="true"
#去掉多余的双十一红包脚本
export FLCODE=''
#加购物车抽奖
export RUN_CAR=true
#停用小额免密支付
export JD_PAY_CONTRACT=true
  • 依赖管理
#nodejs 依赖
crypto-js	
prettytable	
dotenv	
jsdom	
date-fns	
tough-cookie	
tslib	
ws@7.4.3	
ts-md5	
jsdom -g	
jieba	
fs	
form-data	
json5	
global-agent	
png-js	
@types/node	
require	
typescript	
js-base64	
axios
#pythone 依赖
requests	
canvas	
ping3	
jieba	
aiohttp	
PyExecJS
#Linux 依赖
bizCode
bizMsg
lxml

# 其它

#配置国内源
pip config --global set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config --global set install.trusted-host https://mirrors.aliyun.com
#升级 pip
pip install --upgrade pip
#更新青龙
ql update
#已知要安装的依赖(不安装部分脚本任务会失败)
pnpm install ds
#一键安装所有依赖(基于 Faker 一键脚本安装的青龙
可通过执行/ql/data/scripts下的QLDependency.sh脚本安装,如脚本已经更新则通过下面命令执行
curl -fsSL https://git.metauniverse-cn.com/https://raw.githubusercontent.com/shufflewzc/QLDependency/main/Shell/QLOneKeyDependency.sh | sh
#一般出现这种错误:(缺依赖)
Error: Cannot find module 'xx'
执行pnpm install xxx
#一般出现这种错误:(缺文件)
Error: Cannot find module './xx'
那就是拉库命令不完整,请检查或复制完整的拉库命
#Python3 依赖安装失败修复(基于 Faker 一键脚本安装的青龙)
curl -sS https://bootstrap.pypa.io/get-pip.py | python3
\ No newline at end of file diff --git a/2022/10/27/极空间web端https直连nginx配置/index.html b/2022/10/27/极空间web端https直连nginx配置/index.html index 0a5e70ba9..637793ea1 100644 --- a/2022/10/27/极空间web端https直连nginx配置/index.html +++ b/2022/10/27/极空间web端https直连nginx配置/index.html @@ -1 +1 @@ -极空间 web 端 https 直连 nginx 配置 - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • ip 直连一般都映射了 5055, 但是直接访问 5055 极空间只提供了 http 协议,如果希望使用 https 协议则必须使用其它端口进行访问。以下方案采用 nginx 反向代理实现,端口使用 10000 举例。

# 配置

  1. 需要先把 10000 端口在路由器上做好映射。
  2. 证书生成好并放置到 nginx 上。(证书生成方法不做介绍请自行百度)
  3. http 跳转 https 配置
server {
		if ($scheme = http) {
			rewrite ^(.*)$ https://$host$1 permanent;
		}
}
  1. web 端口监听配置
#极空间 - web
server {
	listen 10000 ssl http2; #ipv4
	listen [::]:10000 ssl http2; #ipv6
	server_name xxx.xxx.com; #填写自己的域名,主域名或者子域名
	#include /etc/nginx/conf.d/ssl/ssl_common.conf;
	ssl_certificate_key /etc/nginx/conf.d/ssl/xxx.key;  #加密证书
	ssl_certificate /etc/nginx/conf.d/ssl/xxx.pem;  #加密证书
	ssl_session_timeout 1d;
	ssl_session_cache shared:MozSSL:10m;
	ssl_session_tickets off;
	ssl_protocols TLSv1.2 TLSv1.3;
	ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
	ssl_prefer_server_ciphers on;
   #开启 OCSP stapling
	ssl_stapling on;
	ssl_stapling_verify on;
	client_max_body_size 128M;
	add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
	proxy_send_timeout 180s; #设置发送超时时间
   proxy_read_timeout 180s; #设置读取超时时间
	# Prevent Information leaks
	proxy_hide_header X-Powered-By;
	proxy_hide_header Server;
	proxy_hide_header X-AspNetMvc-Version;
	proxy_hide_header X-AspNet-Version;
	# http security headers
	add_header X-Content-Type-Options nosniff;
	add_header Pragma no-cache;
	add_header Cache-Control no-store;
	add_header X-XSS-Protection "1; mode=block";
	add_header Referrer-Policy origin-when-cross-origin;
	add_header X-Permitted-Cross-Domain-Policies none;
   add_header X-Frame-Options SAMEORIGIN; #允许同域嵌套
	# Add Security cookie flags
	proxy_cookie_path ~(.*) "$1; SameSite=strict; secure; httponly";
	# Path to the root of your installation
	location / {
		proxy_intercept_errors on;
		proxy_max_temp_file_size 0;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
  
		proxy_pass http://极空间内网ip:5055; #这里设置你自己要跳转的局域网应用;
		proxy_redirect http://域名:5055/home https://域名:10000/home; #极空间在登陆后会跳转到 http 协议的 5055 端口,所以要在此替换为 https 协议的 10000 端口
	}
	error_page  500 502 503 504 /500.html;
	error_page  400 404 /500.html;
	location = /500.html {
		root /usr/share/nginx/html/; #错误 html
	}
}

# 问题

  • 需要开启允许嵌套否则登陆后所有应用都是拒绝访问
  • 需要配置 proxy_redirect 替换响应 url,否则会跳转到默认 http 协议的 5055 端口
  • 如果配置 proxy_redirect 后无效可能需要清除浏览器缓存(F12 - 网络 - 右键点击 url 区域 - 清除浏览器缓存)
\ No newline at end of file +极空间 web 端 https 直连 nginx 配置 - 极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • ip 直连一般都映射了 5055, 但是直接访问 5055 极空间只提供了 http 协议,如果希望使用 https 协议则必须使用其它端口进行访问。以下方案采用 nginx 反向代理实现,端口使用 10000 举例。

# 配置

  1. 需要先把 10000 端口在路由器上做好映射。
  2. 证书生成好并放置到 nginx 上。(证书生成方法不做介绍请自行百度)
  3. http 跳转 https 配置
server {
		if ($scheme = http) {
			rewrite ^(.*)$ https://$host$1 permanent;
		}
}
  1. web 端口监听配置
#极空间 - web
server {
	listen 10000 ssl http2; #ipv4
	listen [::]:10000 ssl http2; #ipv6
	server_name xxx.xxx.com; #填写自己的域名,主域名或者子域名
	#include /etc/nginx/conf.d/ssl/ssl_common.conf;
	ssl_certificate_key /etc/nginx/conf.d/ssl/xxx.key;  #加密证书
	ssl_certificate /etc/nginx/conf.d/ssl/xxx.pem;  #加密证书
	ssl_session_timeout 1d;
	ssl_session_cache shared:MozSSL:10m;
	ssl_session_tickets off;
	ssl_protocols TLSv1.2 TLSv1.3;
	ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
	ssl_prefer_server_ciphers on;
   #开启 OCSP stapling
	ssl_stapling on;
	ssl_stapling_verify on;
	client_max_body_size 128M;
	add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload";
	proxy_send_timeout 180s; #设置发送超时时间
   proxy_read_timeout 180s; #设置读取超时时间
	# Prevent Information leaks
	proxy_hide_header X-Powered-By;
	proxy_hide_header Server;
	proxy_hide_header X-AspNetMvc-Version;
	proxy_hide_header X-AspNet-Version;
	# http security headers
	add_header X-Content-Type-Options nosniff;
	add_header Pragma no-cache;
	add_header Cache-Control no-store;
	add_header X-XSS-Protection "1; mode=block";
	add_header Referrer-Policy origin-when-cross-origin;
	add_header X-Permitted-Cross-Domain-Policies none;
   add_header X-Frame-Options SAMEORIGIN; #允许同域嵌套
	# Add Security cookie flags
	proxy_cookie_path ~(.*) "$1; SameSite=strict; secure; httponly";
	# Path to the root of your installation
	location / {
		proxy_intercept_errors on;
		proxy_max_temp_file_size 0;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
  
		proxy_pass http://极空间内网ip:5055; #这里设置你自己要跳转的局域网应用;
		proxy_redirect http://域名:5055/home https://域名:10000/home; #极空间在登陆后会跳转到 http 协议的 5055 端口,所以要在此替换为 https 协议的 10000 端口
	}
	error_page  500 502 503 504 /500.html;
	error_page  400 404 /500.html;
	location = /500.html {
		root /usr/share/nginx/html/; #错误 html
	}
}

# 问题

  • 需要开启允许嵌套否则登陆后所有应用都是拒绝访问
  • 需要配置 proxy_redirect 替换响应 url,否则会跳转到默认 http 协议的 5055 端口
  • 如果配置 proxy_redirect 后无效可能需要清除浏览器缓存(F12 - 网络 - 右键点击 url 区域 - 清除浏览器缓存)
\ No newline at end of file diff --git a/2022/10/31/一键关闭Windows10-11系统自动更新/index.html b/2022/10/31/一键关闭Windows10-11系统自动更新/index.html index 9d7a026bb..cfdcbb9bf 100644 --- a/2022/10/31/一键关闭Windows10-11系统自动更新/index.html +++ b/2022/10/31/一键关闭Windows10-11系统自动更新/index.html @@ -1 +1 @@ -一键关闭 Windows10/11 系统自动更新 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • 当你经常需要在家远程到公司进行办公,或者开启了很多临时文件、文档、软件需要等到第二天继续之前的工作时,结果系统自行更新并重启了。是不是会让你非常郁闷。关闭系统自行更新就可以轻松解决此类问题。

# 下载

win10 / win11 / 本地

\ No newline at end of file +一键关闭 Windows10/11 系统自动更新 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

  • 当你经常需要在家远程到公司进行办公,或者开启了很多临时文件、文档、软件需要等到第二天继续之前的工作时,结果系统自行更新并重启了。是不是会让你非常郁闷。关闭系统自行更新就可以轻松解决此类问题。

# 下载

win10 / win11 / 本地

\ No newline at end of file diff --git a/2022/11/01/360独立版小工具/index.html b/2022/11/01/360独立版小工具/index.html index ee29a08f1..97f2bd19a 100644 --- a/2022/11/01/360独立版小工具/index.html +++ b/2022/11/01/360独立版小工具/index.html @@ -1 +1 @@ -360 独立版小工具 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 360 独立版小工具


360 全家桶众说纷纭但工具箱还是挺实用的,这波小工具可以单独下载使用,有需要的朋友赶紧下载吧!

下载地址

# 部分工具截图



更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +360 独立版小工具 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 360 独立版小工具


360 全家桶众说纷纭但工具箱还是挺实用的,这波小工具可以单独下载使用,有需要的朋友赶紧下载吧!

下载地址

# 部分工具截图



更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/02/2-dev-null和-dev-null-2-1和2-1-dev-null的区别/index.html b/2022/11/02/2-dev-null和-dev-null-2-1和2-1-dev-null的区别/index.html index 21561e215..cad6f7e64 100644 --- a/2022/11/02/2-dev-null和-dev-null-2-1和2-1-dev-null的区别/index.html +++ b/2022/11/02/2-dev-null和-dev-null-2-1和2-1-dev-null的区别/index.html @@ -1 +1 @@ -2>/dev/null 和 >/dev/null 2>&1 和 2>&1>/dev/null 的区别 - Shell - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 区别:

2>/dev/null

意思就是把错误输出到 “黑洞”

>/dev/null 2>&1

默认情况是 1,也就是等同于 1>/dev/null 2>&1。意思就是把标准输出重定向到 “黑洞”,还把错误输出 2 重定向到标准输出 1,也就是标准输出和错误输出都进了 “黑洞”

2>&1 >/dev/null

意思就是把错误输出 2 重定向到标准出书 1,也就是屏幕,标准输出进了 “黑洞”,也就是标准输出进了黑洞,错误输出打印到屏幕

# 解释:

  1. 文件描述符
    Linux 系统预留三个文件描述符:0、1 和 2,他们的意义如下所示:
    0—— 标准输入(stdin)
    略...
    1—— 标准输出(stdout)
    在当前目录下,有且只有一个文件名称为 a.txt 的文件,这时我们运行这个命令【ls a.txt】, 就会获得一个标准输出 stdout 的输出结果:a.txt

    2—— 标准错误(stderr)
    在当前目录下,有且只有一个文件名称为 a.txt 的文件,我们运行命令【ls b.txt】,我们就会获得一个标准错误 stderr 的输出结果 “ls:无法访问 b.txt:没有这样的文件或目录”。

  2. 重定向
    重定向的符号有两个:> 或 >>,两者的区别是:前者会先清空文件,然后再写入内容,后者会将重定向的内容追加到现有文件的尾部。举例如下:

  • 重定向标准输出 stdout

    如上图所示,对比没有添加重定向的操作,这条命令在使用之后并没有将 a.txt 打印到屏幕。在紧接的 cat 操作后,可以发现本来应该被输出的内容被记录到 stdout.txt 中。

  • 重定向标准错误 stderr

    如上图所示,文件描述符 2,标准错误的重定向也是同样的原理被记录在了文件 stderr.txt 这个文件里面了。

  • 可以将 stderr 单独定向到一个文件,stdout 重定向到另一个文件

ls b.txt 2> stderr.txt 1>stdout.txt
  • 也可以将 stderr 和 stdout 重定向到同一个文件
ls b.txt > output.txt 2>&1
  • 或采用下面的方法,可以少写几个字,能达到同样的效果
ls b.txt &> output.txt
ls b.txt >& output.txt #两个表达式效果一样的
  1. Linux 特殊文件
    /dev/null 是一个特殊的设备文件,这个文件接收到任何数据都会被丢弃。因此,null 这个设备通常也被称为位桶(bit bucket)或黑洞。
    所以,2>/dev/null 的意思就是将标准错误 stderr 删掉。
\ No newline at end of file +2>/dev/null 和 >/dev/null 2>&1 和 2>&1>/dev/null 的区别 - Shell - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 区别:

2>/dev/null

意思就是把错误输出到 “黑洞”

>/dev/null 2>&1

默认情况是 1,也就是等同于 1>/dev/null 2>&1。意思就是把标准输出重定向到 “黑洞”,还把错误输出 2 重定向到标准输出 1,也就是标准输出和错误输出都进了 “黑洞”

2>&1 >/dev/null

意思就是把错误输出 2 重定向到标准出书 1,也就是屏幕,标准输出进了 “黑洞”,也就是标准输出进了黑洞,错误输出打印到屏幕

# 解释:

  1. 文件描述符
    Linux 系统预留三个文件描述符:0、1 和 2,他们的意义如下所示:
    0—— 标准输入(stdin)
    略...
    1—— 标准输出(stdout)
    在当前目录下,有且只有一个文件名称为 a.txt 的文件,这时我们运行这个命令【ls a.txt】, 就会获得一个标准输出 stdout 的输出结果:a.txt

    2—— 标准错误(stderr)
    在当前目录下,有且只有一个文件名称为 a.txt 的文件,我们运行命令【ls b.txt】,我们就会获得一个标准错误 stderr 的输出结果 “ls:无法访问 b.txt:没有这样的文件或目录”。

  2. 重定向
    重定向的符号有两个:> 或 >>,两者的区别是:前者会先清空文件,然后再写入内容,后者会将重定向的内容追加到现有文件的尾部。举例如下:

  • 重定向标准输出 stdout

    如上图所示,对比没有添加重定向的操作,这条命令在使用之后并没有将 a.txt 打印到屏幕。在紧接的 cat 操作后,可以发现本来应该被输出的内容被记录到 stdout.txt 中。

  • 重定向标准错误 stderr

    如上图所示,文件描述符 2,标准错误的重定向也是同样的原理被记录在了文件 stderr.txt 这个文件里面了。

  • 可以将 stderr 单独定向到一个文件,stdout 重定向到另一个文件

ls b.txt 2> stderr.txt 1>stdout.txt
  • 也可以将 stderr 和 stdout 重定向到同一个文件
ls b.txt > output.txt 2>&1
  • 或采用下面的方法,可以少写几个字,能达到同样的效果
ls b.txt &> output.txt
ls b.txt >& output.txt #两个表达式效果一样的
  1. Linux 特殊文件
    /dev/null 是一个特殊的设备文件,这个文件接收到任何数据都会被丢弃。因此,null 这个设备通常也被称为位桶(bit bucket)或黑洞。
    所以,2>/dev/null 的意思就是将标准错误 stderr 删掉。
\ No newline at end of file diff --git a/2022/11/03/上班了/index.html b/2022/11/03/上班了/index.html index 6fa6e7f81..4d7fe7e87 100644 --- a/2022/11/03/上班了/index.html +++ b/2022/11/03/上班了/index.html @@ -1 +1 @@ -上班了 - 心情 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
  • 终于又上班了。O (∩_∩) O~
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +上班了 - 心情 - 生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
  • 终于又上班了。O (∩_∩) O~
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/04/记一次Vue项目的部署/index.html b/2022/11/04/记一次Vue项目的部署/index.html index 6e082ae50..7719a680f 100644 --- a/2022/11/04/记一次Vue项目的部署/index.html +++ b/2022/11/04/记一次Vue项目的部署/index.html @@ -1 +1 @@ -记一次 Vue 项目的部署 - Vue - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 描述

  • 今天需要把一个 web 项目部署到 ubuntu 服务器上,结果直接使用 apt install nodejs 安装的 nodejs 版本过低,导致编译失败。最后通过查看官网文档获取到了 ubuntu 最新 nodejs 的安装命令。

# 过程

  • 卸载旧的 nodejs(此命令会卸载掉相关依赖包)
sudo apt autoremove --purge nodejs
  • 安装 NodeJS
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - && sudo apt-get install -y nodejs
  • 安装 yarn
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
  • 初始化 (到项目根目录执行)
yarn install
  • 编译(到项目根目录执行,完成后会生成 dist 目录)
yarn build
  • 安装 nginx
apt install nginx
  • 配置 nginx (编译 /etc/nginx/sites-available/default)
server {
        listen 80 default_server;
        listen [::]:80 default_server;
        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;
        root /var/www/html;
        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;
        server_name _;
        location /api {
                proxy_pass http://localhost:8080;
        }
        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                #try_files $uri $uri/ =404;
                alias /opt/codes/dayu-tools-arbitrage-web/dist/;
                index index.html index.htm;
        }

# 其它

  • 重新编译前需要先删除 dist 目录
rm dist -fr
yarn build
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +记一次 Vue 项目的部署 - Vue - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 描述

  • 今天需要把一个 web 项目部署到 ubuntu 服务器上,结果直接使用 apt install nodejs 安装的 nodejs 版本过低,导致编译失败。最后通过查看官网文档获取到了 ubuntu 最新 nodejs 的安装命令。

# 过程

  • 卸载旧的 nodejs(此命令会卸载掉相关依赖包)
sudo apt autoremove --purge nodejs
  • 安装 NodeJS
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - && sudo apt-get install -y nodejs
  • 安装 yarn
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
  • 初始化 (到项目根目录执行)
yarn install
  • 编译(到项目根目录执行,完成后会生成 dist 目录)
yarn build
  • 安装 nginx
apt install nginx
  • 配置 nginx (编译 /etc/nginx/sites-available/default)
server {
        listen 80 default_server;
        listen [::]:80 default_server;
        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;
        root /var/www/html;
        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;
        server_name _;
        location /api {
                proxy_pass http://localhost:8080;
        }
        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                #try_files $uri $uri/ =404;
                alias /opt/codes/dayu-tools-arbitrage-web/dist/;
                index index.html index.htm;
        }

# 其它

  • 重新编译前需要先删除 dist 目录
rm dist -fr
yarn build
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/08/Nginx配置-反向代理/index.html b/2022/11/08/Nginx配置-反向代理/index.html index 4322ad0fe..8fe7a6867 100644 --- a/2022/11/08/Nginx配置-反向代理/index.html +++ b/2022/11/08/Nginx配置-反向代理/index.html @@ -1 +1 @@ -Nginx 配置 - 反向代理 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

  • 所有配置方法和介绍均来至于网络搜索汇总,主要用于方便后期巩固学习。

# 何为反向代理

  • 在介绍反向代理之前,先来了解一下正向代理。

正向代理:如果把局域网外的 Internet 想象成一个巨大的资源库,则局域网中的客户端要访问 Internet,则需要通过代理服务器来访问,这种代理服务就称为正向代理,下面是正向代理的原理图。
991a203be1ec82b36e1f326376617d40.png
反向代理:看下面原理图,就一目了然。其实客户端对代理是无感知的,因为客户端不需要任何配置就可以访问,我们只需要将请求发送到反向代理服务器,由反向代理服务器去选择目标服务器获取数据后,在返回给客户端,此时反向代理服务器和目标服务器对外就是一个服务器,暴露的是代理服务器地址,隐藏了真实服务器 IP 地址。
1c87e386a0ce624a3949bda443cf346d.png

正向代理和反向代理的区别,一句话就是:如果我们客户端自己用,就是正向代理。如果是在服务器用,用户无感知,就是反向代理。

# Nginx 配置文件

  • 在学习 Nginx 之前,要熟知它的配置文件,毕竟,下面需要做的所有配置(反向代理、负载均衡、动静分离等),都是基于它的配置文件。

  • Nginx 默认的配置文件是在安装目录下的 conf 目录下,后续对 Nginx 的使用基本上都是对此配置文件进行相应的修改。完整的配置文件,可以看一下文章最后。修改过 nginx.conf 配置文件,记得要✔️重启 Nginx 服务(☆☆☆☆☆)

  • 配置文件中有很多 #号,该符号表示注释内容,去掉所有以 #开头的段落,精简之后的配置文件内容如下(PS:其实注释掉的地方,都是一些功能的使用代码,需要用到的时候,取消注释即可):

# 主进程叫 master,负责管理子进程,子进程叫 worker
# worker_processes 配置项表示开启几个业务进程,一般和 cpu 核数有关
worker_processes  1;
events {
    worker_connections  1024;
}
http {
	# include 表示可以引入其他文件,此处表示引入 http mime 类型
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
	# 虚拟主机,可以配置多个
    server {
        listen       80;
        server_name  localhost;
        location / {
        	# 路径匹配之后,哪个目录下去匹配相应的网页,html 是相对路径
            root   html;
            index  index.html index.htm;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
	}
}

去掉注释信息后,可以将 nginx.conf 配置文件分为三部分:

  1. 全局块
worker_processes  1;
  • 从配置文件开始到 events 块之间的内容,主要会设置一些影响 Nginx 服务器整体运行的配置指令,主要包括:配置运行 Nginx 服务器的用户(组)、允许生成的 worker process 数,进程 PID 存放路径、日志存放路径和类型以及配置文件的引入等。

  • 上面这行 worker_processes 配置,是 Nginx 服务器并发处理服务的关键配置,该值越大,可以支持的并发处理量也越多,但是会受到硬件、软件等设备的约束。

  1. events 块
events {
	worker_connections  1024;
}
  • events 块涉及的指令主要影响 Nginx 服务器与用户的网络连接,常用的设置包括:是否开启对多 work process 下的网络连接进行序列化,是否允许同时接收多个网络连接,选取哪种事件驱动模型来处理连接请求,每个 work process 可以同时支持的最大连接数等

上述例子就表示每个 work process 支持的最大连接数为 1024。这部分的配置对 Nginx 的性能影响较大,在实际中应该灵活配置。

  1. http 块
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
        location / {
            root   html;
            index  index.html index.htm;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
    }
}
  • 这部分是 Nginx 服务器配置中最频繁的部分,代理、缓存和日志定义等绝大多数功能和第三方模块的配置都在这里。需要注意的是:http 块也可以包括 http 全局块、server 块。下面的反向代理、动静分离、负载均衡都是在这部分中配置

http 全局块:http 全局块配置的指令包括:文件引入、MIME-TYPE 定义、日志自定义、连接超时时间、单链接请求数上限等。

server 块:这块和虚拟主机有密切关系,从用户角度看,虚拟主机和一台独立的硬件主机是完全一样的,该技术的产生是为了节省互联网服务器硬件成本。

location 块:这块的主要作用是:基于 Nginx 服务器接收到的请求字符串(例如 server_name/uri-string),对虚拟主机名称(也可以是 IP 别名)之外的字符串(例如 前面的 /uri-string)进行匹配,对特定的请求进行处理。地址定向、数据缓存和应答控制等功能,还有许多第三方模块的配置也在这里进行。

每个 http 块可以包括多个 server 块,而每个 server 块就相当于一个虚拟主机。而每个 server 块也分为全局 server 块,以及可以同时包含多个 locaton 块。(☆☆☆☆☆)

# 反向代理配置

  1. location 配置规则
location [ = | ~ | ~* | ^~ | @ ] /uri {
}
=    :用于不含正则表达式的 uri 前,要求请求字符串与 uri 严格匹配,如果匹配成功,就停止继续向下搜索并立即处理该请求。
~    :用于表示 uri 包含正则表达式,并且区分大小写。
~*   :用于表示 uri 包含正则表达式,并且不区分大小写。
^~   :用于不含正则表达式的 uri 前,要求 Nginx 服务器找到标识 uri 和请求字符串匹配度最高的location后,立即使用此 location 处理请求,而不再使用 location 块中的正则 uri 和请求字符串做匹配。
@    : "@" 定义一个命名的 location,使用在内部定向时,例如 error_page
/uri  :不带任何修饰符,也表示前缀匹配,但是在正则匹配之后,如果没有正则命中,命中最长的规则
/    :通用匹配,任何未匹配到其它location的请求都会匹配到,相当于switch中的default

uri 没有 “/” 结尾时location /abc/def 可以匹配 /abc/defghi 请求,也可以匹配 /abc/def/ghi 等
uri 有 “/” 结尾时location /abc/def/ 不能匹配 /abc/defghi 请求只能匹配 /abc/def/anything 这样的请求☆☆☆☆☆

  1. proxy_pass 配置规则

url 结尾加上了 /相当于是绝对路径则 Nginx 不会把 location 中匹配的路径部分加入代理 url
url 结尾不加 /Nginx 则会把匹配的路径部分加入代理 uri

情景1:
proxy_pass后有/ 
访问地址:http://localhost:8081/WCP.Service/wcp/modeladapter/download/asc.shtml
最终代理:http://10.194.171.7:13082/modeladapter/download/asc.shtml
location /WCP.Service/wcp/modeladapter/download/ {
	proxy_pass   http://10.194.171.7:13082/modeladapter/download/;
}
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/model/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082/model/;
}
情景2:
proxy_pass后有/
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082/;
}
情景3:
proxy_pass后没有/ 
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/model/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082;
}
情景4
proxy_pass后没有/ 
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/AAAmodel/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082/AAA;
}
情景5
proxy_pass后有/
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/asc.shtml
location /model {
	proxy_pass   http://127.0.0.1:8082/;
}
情景6
proxy_pass后有/
访问地址:http://localhost:8081/modelBBB/asc.shtml
最终代理:http://127.0.0.1:8082/asc.shtml
location /model {
	proxy_pass   http://127.0.0.1:8082/;
}

# Nginx 完整配置文件

#user  nobody;
worker_processes  1;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    #access_log  logs/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;
    #gzip  on;
    server {
        listen       80;
        server_name  localhost;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
            root   html;
            index  index.html index.htm;
        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }
    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
}
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Nginx 配置 - 反向代理 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

  • 所有配置方法和介绍均来至于网络搜索汇总,主要用于方便后期巩固学习。

# 何为反向代理

  • 在介绍反向代理之前,先来了解一下正向代理。

正向代理:如果把局域网外的 Internet 想象成一个巨大的资源库,则局域网中的客户端要访问 Internet,则需要通过代理服务器来访问,这种代理服务就称为正向代理,下面是正向代理的原理图。
991a203be1ec82b36e1f326376617d40.png
反向代理:看下面原理图,就一目了然。其实客户端对代理是无感知的,因为客户端不需要任何配置就可以访问,我们只需要将请求发送到反向代理服务器,由反向代理服务器去选择目标服务器获取数据后,在返回给客户端,此时反向代理服务器和目标服务器对外就是一个服务器,暴露的是代理服务器地址,隐藏了真实服务器 IP 地址。
1c87e386a0ce624a3949bda443cf346d.png

正向代理和反向代理的区别,一句话就是:如果我们客户端自己用,就是正向代理。如果是在服务器用,用户无感知,就是反向代理。

# Nginx 配置文件

  • 在学习 Nginx 之前,要熟知它的配置文件,毕竟,下面需要做的所有配置(反向代理、负载均衡、动静分离等),都是基于它的配置文件。

  • Nginx 默认的配置文件是在安装目录下的 conf 目录下,后续对 Nginx 的使用基本上都是对此配置文件进行相应的修改。完整的配置文件,可以看一下文章最后。修改过 nginx.conf 配置文件,记得要✔️重启 Nginx 服务(☆☆☆☆☆)

  • 配置文件中有很多 #号,该符号表示注释内容,去掉所有以 #开头的段落,精简之后的配置文件内容如下(PS:其实注释掉的地方,都是一些功能的使用代码,需要用到的时候,取消注释即可):

# 主进程叫 master,负责管理子进程,子进程叫 worker
# worker_processes 配置项表示开启几个业务进程,一般和 cpu 核数有关
worker_processes  1;
events {
    worker_connections  1024;
}
http {
	# include 表示可以引入其他文件,此处表示引入 http mime 类型
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
	# 虚拟主机,可以配置多个
    server {
        listen       80;
        server_name  localhost;
        location / {
        	# 路径匹配之后,哪个目录下去匹配相应的网页,html 是相对路径
            root   html;
            index  index.html index.htm;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
	}
}

去掉注释信息后,可以将 nginx.conf 配置文件分为三部分:

  1. 全局块
worker_processes  1;
  • 从配置文件开始到 events 块之间的内容,主要会设置一些影响 Nginx 服务器整体运行的配置指令,主要包括:配置运行 Nginx 服务器的用户(组)、允许生成的 worker process 数,进程 PID 存放路径、日志存放路径和类型以及配置文件的引入等。

  • 上面这行 worker_processes 配置,是 Nginx 服务器并发处理服务的关键配置,该值越大,可以支持的并发处理量也越多,但是会受到硬件、软件等设备的约束。

  1. events 块
events {
	worker_connections  1024;
}
  • events 块涉及的指令主要影响 Nginx 服务器与用户的网络连接,常用的设置包括:是否开启对多 work process 下的网络连接进行序列化,是否允许同时接收多个网络连接,选取哪种事件驱动模型来处理连接请求,每个 work process 可以同时支持的最大连接数等

上述例子就表示每个 work process 支持的最大连接数为 1024。这部分的配置对 Nginx 的性能影响较大,在实际中应该灵活配置。

  1. http 块
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
        location / {
            root   html;
            index  index.html index.htm;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
    }
}
  • 这部分是 Nginx 服务器配置中最频繁的部分,代理、缓存和日志定义等绝大多数功能和第三方模块的配置都在这里。需要注意的是:http 块也可以包括 http 全局块、server 块。下面的反向代理、动静分离、负载均衡都是在这部分中配置

http 全局块:http 全局块配置的指令包括:文件引入、MIME-TYPE 定义、日志自定义、连接超时时间、单链接请求数上限等。

server 块:这块和虚拟主机有密切关系,从用户角度看,虚拟主机和一台独立的硬件主机是完全一样的,该技术的产生是为了节省互联网服务器硬件成本。

location 块:这块的主要作用是:基于 Nginx 服务器接收到的请求字符串(例如 server_name/uri-string),对虚拟主机名称(也可以是 IP 别名)之外的字符串(例如 前面的 /uri-string)进行匹配,对特定的请求进行处理。地址定向、数据缓存和应答控制等功能,还有许多第三方模块的配置也在这里进行。

每个 http 块可以包括多个 server 块,而每个 server 块就相当于一个虚拟主机。而每个 server 块也分为全局 server 块,以及可以同时包含多个 locaton 块。(☆☆☆☆☆)

# 反向代理配置

  1. location 配置规则
location [ = | ~ | ~* | ^~ | @ ] /uri {
}
=    :用于不含正则表达式的 uri 前,要求请求字符串与 uri 严格匹配,如果匹配成功,就停止继续向下搜索并立即处理该请求。
~    :用于表示 uri 包含正则表达式,并且区分大小写。
~*   :用于表示 uri 包含正则表达式,并且不区分大小写。
^~   :用于不含正则表达式的 uri 前,要求 Nginx 服务器找到标识 uri 和请求字符串匹配度最高的location后,立即使用此 location 处理请求,而不再使用 location 块中的正则 uri 和请求字符串做匹配。
@    : "@" 定义一个命名的 location,使用在内部定向时,例如 error_page
/uri  :不带任何修饰符,也表示前缀匹配,但是在正则匹配之后,如果没有正则命中,命中最长的规则
/    :通用匹配,任何未匹配到其它location的请求都会匹配到,相当于switch中的default

uri 没有 “/” 结尾时location /abc/def 可以匹配 /abc/defghi 请求,也可以匹配 /abc/def/ghi 等
uri 有 “/” 结尾时location /abc/def/ 不能匹配 /abc/defghi 请求只能匹配 /abc/def/anything 这样的请求☆☆☆☆☆

  1. proxy_pass 配置规则

url 结尾加上了 /相当于是绝对路径则 Nginx 不会把 location 中匹配的路径部分加入代理 url
url 结尾不加 /Nginx 则会把匹配的路径部分加入代理 uri

情景1:
proxy_pass后有/ 
访问地址:http://localhost:8081/WCP.Service/wcp/modeladapter/download/asc.shtml
最终代理:http://10.194.171.7:13082/modeladapter/download/asc.shtml
location /WCP.Service/wcp/modeladapter/download/ {
	proxy_pass   http://10.194.171.7:13082/modeladapter/download/;
}
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/model/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082/model/;
}
情景2:
proxy_pass后有/
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082/;
}
情景3:
proxy_pass后没有/ 
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/model/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082;
}
情景4
proxy_pass后没有/ 
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/AAAmodel/asc.shtml
location /model/ {
	proxy_pass   http://127.0.0.1:8082/AAA;
}
情景5
proxy_pass后有/
访问地址:http://localhost:8081/model/asc.shtml
最终代理:http://127.0.0.1:8082/asc.shtml
location /model {
	proxy_pass   http://127.0.0.1:8082/;
}
情景6
proxy_pass后有/
访问地址:http://localhost:8081/modelBBB/asc.shtml
最终代理:http://127.0.0.1:8082/asc.shtml
location /model {
	proxy_pass   http://127.0.0.1:8082/;
}

# Nginx 完整配置文件

#user  nobody;
worker_processes  1;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#pid        logs/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    #access_log  logs/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;
    #gzip  on;
    server {
        listen       80;
        server_name  localhost;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
            root   html;
            index  index.html index.htm;
        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }
    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;
    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
}
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/09/Vue按环境设置编译项目/index.html b/2022/11/09/Vue按环境设置编译项目/index.html index 392c9751e..9223ff664 100644 --- a/2022/11/09/Vue按环境设置编译项目/index.html +++ b/2022/11/09/Vue按环境设置编译项目/index.html @@ -1 +1 @@ -Vue 按环境设置编译项目 - Vue - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

  • 今天在部署 vue 项目时发现生产环境的端口只有一个,而且被多个项目公用了,刚好此项目又没有配置服务名而是直接使用的根路径。没办法只有修改项目配置重新编译了!

# 配置

  • 在项目根目录添加两个文件。

.env.alpha

NODE_ENV = 'production'
VUE_APP_BASE_URL = '/'

.env.prod

NODE_ENV = 'production'
VUE_APP_BASE_URL = '/projectName'
  • package.json 文件内添加不同环境的打包指令
"scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "build-test": "vue-cli-service build --mode alpha",
    "build-prod": "vue-cli-service build --mode prod",
    "lint": "vue-cli-service lint"
}
  • 项目中 base_url 需要使用 process.env.VUE_APP_BASE_URL 替换

  • 编译命令

yarn build-test #使用.env.alpha 配置文件中的参数
yarn build-prod #使用.env.prod 配置文件中的参数
yarn build --mode alpha #使用.env.alpha 配置文件中的参数
yarn build --mode prod #使用.env.prod 配置文件中的参数
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Vue 按环境设置编译项目 - Vue - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

  • 今天在部署 vue 项目时发现生产环境的端口只有一个,而且被多个项目公用了,刚好此项目又没有配置服务名而是直接使用的根路径。没办法只有修改项目配置重新编译了!

# 配置

  • 在项目根目录添加两个文件。

.env.alpha

NODE_ENV = 'production'
VUE_APP_BASE_URL = '/'

.env.prod

NODE_ENV = 'production'
VUE_APP_BASE_URL = '/projectName'
  • package.json 文件内添加不同环境的打包指令
"scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "build-test": "vue-cli-service build --mode alpha",
    "build-prod": "vue-cli-service build --mode prod",
    "lint": "vue-cli-service lint"
}
  • 项目中 base_url 需要使用 process.env.VUE_APP_BASE_URL 替换

  • 编译命令

yarn build-test #使用.env.alpha 配置文件中的参数
yarn build-prod #使用.env.prod 配置文件中的参数
yarn build --mode alpha #使用.env.alpha 配置文件中的参数
yarn build --mode prod #使用.env.prod 配置文件中的参数
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/13/数据库管理工具/index.html b/2022/11/13/数据库管理工具/index.html index 4e8956587..f79381457 100644 --- a/2022/11/13/数据库管理工具/index.html +++ b/2022/11/13/数据库管理工具/index.html @@ -1 +1 @@ -数据库管理工具 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

  • 很多朋友安装了 mysql 后不知道可以用工具管理,所以专门找了两个数据库管理工具方便大家使用。
  1. 下载
  2. 安装一路下一步即可 (注意:安装完成后先不要运行)
  3. 注册

1、运行注册机
2、修改 Your Name(可不改)
3、点击 Patch(此时会提示:navicat.exe - x64 -> Cracked
4、运行 navicat
5、点击第一个 Generate 获取注册码 (Your Name 上一行)
6、点击 Copy 然后粘贴到 navicat 窗口上(也可能会自动粘贴进去)
7、点击 navicat 上的激活按钮,等待一会,失败后会弹出手动激活按钮
8、点击手动激活,窗口上会有一个 request code,把框里的值复制到注册机对应的 request code 框内。
9、点击第二个 Generate 获取 Activation Code(激活码),把码复制到 navicat 对应的框内。
10、点击激活完成激活。

  1. 查看注册信息
  2. 测试连接
  3. 新建库

# DBeaver

  1. 下载
  2. 下载 jdk✔️有 JAVA 环境的不用下载
  3. 修改 dbeaver.ini 配置文件
-vm
D:\jdk-11.0.11\bin
-startup
plugins/org.eclipse.equinox.launcher_1.6.300.v20210813-1054.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.300.v20210828-0802
-vmargs
-XX:+IgnoreUnrecognizedVMOptions
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Xms128m
-Xmx2048m
-Djavax.net.ssl.trustStoreType=WINDOWS-ROOT
-Ddbeaver.distribution.type=zip
-javaagent:F:\green program\dbeaver\dbeaver-agent\dbeaver-agent.jar

第一二行指定 jdk 地址
最后一行指定 dbeaver-agent.jar 注册工具的位置

  1. 启动
  2. 注册成功
  3. 测试连接
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +数据库管理工具 - 工具 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

  • 很多朋友安装了 mysql 后不知道可以用工具管理,所以专门找了两个数据库管理工具方便大家使用。
  1. 下载
  2. 安装一路下一步即可 (注意:安装完成后先不要运行)
  3. 注册

1、运行注册机
2、修改 Your Name(可不改)
3、点击 Patch(此时会提示:navicat.exe - x64 -> Cracked
4、运行 navicat
5、点击第一个 Generate 获取注册码 (Your Name 上一行)
6、点击 Copy 然后粘贴到 navicat 窗口上(也可能会自动粘贴进去)
7、点击 navicat 上的激活按钮,等待一会,失败后会弹出手动激活按钮
8、点击手动激活,窗口上会有一个 request code,把框里的值复制到注册机对应的 request code 框内。
9、点击第二个 Generate 获取 Activation Code(激活码),把码复制到 navicat 对应的框内。
10、点击激活完成激活。

  1. 查看注册信息
  2. 测试连接
  3. 新建库

# DBeaver

  1. 下载
  2. 下载 jdk✔️有 JAVA 环境的不用下载
  3. 修改 dbeaver.ini 配置文件
-vm
D:\jdk-11.0.11\bin
-startup
plugins/org.eclipse.equinox.launcher_1.6.300.v20210813-1054.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.300.v20210828-0802
-vmargs
-XX:+IgnoreUnrecognizedVMOptions
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Xms128m
-Xmx2048m
-Djavax.net.ssl.trustStoreType=WINDOWS-ROOT
-Ddbeaver.distribution.type=zip
-javaagent:F:\green program\dbeaver\dbeaver-agent\dbeaver-agent.jar

第一二行指定 jdk 地址
最后一行指定 dbeaver-agent.jar 注册工具的位置

  1. 启动
  2. 注册成功
  3. 测试连接
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/21/mysql数据库auto-increment自增长不变的处理方法/index.html b/2022/11/21/mysql数据库auto-increment自增长不变的处理方法/index.html index ab5ce8969..b76c6a009 100644 --- a/2022/11/21/mysql数据库auto-increment自增长不变的处理方法/index.html +++ b/2022/11/21/mysql数据库auto-increment自增长不变的处理方法/index.html @@ -1 +1 @@ -mysql 数据库 auto_increment 自增长不变的处理方法 - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 问题描述

今天无意中发现原本能正常增加的 id 突然不变了,查看 sql 发现是取的对应表的自增 id。虽然存到表中的新数据自增 id 变化了,但返回的 id 总是不变。经过查询发现表的自增 id 是存在 information_schema 库中的 tables 表中。tables 表中存储了所有表的对应信息,其中有个 auto_increment 字段存储的就是对应表的下一个自增值。但是 mysql 在新版本中修改了此值的更新规则,老版本中是实时更新,新版本修改为 24 小时更新一次。为了不修改原代码中的逻辑,只能通过修改 mysql 配置使项目正常工作了。

# 解决办法

mysql数据库auto_increment自增长不变的处理方法
修改/etc/mysql/mysql.conf.d/mysqld.cnf
增加一行information_schema_stats_expiry = 0
保存后重启mysql
sudo systemctl restart mysql.service
查询是否生效
show global variables like 'information_schema_stats_expiry';
show session variables like 'information_schema_stats_expiry';
\ No newline at end of file +mysql 数据库 auto_increment 自增长不变的处理方法 - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 问题描述

今天无意中发现原本能正常增加的 id 突然不变了,查看 sql 发现是取的对应表的自增 id。虽然存到表中的新数据自增 id 变化了,但返回的 id 总是不变。经过查询发现表的自增 id 是存在 information_schema 库中的 tables 表中。tables 表中存储了所有表的对应信息,其中有个 auto_increment 字段存储的就是对应表的下一个自增值。但是 mysql 在新版本中修改了此值的更新规则,老版本中是实时更新,新版本修改为 24 小时更新一次。为了不修改原代码中的逻辑,只能通过修改 mysql 配置使项目正常工作了。

# 解决办法

mysql数据库auto_increment自增长不变的处理方法
修改/etc/mysql/mysql.conf.d/mysqld.cnf
增加一行information_schema_stats_expiry = 0
保存后重启mysql
sudo systemctl restart mysql.service
查询是否生效
show global variables like 'information_schema_stats_expiry';
show session variables like 'information_schema_stats_expiry';
\ No newline at end of file diff --git a/2022/11/24/KLineChart实现一幅图上画多个蜡烛K线/index.html b/2022/11/24/KLineChart实现一幅图上画多个蜡烛K线/index.html index a238d389f..f7d444ed4 100644 --- a/2022/11/24/KLineChart实现一幅图上画多个蜡烛K线/index.html +++ b/2022/11/24/KLineChart实现一幅图上画多个蜡烛K线/index.html @@ -1 +1 @@ -KLineChart 实现一幅图上画多个蜡烛 K 线 - KLineChart - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

最近接到一个任务是通过 KLineChart✔️8.6.1 实现在一幅图上画两个合约的蜡烛图。研究 api 发现并没有通过配置实现的方法,于是联系作者沟通得知需要自己画图实现。于是有了本篇文章。
KLineChart.jpg

# 添加模版

let shortName = this.constant.periodTypeEnum.getNameByCode(this.klineType) + '    合约2:' + this.currentInstrumentId
this.chart.addTechnicalIndicatorTemplate({
  name: 'custom_candle_solid',
  shortName: shortName,
  precision: 2,
  bar: {
	upColor: '#EF5350',
	downColor: '#26A69A',
	noChangeColor: '#888889'
  },
  plots: [
	{ key: 'open', title: '开: ' },
	{ key: 'close', title: '收: ' },
	{ key: 'high', title: '高: ' },
	{ key: 'low', title: '低: ' }
  ],
  calcTechnicalIndicator: (dataList, { params, plots }) => {
	return dataList.map((kLineData, i) => {
	  return {
		instrumentId: kLineData.instrumentId,
		timestamp: getDateTime(new Date(kLineData.timestamp)),
		open: kLineData.open,
		close: kLineData.close,
		high: kLineData.high,
		low: kLineData.low
	  }
	})
  },
  render: ({ ctx, dataSource, viewport, styles, xAxis, yAxis }) => {
	// X 轴起始像素
	let x = xAxis.convertToPixel(0)
	dataSource.technicalIndicatorDataList.forEach(function (kLineData, i) {
	  let open = kLineData.open
	  let close = kLineData.close
	  let high = kLineData.high
	  let low = kLineData.low
	  // 给蜡烛柱设置颜色
	  if (close > open) { // 涨
		ctx.strokeStyle = '#EF5350'
		ctx.fillStyle = '#EF5350'
	  } else if (close < open) { // 跌
		ctx.strokeStyle = '#26A69A'
		ctx.fillStyle = '#26A69A'
	  } else { // 未变动
		ctx.strokeStyle = '#888889'
		ctx.fillStyle = '#888889'
	  }
	  // 获取开盘价 Y 轴像素
	  let openY = yAxis.convertToPixel(open)
	  // 获取收盘价 Y 轴像素
	  let closeY = yAxis.convertToPixel(close)
	  // 开、收、高、低的 Y 轴像素
	  let priceY = [openY, closeY, yAxis.convertToPixel(high), yAxis.convertToPixel(low)]
	  // 从低到高排序
	  priceY.sort(function (a, b) {
		return a - b
	  })
	  // 画蜡烛柱上部
	  ctx.fillRect(x - 0.5, priceY[0], 1, priceY[1] - priceY[0])
	  // 画蜡烛柱下部
	  ctx.fillRect(x - 0.5, priceY[2], 1, priceY[3] - priceY[2])
	  // 蜡烛柱高度
	  var barHeight = Math.max(1, priceY[2] - priceY[1])
	  // 画蜡烛柱中部 (viewport.barSpace 蜡烛柱的宽度,随放大缩小操作而变化)
	  ctx.fillRect(x - (viewport.barSpace / 2), priceY[1], viewport.barSpace, barHeight)
	  // 下一蜡烛柱 X 轴的起始位置(viewport.dataSpace 蜡烛柱的宽度加蜡烛柱之间的间隔,随放大缩小操作而变化)
	  x += viewport.dataSpace
	})
  }
})

# 创建指标

this.chart.createTechnicalIndicator('custom_candle_solid', true, { id: 'paneId10', dragEnabled: true, height: this.height })
\ No newline at end of file +KLineChart 实现一幅图上画多个蜡烛 K 线 - KLineChart - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

最近接到一个任务是通过 KLineChart✔️8.6.1 实现在一幅图上画两个合约的蜡烛图。研究 api 发现并没有通过配置实现的方法,于是联系作者沟通得知需要自己画图实现。于是有了本篇文章。
KLineChart.jpg

# 添加模版

let shortName = this.constant.periodTypeEnum.getNameByCode(this.klineType) + '    合约2:' + this.currentInstrumentId
this.chart.addTechnicalIndicatorTemplate({
  name: 'custom_candle_solid',
  shortName: shortName,
  precision: 2,
  bar: {
	upColor: '#EF5350',
	downColor: '#26A69A',
	noChangeColor: '#888889'
  },
  plots: [
	{ key: 'open', title: '开: ' },
	{ key: 'close', title: '收: ' },
	{ key: 'high', title: '高: ' },
	{ key: 'low', title: '低: ' }
  ],
  calcTechnicalIndicator: (dataList, { params, plots }) => {
	return dataList.map((kLineData, i) => {
	  return {
		instrumentId: kLineData.instrumentId,
		timestamp: getDateTime(new Date(kLineData.timestamp)),
		open: kLineData.open,
		close: kLineData.close,
		high: kLineData.high,
		low: kLineData.low
	  }
	})
  },
  render: ({ ctx, dataSource, viewport, styles, xAxis, yAxis }) => {
	// X 轴起始像素
	let x = xAxis.convertToPixel(0)
	dataSource.technicalIndicatorDataList.forEach(function (kLineData, i) {
	  let open = kLineData.open
	  let close = kLineData.close
	  let high = kLineData.high
	  let low = kLineData.low
	  // 给蜡烛柱设置颜色
	  if (close > open) { // 涨
		ctx.strokeStyle = '#EF5350'
		ctx.fillStyle = '#EF5350'
	  } else if (close < open) { // 跌
		ctx.strokeStyle = '#26A69A'
		ctx.fillStyle = '#26A69A'
	  } else { // 未变动
		ctx.strokeStyle = '#888889'
		ctx.fillStyle = '#888889'
	  }
	  // 获取开盘价 Y 轴像素
	  let openY = yAxis.convertToPixel(open)
	  // 获取收盘价 Y 轴像素
	  let closeY = yAxis.convertToPixel(close)
	  // 开、收、高、低的 Y 轴像素
	  let priceY = [openY, closeY, yAxis.convertToPixel(high), yAxis.convertToPixel(low)]
	  // 从低到高排序
	  priceY.sort(function (a, b) {
		return a - b
	  })
	  // 画蜡烛柱上部
	  ctx.fillRect(x - 0.5, priceY[0], 1, priceY[1] - priceY[0])
	  // 画蜡烛柱下部
	  ctx.fillRect(x - 0.5, priceY[2], 1, priceY[3] - priceY[2])
	  // 蜡烛柱高度
	  var barHeight = Math.max(1, priceY[2] - priceY[1])
	  // 画蜡烛柱中部 (viewport.barSpace 蜡烛柱的宽度,随放大缩小操作而变化)
	  ctx.fillRect(x - (viewport.barSpace / 2), priceY[1], viewport.barSpace, barHeight)
	  // 下一蜡烛柱 X 轴的起始位置(viewport.dataSpace 蜡烛柱的宽度加蜡烛柱之间的间隔,随放大缩小操作而变化)
	  x += viewport.dataSpace
	})
  }
})

# 创建指标

this.chart.createTechnicalIndicator('custom_candle_solid', true, { id: 'paneId10', dragEnabled: true, height: this.height })
\ No newline at end of file diff --git a/2022/11/30/Nginx动态解析域名方案/index.html b/2022/11/30/Nginx动态解析域名方案/index.html index 5b23915dc..0debaf424 100644 --- a/2022/11/30/Nginx动态解析域名方案/index.html +++ b/2022/11/30/Nginx动态解析域名方案/index.html @@ -1 +1 @@ -Nginx 动态解析域名方案 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 应用场景:

由于有时候 nginx 代理的时候,第三方域名对应的 ip 可能发生变化,然而没有提前通知,然而如果不配置什么,nginx 又不能智能解析,因此 nginx 动态解析域名就比较重要。

# 使用模块 nginx-upstream-dynamic-servers

该模块在启动 nginx 的时候会对域名进行一次解析,解析完成后,在 DNS 服务器设定的 TTL 过期时间内不会再次更新,在 TTL 过期后则会再次发起域名解析请求更新域名所对应的 IP 地址。

需要在 nginx 的配置文件中的 http 配置域内指定使用的 DNS 服务器,在 upstream 中需要进行域名解析的 server 后面添加 resolve 参数。

例:

http {
    resolver    ip;
    upstream test {
        server  www.xxx.com:8080       resolve;
    }
    server {
        listen       8080;
        client_body_buffer_size 10m;
        server_name  localhost;
        location / {
        
                proxy_pass      http://test;
                
        }
        
    }
}

缺点:

1、每次解析域名之后,会从 DNS 服务器获取到改 DNS 的 TTL,在 TTL 期限内不会再次解析,所以如果目标域名发生改变,nginx 不会更新解析,知道 TTL 过期。

2、DNS 服务器在 http 配置域配置全,不能在 location 中细分指定。

# 使用模块 ngx_upstream_jdomain

在 http 配置域中配置 DNS 服务器,在 upstream 中按照这个模块的格式配置,支持设置每隔多少秒进行一次解析(抓包分析过设置 interval 可指定解析间隔),如果解析失败则使用缓存中的上一次解析结果的 IP 地址访问。

例:

http {
    resolver    ip;
    upstream test {
        jdomain  www.xxx.com port=8080 interval=10; #指定域名和端口,每隔 10 秒进行一次解析
    }
    server {
        listen       8080;
        client_body_buffer_size 10m;
        server_name  localhost;
        location / {
                proxy_pass      http://test;
        }
        
    }
}

缺点:DNS 服务器只能在 http 配域中全局配置

# 原生 nginx 使用 set 命令使用变量

将域名置于变量中,在对 proxy_pass 进行转发的时候域名调用变量,可以按照 valid,设置的时间参数间隔地对变量中的域名进行解析。

例:

server {
	listen       8080;
	client_body_buffer_size 10m;
	server_name  localhost;
	location / {
			resolver ip valid=3s;
			set $five "www.xxx.com:8080";
			proxy_pass      http://${five};
	}
	
}

缺点:upstream 中不支持设置变量,因此后端有多台的时候该方案不可行。

# Tengine

在 upstream 中配置 dynamic_resolve,在 location 配置域中指定 NDS 服务器,按照 valid 设置的时间间隔地进行地址解析。只支持 http 模块的动态域名解析

例:

http {
    upstream test {
        dynamic_resolve fallback=stale fail_timeout=30s;
        server  www.xxx.com:8080;
    }
    server {
        listen       8080;
        location / {
                resolver       ip     valid=3s;
                proxy_pass      http://test;
        }
	  }
}

缺点:需要将 nginx 的 bin 文件替换为 tengine 的 bin 文件。

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Nginx 动态解析域名方案 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 应用场景:

由于有时候 nginx 代理的时候,第三方域名对应的 ip 可能发生变化,然而没有提前通知,然而如果不配置什么,nginx 又不能智能解析,因此 nginx 动态解析域名就比较重要。

# 使用模块 nginx-upstream-dynamic-servers

该模块在启动 nginx 的时候会对域名进行一次解析,解析完成后,在 DNS 服务器设定的 TTL 过期时间内不会再次更新,在 TTL 过期后则会再次发起域名解析请求更新域名所对应的 IP 地址。

需要在 nginx 的配置文件中的 http 配置域内指定使用的 DNS 服务器,在 upstream 中需要进行域名解析的 server 后面添加 resolve 参数。

例:

http {
    resolver    ip;
    upstream test {
        server  www.xxx.com:8080       resolve;
    }
    server {
        listen       8080;
        client_body_buffer_size 10m;
        server_name  localhost;
        location / {
        
                proxy_pass      http://test;
                
        }
        
    }
}

缺点:

1、每次解析域名之后,会从 DNS 服务器获取到改 DNS 的 TTL,在 TTL 期限内不会再次解析,所以如果目标域名发生改变,nginx 不会更新解析,知道 TTL 过期。

2、DNS 服务器在 http 配置域配置全,不能在 location 中细分指定。

# 使用模块 ngx_upstream_jdomain

在 http 配置域中配置 DNS 服务器,在 upstream 中按照这个模块的格式配置,支持设置每隔多少秒进行一次解析(抓包分析过设置 interval 可指定解析间隔),如果解析失败则使用缓存中的上一次解析结果的 IP 地址访问。

例:

http {
    resolver    ip;
    upstream test {
        jdomain  www.xxx.com port=8080 interval=10; #指定域名和端口,每隔 10 秒进行一次解析
    }
    server {
        listen       8080;
        client_body_buffer_size 10m;
        server_name  localhost;
        location / {
                proxy_pass      http://test;
        }
        
    }
}

缺点:DNS 服务器只能在 http 配域中全局配置

# 原生 nginx 使用 set 命令使用变量

将域名置于变量中,在对 proxy_pass 进行转发的时候域名调用变量,可以按照 valid,设置的时间参数间隔地对变量中的域名进行解析。

例:

server {
	listen       8080;
	client_body_buffer_size 10m;
	server_name  localhost;
	location / {
			resolver ip valid=3s;
			set $five "www.xxx.com:8080";
			proxy_pass      http://${five};
	}
	
}

缺点:upstream 中不支持设置变量,因此后端有多台的时候该方案不可行。

# Tengine

在 upstream 中配置 dynamic_resolve,在 location 配置域中指定 NDS 服务器,按照 valid 设置的时间间隔地进行地址解析。只支持 http 模块的动态域名解析

例:

http {
    upstream test {
        dynamic_resolve fallback=stale fail_timeout=30s;
        server  www.xxx.com:8080;
    }
    server {
        listen       8080;
        location / {
                resolver       ip     valid=3s;
                proxy_pass      http://test;
        }
	  }
}

缺点:需要将 nginx 的 bin 文件替换为 tengine 的 bin 文件。

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/30/Nginx配置stream踩坑/index.html b/2022/11/30/Nginx配置stream踩坑/index.html index 867edb912..a24668331 100644 --- a/2022/11/30/Nginx配置stream踩坑/index.html +++ b/2022/11/30/Nginx配置stream踩坑/index.html @@ -1 +1 @@ -Nginx 配置 stream 踩坑 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

stream 模块一般用于 TCP/UDP 数据流的代理和负载均衡,可以通过 stream 模块代理转发 TCP 消息。我是用来转发 mysql、gitee 等连接的,有天 ip 发生了变动导致连接不上。前期试过配置 resolver 114.114.114.114 valid=60s; 来动态解析域名,结果 stream 模块不支持 set 函数,这就导致 ip 变动后必须手动重启或者 reload 一下 nginx 才能正常连接。后面经过搜索发现有人说用 Tengine 替代 nginx 可以实现就试了试,结果发现 Tengine 只能实现 http 下的动态域名解析,至此问题依旧。没办法,我只能通过定时任务加脚本判断 ip 是否变动,如果变动就 reload 一下 nginx。

#!/bin/bash
#使用 crontab -e 命令添加定时任务 */1 * * * * sh /home/xxx/autoReloadNginx.sh
home="/home/xxx" #指定 home 路径,如果使用 `pwd` 则 domainIP.txt 生成在当前用户目录下
domain=xxx.xxx.cn
IP=`ping -4 -c 4 $domain | grep from | tail -n 1 | awk -F ' ' '{print $4}'`
regex="\b(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])\b"
if [ `echo $IP | egrep $regex | wc -l` -eq 1 ]; then
        if [ ! -f "$home/domainIP.txt" ]; then
                touch $home/domainIP.txt
                echo $IP > $home/domainIP.txt
        else
                oldIP=`cat $home/domainIP.txt`
                if [ "$IP" != "$oldIP" ]; then
                        nginx -s reload
                        echo $IP > $home/domainIP.txt
                else
                        echo "The domain name ip has not changed"
                fi
        fi
else
        echo "The domain name resolution is incorrect"
fi
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Nginx 配置 stream 踩坑 - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

stream 模块一般用于 TCP/UDP 数据流的代理和负载均衡,可以通过 stream 模块代理转发 TCP 消息。我是用来转发 mysql、gitee 等连接的,有天 ip 发生了变动导致连接不上。前期试过配置 resolver 114.114.114.114 valid=60s; 来动态解析域名,结果 stream 模块不支持 set 函数,这就导致 ip 变动后必须手动重启或者 reload 一下 nginx 才能正常连接。后面经过搜索发现有人说用 Tengine 替代 nginx 可以实现就试了试,结果发现 Tengine 只能实现 http 下的动态域名解析,至此问题依旧。没办法,我只能通过定时任务加脚本判断 ip 是否变动,如果变动就 reload 一下 nginx。

#!/bin/bash
#使用 crontab -e 命令添加定时任务 */1 * * * * sh /home/xxx/autoReloadNginx.sh
home="/home/xxx" #指定 home 路径,如果使用 `pwd` 则 domainIP.txt 生成在当前用户目录下
domain=xxx.xxx.cn
IP=`ping -4 -c 4 $domain | grep from | tail -n 1 | awk -F ' ' '{print $4}'`
regex="\b(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[1-9])\b"
if [ `echo $IP | egrep $regex | wc -l` -eq 1 ]; then
        if [ ! -f "$home/domainIP.txt" ]; then
                touch $home/domainIP.txt
                echo $IP > $home/domainIP.txt
        else
                oldIP=`cat $home/domainIP.txt`
                if [ "$IP" != "$oldIP" ]; then
                        nginx -s reload
                        echo $IP > $home/domainIP.txt
                else
                        echo "The domain name ip has not changed"
                fi
        fi
else
        echo "The domain name resolution is incorrect"
fi
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/11/30/将nginx替换为tengine/index.html b/2022/11/30/将nginx替换为tengine/index.html index 8bf85e529..a511da437 100644 --- a/2022/11/30/将nginx替换为tengine/index.html +++ b/2022/11/30/将nginx替换为tengine/index.html @@ -1 +1 @@ -将 nginx 替换为 tengine - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

Tengine 的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的 Web 平台。从 2011 年 12 月开始,Tengine 成为一个开源项目。现在,它由 Tengine 团队开发和维护。Tengine 团队的核心成员来自于淘宝、搜狗等互联网企业。

tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx 的一个分生版本,所以几乎完全兼容 nginx,所以我认为 tengine 是搭建 lnmp 环境的不二之选。

# 下载

首先访问 tengine 官方网站,获取最新的下载地址。
wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz

# 获取编译参数

nginx -V

# 编译

./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module
./configure 后面的参数是上一步获取的

# Make

make 或者 make -j 内核数
生成的文件在 objs 目录下

# 替换

停止 nginx 服务 service nginx stop
查看 nginx 目录 whereis nginx
备份旧 nginx mv /usr/sbin/nginx /usr/sbin/nginx.old
拷贝 objs 下的 nginx 替换旧 nginx cp ./objs/nginx /usr/sbin/
备份旧 so 文件
拷贝 objs 下的 so 文件替换旧的 so 文件 cp ./objs/*.so /usr/lib/nginx/modules/

# 测试

nginx -t 如果打印 test is successful 则表示替换成功。
然后执行 service nginx start 进行启动即可

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +将 nginx 替换为 tengine - Nginx - 服务 - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 介绍

Tengine 的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的 Web 平台。从 2011 年 12 月开始,Tengine 成为一个开源项目。现在,它由 Tengine 团队开发和维护。Tengine 团队的核心成员来自于淘宝、搜狗等互联网企业。

tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx 的一个分生版本,所以几乎完全兼容 nginx,所以我认为 tengine 是搭建 lnmp 环境的不二之选。

# 下载

首先访问 tengine 官方网站,获取最新的下载地址。
wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz

# 获取编译参数

nginx -V

# 编译

./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module
./configure 后面的参数是上一步获取的

# Make

make 或者 make -j 内核数
生成的文件在 objs 目录下

# 替换

停止 nginx 服务 service nginx stop
查看 nginx 目录 whereis nginx
备份旧 nginx mv /usr/sbin/nginx /usr/sbin/nginx.old
拷贝 objs 下的 nginx 替换旧 nginx cp ./objs/nginx /usr/sbin/
备份旧 so 文件
拷贝 objs 下的 so 文件替换旧的 so 文件 cp ./objs/*.so /usr/lib/nginx/modules/

# 测试

nginx -t 如果打印 test is successful 则表示替换成功。
然后执行 service nginx start 进行启动即可

更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2022/12/02/KLineChart实现自定义指标画图/index.html b/2022/12/02/KLineChart实现自定义指标画图/index.html index 3e350cbeb..c75837fd1 100644 --- a/2022/12/02/KLineChart实现自定义指标画图/index.html +++ b/2022/12/02/KLineChart实现自定义指标画图/index.html @@ -1 +1 @@ -KLineChart 实现自定义指标画图 - KLineChart - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

本次任务是需要在一个指标图上通过点击标记画出此标记参与计算的数据范围、最高最低值、参考线等等,于是有了以下代码。代码仅供参考,如有错误的地方请指正!
7fd440be0502d0099427e7c74c4ebf29.jpg

# 模版代码

// 箱体指标
const boxDataScope = 300 // 箱体范围
// 黄金线参数
const goldenSectionA = 0.191
const goldenSectionB = 0.382
const goldenSectionC = 0.5
const goldenSectionD = 0.618
const goldenSectionE = 0.809
this.chart.addTechnicalIndicatorTemplate({
	name: 'custom_box_solid',
    shortName: '箱体',
    precision: 2,
    plots: [ //key 属性的值最好在主图数据范围内,否则 Y 轴的值会跟着变大可能会导致主图变成一条线
      { key: 'max', title: '最高:' },
      { key: 'min', title: '最低:' }
    ],
    calcParams: [boxDataScope, goldenSectionA, goldenSectionB, goldenSectionC, goldenSectionD, goldenSectionE],
    calcTechnicalIndicator: (dataList, { params, plots }) => {
      let allDatas = [] // 所有数据
      let selectedDatas = [] // 选中的数据
      for (let i = 0; i < dataList.length; i++) {
        let kLineData = dataList[i]
        if (new Date(dateConvert(kLineData.timestamp)).getTime() === getGlobalObject('boxId')) {
          const size = params[0]
          // 找出当前数据往前的 size 条数据(包含自己)
          let startData = i - size + 1
          if (startData < 0) {
            startData = 0
          }
          let endData = i + 1
          if (endData > dataList.length) {
            endData = dataList.length
          }
          selectedDatas = dataList.slice(startData, endData)
        }
        allDatas.push({
          timestamp: kLineData.timestamp
        })
      }
      // 找出选中数据中最高最低差价
      let max, min
      selectedDatas.forEach(function (item) {
        let value = item.close - item.close2
        if (!max || value > max) {
          max = value
        }
        if (!min || value < min) {
          min = value
        }
      })
	  // 返回指标最终数据(未选中的数据用空对象替换)
	  // 必须返回和 dataList 一样条数的数据,否则 title 不会显示
      return allDatas.map((data, i) => {
        let item = {
        }
        selectedDatas.map((selected, j) => {
          if (data.timestamp === selected.timestamp) {
            item.timestamp = selected.timestamp
            item.max = max
            item.min = min
          }
        })
        return item
      })
    },
    render: ({ ctx, dataSource, viewport, styles, xAxis, yAxis }) => {
      if (dataSource.technicalIndicatorDataList.length <= 0) { // 无指标数据则不处理
        return
      }
	  // X 轴起始像素
      let x = xAxis.convertToPixel(0)
      // 标记选中数据的起止位置
      let start
      let end = dataSource.technicalIndicatorDataList.length - 1
      dataSource.technicalIndicatorDataList.forEach(function (kLineData, i) {
        if (kLineData.timestamp) {
          if (!start) {
            start = i
          }
          if (i < end && !dataSource.technicalIndicatorDataList[i + 1].timestamp) {
            end = i
          }
          let max = kLineData.max
          let min = kLineData.min
          ctx.fillStyle = '#fff'
          ctx.textBaseline = 'middle'
          ctx.textAlign = 'center'
          // 画箱体
		  // 箱体颜色
		  ctx.strokeStyle = '#DC143C'
		  //y 轴最高点位置
		  let yHigh = yAxis.convertToPixel(max)
		  //y 轴最低点位置
		  let yLow = yAxis.convertToPixel(min)
		  ctx.beginPath()
		  // 画笔移动到数据的 x 轴起始点,y 轴最高点
		  ctx.moveTo(x, yHigh)
          if (i === start) { // 如果是第一条数据则需要画一条竖线
            ctx.lineTo(x, yLow) // 画竖线
            ctx.moveTo(x, yHigh) // 画笔移回
          }
          if (i === end) { // 如果是最后一条数据则需要画一条竖线
            ctx.lineTo(x, yLow) // 画竖线
            ctx.fillText(max, x + viewport.dataSpace, yHigh) // 标识箱体最高点的值
            ctx.moveTo(x, yLow) // 画笔移动到 Y 轴最低点
            ctx.fillText(min, x + viewport.dataSpace, yLow) // 标识箱体最低点的值
          } else { // 画两条横线,一条在 y 轴最高点,一条在 y 轴最低点
            ctx.lineTo(x + viewport.dataSpace, yHigh) //y 轴最高点横线
            ctx.moveTo(x, yLow) // 画笔移动到 y 轴最低点
            ctx.lineTo(x + viewport.dataSpace, yLow) //y 轴最低点横线
          }
          ctx.stroke()
          ctx.closePath()
          // 画黄金线
		  // 黄金线颜色
          ctx.strokeStyle = '#ffffff'
		  // 根据黄金线参数计算黄金线的值
          let goldenSectionLineA = (max - min) * goldenSectionA + min
          let goldenSectionLineB = (max - min) * goldenSectionB + min
          let goldenSectionLineC = (max - min) * goldenSectionC + min
          let goldenSectionLineD = (max - min) * goldenSectionD + min
          let goldenSectionLineE = (max - min) * goldenSectionE + min
		  // 根据黄金线的值获取 Y 轴高度
          let yA = yAxis.convertToPixel(goldenSectionLineA)
          let yB = yAxis.convertToPixel(goldenSectionLineB)
          let yC = yAxis.convertToPixel(goldenSectionLineC)
          let yD = yAxis.convertToPixel(goldenSectionLineD)
          let yE = yAxis.convertToPixel(goldenSectionLineE)
          ctx.beginPath()
		  // 画第一条黄金线
          ctx.moveTo(x, yA)
          ctx.lineTo(x + viewport.barSpace / 2, yA)
          if (i === end) { // 是否最后一条数据,如果是则需要标识黄金线的值
		    // 标识第一条黄金线的值
            ctx.fillText(goldenSectionLineA.toFixed(2), x + viewport.dataSpace, yA)
          }
		  // 画第二条黄金线
          ctx.moveTo(x, yB)
          ctx.lineTo(x + viewport.barSpace / 2, yB)
          if (i === end) {
            ctx.fillText(goldenSectionLineB.toFixed(2), x + viewport.dataSpace, yB)
          }
		  // 画第三条黄金线
          ctx.moveTo(x, yC)
          ctx.lineTo(x + viewport.barSpace / 2, yC)
          if (i === end) {
            ctx.fillText(goldenSectionLineC.toFixed(2), x + viewport.dataSpace, yC)
          }
		  // 画第四条黄金线
          ctx.moveTo(x, yD)
          ctx.lineTo(x + viewport.barSpace / 2, yD)
          if (i === end) {
            ctx.fillText(goldenSectionLineD.toFixed(2), x + viewport.dataSpace, yD)
          }
		  // 画第五条黄金线
          ctx.moveTo(x, yE)
          ctx.lineTo(x + viewport.barSpace / 2, yE)
          if (i === end) {
            ctx.fillText(goldenSectionLineE.toFixed(2), x + viewport.dataSpace, yE)
          }
          ctx.stroke()
          ctx.closePath()
        }
		// 计算 X 轴的下一个位置
        x += viewport.dataSpace
      })
    }
})

# 结语

以上代码只是箱体的指标模版,还需要根据业务逻辑在标记上实现点击事件,然后通过事件动态添加移除箱体指标。

\ No newline at end of file +KLineChart 实现自定义指标画图 - KLineChart - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

本次任务是需要在一个指标图上通过点击标记画出此标记参与计算的数据范围、最高最低值、参考线等等,于是有了以下代码。代码仅供参考,如有错误的地方请指正!
7fd440be0502d0099427e7c74c4ebf29.jpg

# 模版代码

// 箱体指标
const boxDataScope = 300 // 箱体范围
// 黄金线参数
const goldenSectionA = 0.191
const goldenSectionB = 0.382
const goldenSectionC = 0.5
const goldenSectionD = 0.618
const goldenSectionE = 0.809
this.chart.addTechnicalIndicatorTemplate({
	name: 'custom_box_solid',
    shortName: '箱体',
    precision: 2,
    plots: [ //key 属性的值最好在主图数据范围内,否则 Y 轴的值会跟着变大可能会导致主图变成一条线
      { key: 'max', title: '最高:' },
      { key: 'min', title: '最低:' }
    ],
    calcParams: [boxDataScope, goldenSectionA, goldenSectionB, goldenSectionC, goldenSectionD, goldenSectionE],
    calcTechnicalIndicator: (dataList, { params, plots }) => {
      let allDatas = [] // 所有数据
      let selectedDatas = [] // 选中的数据
      for (let i = 0; i < dataList.length; i++) {
        let kLineData = dataList[i]
        if (new Date(dateConvert(kLineData.timestamp)).getTime() === getGlobalObject('boxId')) {
          const size = params[0]
          // 找出当前数据往前的 size 条数据(包含自己)
          let startData = i - size + 1
          if (startData < 0) {
            startData = 0
          }
          let endData = i + 1
          if (endData > dataList.length) {
            endData = dataList.length
          }
          selectedDatas = dataList.slice(startData, endData)
        }
        allDatas.push({
          timestamp: kLineData.timestamp
        })
      }
      // 找出选中数据中最高最低差价
      let max, min
      selectedDatas.forEach(function (item) {
        let value = item.close - item.close2
        if (!max || value > max) {
          max = value
        }
        if (!min || value < min) {
          min = value
        }
      })
	  // 返回指标最终数据(未选中的数据用空对象替换)
	  // 必须返回和 dataList 一样条数的数据,否则 title 不会显示
      return allDatas.map((data, i) => {
        let item = {
        }
        selectedDatas.map((selected, j) => {
          if (data.timestamp === selected.timestamp) {
            item.timestamp = selected.timestamp
            item.max = max
            item.min = min
          }
        })
        return item
      })
    },
    render: ({ ctx, dataSource, viewport, styles, xAxis, yAxis }) => {
      if (dataSource.technicalIndicatorDataList.length <= 0) { // 无指标数据则不处理
        return
      }
	  // X 轴起始像素
      let x = xAxis.convertToPixel(0)
      // 标记选中数据的起止位置
      let start
      let end = dataSource.technicalIndicatorDataList.length - 1
      dataSource.technicalIndicatorDataList.forEach(function (kLineData, i) {
        if (kLineData.timestamp) {
          if (!start) {
            start = i
          }
          if (i < end && !dataSource.technicalIndicatorDataList[i + 1].timestamp) {
            end = i
          }
          let max = kLineData.max
          let min = kLineData.min
          ctx.fillStyle = '#fff'
          ctx.textBaseline = 'middle'
          ctx.textAlign = 'center'
          // 画箱体
		  // 箱体颜色
		  ctx.strokeStyle = '#DC143C'
		  //y 轴最高点位置
		  let yHigh = yAxis.convertToPixel(max)
		  //y 轴最低点位置
		  let yLow = yAxis.convertToPixel(min)
		  ctx.beginPath()
		  // 画笔移动到数据的 x 轴起始点,y 轴最高点
		  ctx.moveTo(x, yHigh)
          if (i === start) { // 如果是第一条数据则需要画一条竖线
            ctx.lineTo(x, yLow) // 画竖线
            ctx.moveTo(x, yHigh) // 画笔移回
          }
          if (i === end) { // 如果是最后一条数据则需要画一条竖线
            ctx.lineTo(x, yLow) // 画竖线
            ctx.fillText(max, x + viewport.dataSpace, yHigh) // 标识箱体最高点的值
            ctx.moveTo(x, yLow) // 画笔移动到 Y 轴最低点
            ctx.fillText(min, x + viewport.dataSpace, yLow) // 标识箱体最低点的值
          } else { // 画两条横线,一条在 y 轴最高点,一条在 y 轴最低点
            ctx.lineTo(x + viewport.dataSpace, yHigh) //y 轴最高点横线
            ctx.moveTo(x, yLow) // 画笔移动到 y 轴最低点
            ctx.lineTo(x + viewport.dataSpace, yLow) //y 轴最低点横线
          }
          ctx.stroke()
          ctx.closePath()
          // 画黄金线
		  // 黄金线颜色
          ctx.strokeStyle = '#ffffff'
		  // 根据黄金线参数计算黄金线的值
          let goldenSectionLineA = (max - min) * goldenSectionA + min
          let goldenSectionLineB = (max - min) * goldenSectionB + min
          let goldenSectionLineC = (max - min) * goldenSectionC + min
          let goldenSectionLineD = (max - min) * goldenSectionD + min
          let goldenSectionLineE = (max - min) * goldenSectionE + min
		  // 根据黄金线的值获取 Y 轴高度
          let yA = yAxis.convertToPixel(goldenSectionLineA)
          let yB = yAxis.convertToPixel(goldenSectionLineB)
          let yC = yAxis.convertToPixel(goldenSectionLineC)
          let yD = yAxis.convertToPixel(goldenSectionLineD)
          let yE = yAxis.convertToPixel(goldenSectionLineE)
          ctx.beginPath()
		  // 画第一条黄金线
          ctx.moveTo(x, yA)
          ctx.lineTo(x + viewport.barSpace / 2, yA)
          if (i === end) { // 是否最后一条数据,如果是则需要标识黄金线的值
		    // 标识第一条黄金线的值
            ctx.fillText(goldenSectionLineA.toFixed(2), x + viewport.dataSpace, yA)
          }
		  // 画第二条黄金线
          ctx.moveTo(x, yB)
          ctx.lineTo(x + viewport.barSpace / 2, yB)
          if (i === end) {
            ctx.fillText(goldenSectionLineB.toFixed(2), x + viewport.dataSpace, yB)
          }
		  // 画第三条黄金线
          ctx.moveTo(x, yC)
          ctx.lineTo(x + viewport.barSpace / 2, yC)
          if (i === end) {
            ctx.fillText(goldenSectionLineC.toFixed(2), x + viewport.dataSpace, yC)
          }
		  // 画第四条黄金线
          ctx.moveTo(x, yD)
          ctx.lineTo(x + viewport.barSpace / 2, yD)
          if (i === end) {
            ctx.fillText(goldenSectionLineD.toFixed(2), x + viewport.dataSpace, yD)
          }
		  // 画第五条黄金线
          ctx.moveTo(x, yE)
          ctx.lineTo(x + viewport.barSpace / 2, yE)
          if (i === end) {
            ctx.fillText(goldenSectionLineE.toFixed(2), x + viewport.dataSpace, yE)
          }
          ctx.stroke()
          ctx.closePath()
        }
		// 计算 X 轴的下一个位置
        x += viewport.dataSpace
      })
    }
})

# 结语

以上代码只是箱体的指标模版,还需要根据业务逻辑在标记上实现点击事件,然后通过事件动态添加移除箱体指标。

\ No newline at end of file diff --git a/2022/12/05/Win10彻底关闭wsappx进程/index.html b/2022/12/05/Win10彻底关闭wsappx进程/index.html index 5c04b7edc..84740d3f5 100644 --- a/2022/12/05/Win10彻底关闭wsappx进程/index.html +++ b/2022/12/05/Win10彻底关闭wsappx进程/index.html @@ -1 +1 @@ -Win10 彻底关闭 wsappx 进程 - 解决问题 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

最近重装了家里一台 mini 电脑,把系统升级成了最新的 win10 系统。但是使用起来却异常卡顿,查看任务管理器发现有个 wsappx 进程占用 cpu 严重。于是百度搜索得知它是微软商店的依赖进程,而我根本就用不上,所以直接禁用。

# 方法一

  1. 开始菜单点击 “开始 / 应用商店” 菜单项。
  2. 接着就会打开应用商店窗口,在窗口中点击个人头像的图标。
  3. 在弹出的菜单中点击 “设置” 菜单项。
  4. 在打开的应用商店设置窗口中,找到自动更新应用一项。
  5. 点击该项下面的开关,把该项下面的开关设置为关即可。

# 方法二

  1. win 键 + r,输入 regedit
  2. 计算机 \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AppXSvc 将 3 改为 4
  3. 计算机 \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ClipSVC 将 3 改为 4
  4. 重启电脑
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Win10 彻底关闭 wsappx 进程 - 解决问题 - Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

最近重装了家里一台 mini 电脑,把系统升级成了最新的 win10 系统。但是使用起来却异常卡顿,查看任务管理器发现有个 wsappx 进程占用 cpu 严重。于是百度搜索得知它是微软商店的依赖进程,而我根本就用不上,所以直接禁用。

# 方法一

  1. 开始菜单点击 “开始 / 应用商店” 菜单项。
  2. 接着就会打开应用商店窗口,在窗口中点击个人头像的图标。
  3. 在弹出的菜单中点击 “设置” 菜单项。
  4. 在打开的应用商店设置窗口中,找到自动更新应用一项。
  5. 点击该项下面的开关,把该项下面的开关设置为关即可。

# 方法二

  1. win 键 + r,输入 regedit
  2. 计算机 \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AppXSvc 将 3 改为 4
  3. 计算机 \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ClipSVC 将 3 改为 4
  4. 重启电脑
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2023/01/10/Highcharts画收益概览/index.html b/2023/01/10/Highcharts画收益概览/index.html index 5a50099f4..27a6965de 100644 --- a/2023/01/10/Highcharts画收益概览/index.html +++ b/2023/01/10/Highcharts画收益概览/index.html @@ -1 +1 @@ -Highcharts 画收益概览 - Highcharts - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

项目中需要画一幅收益概览图,研究了一下 Highcharts 的用法。特此收录方便以后再次使用时查阅。
1ef80bfe8b5ee82aec0e2549e8c68e2c.png

# 代码

//x 轴时间集合
var chartXAxisDateTimes = ['2022-01-01 00:00:00', '2022-02-01 00:00:00', '2022-03-01 00:00:00', '2022-04-01 00:00:00', '2022-05-01 00:00:00']
//y 轴数据集合
var chartYAxisDatas = [
          {
            title: '累计收益',
            name: '我的策略累计收益',
            type: 'spline',
            unit: '%',
            valueDecimals: 3,
            height: '28%',
            yAxisIndex: 0, //y 轴分区 index(从上到下,默认从 0 开始)
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: ''
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: ''
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: ''
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: ''
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: ''
            }]
          },
          {
            title: '每月盈亏',
            name: '当月盈利',
            type: 'column',
            unit: 'k',
            valueDecimals: 0,
            top: '34%',
            height: '28%',
            yAxisIndex: 1, //y 轴分区 index(从上到下,默认从 0 开始)
            formatter: function () {
              return this.value < 0 ? (-this.value) + 'k' : this.value + 'k'
            },
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: ''
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: ''
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: ''
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: ''
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: ''
            }]
          },
          {
            title: '成交记录',
            name: '当月买入',
            type: 'column',
            unit: 'k',
            valueDecimals: 0,
            top: '68%',
            height: '28%',
            yAxisIndex: 2, //y 轴分区 index(从上到下,默认从 0 开始)
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: 'red'
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: 'red'
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: 'red'
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: 'red'
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: 'red'
            }]
          },
          {
            title: '成交记录',
            name: '当月卖出',
            type: 'column',
            unit: 'k',
            valueDecimals: 0,
            top: '68%',
            height: '28%',
            yAxisIndex: 2, //y 轴分区 index(从上到下,默认从 0 开始)
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: 'green'
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: 'green'
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: 'green'
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: 'green'
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: 'green'
            }]
          }
        ]
		
// 最大回测范围
var plotBandScope = [new Date('2022-02-01 00:00:00').getTime(), new Date('2022-04-01 00:00:00').getTime()]
// 图表配置
var option = {
	chart: {
	  height: 600,
	  type: 'spline' // 指定图表的类型,默认是折线图(line)
	},
	plotOptions: {
	  spline: {
		borderWidth: 0,
		lineWidth: 1,
		states: {
		  hover: {
			lineWidth: 2
		  }
		},
		//pointWidth: 4, // 柱子内宽度容
		dataLabels: {
		  style: {
			fontSize: 11
		  },
		  enabled: false
		},
		showInLegend: true
	  },
	  column: {
		borderWidth: 0,
		pointWidth: 4, // 柱子内宽度容
		dataLabels: {
		  style: {
			fontSize: 11
		  },
		  enabled: false
		},
		showInLegend: true,
		grouping: true
	  }
	},
	rangeSelector: {
	  enabled: false
	},
	credits: {
	  enabled: false
	},
	// legend: {
	//   enabled: true,
	//   verticalAlign: 'top'
	// },
	navigator: { // 导航器样式
	  enabled: true,
	  height: 20
	},
	scrollbar: { // 滚动条样式
	  barBackgroundColor: 'rgb(209, 218, 237)',
	  barBorderRadius: 0,
	  barBorderWidth: 0,
	  buttonBackgroundColor: 'rgb(242, 242, 242)',
	  buttonBorderWidth: 0,
	  buttonBorderRadius: 0,
	  trackBackgroundColor: 'none',
	  trackBorderWidth: 1,
	  trackBorderRadius: 0,
	  trackBorderColor: '#CCC'
	},
	xAxis: {
	  lineWidth: 1,
	  type: 'datetime',
	  categories: [],
	  dateTimeLabelFormats: {
		// millisecond: '%H:%M:%S.%L',
		// second: '%H:%M:%S',
		// minute: '%H:%M',
		// hour: '%m-%d %H:%M',
		day: '%m-%d',
		week: '%m-%d',
		month: '%Y-%m',
		year: '%Y'
	  },
	  gridLineWidth: 1
	},
	yAxis: [],
	tooltip: {
	  xDateFormat: '%Y-%m-%d %H:%M:%S',
	  style: {
		fontSize: 16,
		fontFamily: '微软雅黑',
		fontWeight: 'normal',
		color: '#666',
		padding: 10,
		borderWidth: 0,
		backgroundColor: '#ddd'
	  },
	  shared: true,
	  useHTML: true,
	  headerFormat: '<small style="font-size: 12px">{point.key}</small><table>', // 标题格式,
	  pointFormat: '<tr><td><li style="color:{series.color};padding:0px">{series.name}: </li>' +
	  '<div style="float: right;">{point.y} {series.tooltip.valueDecimals}</div></td></tr>',
	  footerFormat: '</table>',
	  shadow: true,
	  followPointer: true // 跟随鼠标
	},
	series: []
}
// 根据最大回测范围修改图表配置
if (plotBandScope && plotBandScope.length === 2) {
	option.xAxis.plotBands = [{
	  from: plotBandScope[0],
	  to: plotBandScope[1],
	  color: '#FCFFC5',
	  label: {
		text: '最大回测区间',
		align: 'center',
		verticalAlign: 'top',
		y: 14
	  }
	}]
}
// 根据 x 轴时间集合修改图表配置
if (chartXAxisDateTimes && chartXAxisDateTimes.length > 0) {
	option.categories = chartXAxisDateTimes
}
// 根据 y 轴数据集合修改图表配置
if (chartYAxisDatas && chartYAxisDatas.length > 0) {
	chartYAxisDatas.forEach(function (item, i) {
	  if (item.type === 'spline' || item.type === 'line') {
		option.yAxis.push({
		  plotLines: [{
			color: 'black', // 线的颜色,定义为红色
			dashStyle: 'solid', // 默认值,这里定义为实线
			value: 0, // 定义在那个值上显示标示线,这里是在 x 轴上刻度为 3 的值处垂直化一条线
			width: 2 // 标示线的宽度,2px
		  }],
		  tickAmount: 4, // 规定坐标轴上的刻度总数
		  gridLineColor: '#ddd',
		  gridLineDashStyle: 'Solid',
		  labels: { // 坐标轴上刻度的样式及单位
			align: 'right',
			x: 6,
			style: {
			  color: '#999999',
			  fontSize: 12
			},
			format: '{value}' + item.unit // 坐标轴上的单位
		  },
		  title: {
			text: item.title,
			margin: 20,
			style: {
			  color: '#999999',
			  fontSize: 12,
			  align: 'middle' // 坐标轴对齐方式(相对于坐标轴的值) 默认是:middle 居中对齐
			}
		  },
		  height: item.height,
		  lineWidth: 0
		})
		option.series.push({
		  name: item.name,
		  data: item.data,
		  type: item.type,
		  color: 'rgb(170, 70, 67)',
		  tooltip: {
			valueSuffix: item.unit, // 数值后缀
			valueDecimals: item.valueDecimals //  提示框数据精度 (保留小数点后 3 位)
		  },
		  yAxis: item.yAxisIndex,
		  showInNavigator: false
		})
	  } else if (item.type === 'column') {
		option.yAxis.push({
		  type: item.type,
		  tickAmount: 4, // 规定坐标轴上的刻度总数
		  startOnTick: true,
		  reversed: false, //y 轴刻度反转
		  showFirstLabel: false,
		  showLastLabel: true,
		  gridLineColor: '#ddd',
		  gridLineDashStyle: 'Solid',
		  labels: {
			align: 'right',
			x: 12,
			style: {
			  color: '#999999',
			  fontSize: 12
			},
			formatter: item.formatter,
			format: '{value}' + item.unit // 坐标轴上的单位
		  },
		  title: {
			text: item.title,
			margin: 20,
			style: {
			  color: '#999999',
			  fontSize: 12,
			  align: 'middle' // 坐标轴对齐方式(相对于坐标轴的值) 默认是:middle 居中对齐
			}
		  },
		  top: item.top,
		  height: item.height,
		  offset: 0,
		  lineWidth: 0
		})
		option.series.push({
		  name: item.name,
		  type: item.type,
		  data: item.data,
		  tooltip: {
			pointFormatter: function () {
			  return '<tr><td><li style="color: ' + this.color + ';padding:0px;"></span> ' + item.name +
				': </li><div style="float: right;">' + this.y.toFixed(item.valueDecimals) + item.unit + '</div></td></tr>'
			}
		  },
		  yAxis: item.yAxisIndex,
		  showInNavigator: false
		})
	  }
	})
}
// 画图(container 为 div 的 id)
Highcharts.stockChart('container', option)
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +Highcharts 画收益概览 - Highcharts - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

项目中需要画一幅收益概览图,研究了一下 Highcharts 的用法。特此收录方便以后再次使用时查阅。
1ef80bfe8b5ee82aec0e2549e8c68e2c.png

# 代码

//x 轴时间集合
var chartXAxisDateTimes = ['2022-01-01 00:00:00', '2022-02-01 00:00:00', '2022-03-01 00:00:00', '2022-04-01 00:00:00', '2022-05-01 00:00:00']
//y 轴数据集合
var chartYAxisDatas = [
          {
            title: '累计收益',
            name: '我的策略累计收益',
            type: 'spline',
            unit: '%',
            valueDecimals: 3,
            height: '28%',
            yAxisIndex: 0, //y 轴分区 index(从上到下,默认从 0 开始)
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: ''
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: ''
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: ''
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: ''
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: ''
            }]
          },
          {
            title: '每月盈亏',
            name: '当月盈利',
            type: 'column',
            unit: 'k',
            valueDecimals: 0,
            top: '34%',
            height: '28%',
            yAxisIndex: 1, //y 轴分区 index(从上到下,默认从 0 开始)
            formatter: function () {
              return this.value < 0 ? (-this.value) + 'k' : this.value + 'k'
            },
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: ''
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: ''
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: ''
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: ''
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: ''
            }]
          },
          {
            title: '成交记录',
            name: '当月买入',
            type: 'column',
            unit: 'k',
            valueDecimals: 0,
            top: '68%',
            height: '28%',
            yAxisIndex: 2, //y 轴分区 index(从上到下,默认从 0 开始)
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: 'red'
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: 'red'
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: 'red'
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: 'red'
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: 'red'
            }]
          },
          {
            title: '成交记录',
            name: '当月卖出',
            type: 'column',
            unit: 'k',
            valueDecimals: 0,
            top: '68%',
            height: '28%',
            yAxisIndex: 2, //y 轴分区 index(从上到下,默认从 0 开始)
            data: [{
              x: new Date('2022-01-01 00:00:00').getTime(),
              y: 1,
              color: 'green'
            },
            {
              x: new Date('2022-02-01 00:00:00').getTime(),
              y: 2,
              color: 'green'
            },
            {
              x: new Date('2022-03-01 00:00:00').getTime(),
              y: 3,
              color: 'green'
            },
            {
              x: new Date('2022-04-01 00:00:00').getTime(),
              y: 4,
              color: 'green'
            },
            {
              x: new Date('2022-05-01 00:00:00').getTime(),
              y: 5,
              color: 'green'
            }]
          }
        ]
		
// 最大回测范围
var plotBandScope = [new Date('2022-02-01 00:00:00').getTime(), new Date('2022-04-01 00:00:00').getTime()]
// 图表配置
var option = {
	chart: {
	  height: 600,
	  type: 'spline' // 指定图表的类型,默认是折线图(line)
	},
	plotOptions: {
	  spline: {
		borderWidth: 0,
		lineWidth: 1,
		states: {
		  hover: {
			lineWidth: 2
		  }
		},
		//pointWidth: 4, // 柱子内宽度容
		dataLabels: {
		  style: {
			fontSize: 11
		  },
		  enabled: false
		},
		showInLegend: true
	  },
	  column: {
		borderWidth: 0,
		pointWidth: 4, // 柱子内宽度容
		dataLabels: {
		  style: {
			fontSize: 11
		  },
		  enabled: false
		},
		showInLegend: true,
		grouping: true
	  }
	},
	rangeSelector: {
	  enabled: false
	},
	credits: {
	  enabled: false
	},
	// legend: {
	//   enabled: true,
	//   verticalAlign: 'top'
	// },
	navigator: { // 导航器样式
	  enabled: true,
	  height: 20
	},
	scrollbar: { // 滚动条样式
	  barBackgroundColor: 'rgb(209, 218, 237)',
	  barBorderRadius: 0,
	  barBorderWidth: 0,
	  buttonBackgroundColor: 'rgb(242, 242, 242)',
	  buttonBorderWidth: 0,
	  buttonBorderRadius: 0,
	  trackBackgroundColor: 'none',
	  trackBorderWidth: 1,
	  trackBorderRadius: 0,
	  trackBorderColor: '#CCC'
	},
	xAxis: {
	  lineWidth: 1,
	  type: 'datetime',
	  categories: [],
	  dateTimeLabelFormats: {
		// millisecond: '%H:%M:%S.%L',
		// second: '%H:%M:%S',
		// minute: '%H:%M',
		// hour: '%m-%d %H:%M',
		day: '%m-%d',
		week: '%m-%d',
		month: '%Y-%m',
		year: '%Y'
	  },
	  gridLineWidth: 1
	},
	yAxis: [],
	tooltip: {
	  xDateFormat: '%Y-%m-%d %H:%M:%S',
	  style: {
		fontSize: 16,
		fontFamily: '微软雅黑',
		fontWeight: 'normal',
		color: '#666',
		padding: 10,
		borderWidth: 0,
		backgroundColor: '#ddd'
	  },
	  shared: true,
	  useHTML: true,
	  headerFormat: '<small style="font-size: 12px">{point.key}</small><table>', // 标题格式,
	  pointFormat: '<tr><td><li style="color:{series.color};padding:0px">{series.name}: </li>' +
	  '<div style="float: right;">{point.y} {series.tooltip.valueDecimals}</div></td></tr>',
	  footerFormat: '</table>',
	  shadow: true,
	  followPointer: true // 跟随鼠标
	},
	series: []
}
// 根据最大回测范围修改图表配置
if (plotBandScope && plotBandScope.length === 2) {
	option.xAxis.plotBands = [{
	  from: plotBandScope[0],
	  to: plotBandScope[1],
	  color: '#FCFFC5',
	  label: {
		text: '最大回测区间',
		align: 'center',
		verticalAlign: 'top',
		y: 14
	  }
	}]
}
// 根据 x 轴时间集合修改图表配置
if (chartXAxisDateTimes && chartXAxisDateTimes.length > 0) {
	option.categories = chartXAxisDateTimes
}
// 根据 y 轴数据集合修改图表配置
if (chartYAxisDatas && chartYAxisDatas.length > 0) {
	chartYAxisDatas.forEach(function (item, i) {
	  if (item.type === 'spline' || item.type === 'line') {
		option.yAxis.push({
		  plotLines: [{
			color: 'black', // 线的颜色,定义为红色
			dashStyle: 'solid', // 默认值,这里定义为实线
			value: 0, // 定义在那个值上显示标示线,这里是在 x 轴上刻度为 3 的值处垂直化一条线
			width: 2 // 标示线的宽度,2px
		  }],
		  tickAmount: 4, // 规定坐标轴上的刻度总数
		  gridLineColor: '#ddd',
		  gridLineDashStyle: 'Solid',
		  labels: { // 坐标轴上刻度的样式及单位
			align: 'right',
			x: 6,
			style: {
			  color: '#999999',
			  fontSize: 12
			},
			format: '{value}' + item.unit // 坐标轴上的单位
		  },
		  title: {
			text: item.title,
			margin: 20,
			style: {
			  color: '#999999',
			  fontSize: 12,
			  align: 'middle' // 坐标轴对齐方式(相对于坐标轴的值) 默认是:middle 居中对齐
			}
		  },
		  height: item.height,
		  lineWidth: 0
		})
		option.series.push({
		  name: item.name,
		  data: item.data,
		  type: item.type,
		  color: 'rgb(170, 70, 67)',
		  tooltip: {
			valueSuffix: item.unit, // 数值后缀
			valueDecimals: item.valueDecimals //  提示框数据精度 (保留小数点后 3 位)
		  },
		  yAxis: item.yAxisIndex,
		  showInNavigator: false
		})
	  } else if (item.type === 'column') {
		option.yAxis.push({
		  type: item.type,
		  tickAmount: 4, // 规定坐标轴上的刻度总数
		  startOnTick: true,
		  reversed: false, //y 轴刻度反转
		  showFirstLabel: false,
		  showLastLabel: true,
		  gridLineColor: '#ddd',
		  gridLineDashStyle: 'Solid',
		  labels: {
			align: 'right',
			x: 12,
			style: {
			  color: '#999999',
			  fontSize: 12
			},
			formatter: item.formatter,
			format: '{value}' + item.unit // 坐标轴上的单位
		  },
		  title: {
			text: item.title,
			margin: 20,
			style: {
			  color: '#999999',
			  fontSize: 12,
			  align: 'middle' // 坐标轴对齐方式(相对于坐标轴的值) 默认是:middle 居中对齐
			}
		  },
		  top: item.top,
		  height: item.height,
		  offset: 0,
		  lineWidth: 0
		})
		option.series.push({
		  name: item.name,
		  type: item.type,
		  data: item.data,
		  tooltip: {
			pointFormatter: function () {
			  return '<tr><td><li style="color: ' + this.color + ';padding:0px;"></span> ' + item.name +
				': </li><div style="float: right;">' + this.y.toFixed(item.valueDecimals) + item.unit + '</div></td></tr>'
			}
		  },
		  yAxis: item.yAxisIndex,
		  showInNavigator: false
		})
	  }
	})
}
// 画图(container 为 div 的 id)
Highcharts.stockChart('container', option)
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2023/01/10/Vue根据路由传参修改页面数据/index.html b/2023/01/10/Vue根据路由传参修改页面数据/index.html index c3d1d9649..82097936d 100644 --- a/2023/01/10/Vue根据路由传参修改页面数据/index.html +++ b/2023/01/10/Vue根据路由传参修改页面数据/index.html @@ -1 +1 @@ -Vue 根据路由传参修改页面数据 - Vue - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

在开发前端页面时会存在相同的页面展示,只是菜单名称不同、数据类型不同的情况。如果再拷贝一个页面来展示后期就需要维护两个页面,同时也增加了工作量。但是只使用一个页面通过传参来改变数据就方便多了。

# 路由配置

{
    path: '/test/:type/:menuIndex',
    name: 'Test',
    component: _import('xxx/Test.vue')
 }

# 菜单配置

<template>
    <el-menu
      class="aside-menu"
      :default-active="menuIndex.toString()"
      @select="handleSelect"
    >
      <el-menu-item
        index="1"
        class="aside-menu-item"
      >
        <template #title>
          <span>TEST1</span>
          <el-icon :size="20"><TrendCharts /></el-icon>
        </template>
      </el-menu-item>
      <el-menu-item
        index="2"
        class="aside-menu-item"
      >
        <template #title>
          <span>TEST2</span>
          <el-icon :size="20"><Orange /></el-icon>
        </template>
      </el-menu-item>
    </el-menu>
</template>
methods: {
    handleSelect (val) {
      if (val === '1') {
        this.$router.push({ path: '/test/type1/' + val })
      } else if (val === '2') {
        this.$router.push({ path: '/test/type2/' + val })
      }
    }
}

# 页面

created () {
    this.$watch(
      () => this.$route.params,
      (toParams, previousParams) => {
        if (isNotEmpty(toParams.menuIndex)) {
          this.menuIndex = toParams.menuIndex
        }
        if (isNotEmpty(toParams.type)) {
          this.type = toParams.type
        }
        // 根据type查询数据
        ...
      }
    )
    if (isNotEmpty(this.$route.params.menuIndex)) {
      this.menuIndex = this.$route.params.menuIndex
    }
    if (isNotEmpty(this.$route.params.type)) {
      this.type = this.$route.params.type
    }
},
mounted () {
	// 根据type查询数据
	...
}
\ No newline at end of file +Vue 根据路由传参修改页面数据 - Vue - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

在开发前端页面时会存在相同的页面展示,只是菜单名称不同、数据类型不同的情况。如果再拷贝一个页面来展示后期就需要维护两个页面,同时也增加了工作量。但是只使用一个页面通过传参来改变数据就方便多了。

# 路由配置

{
    path: '/test/:type/:menuIndex',
    name: 'Test',
    component: _import('xxx/Test.vue')
 }

# 菜单配置

<template>
    <el-menu
      class="aside-menu"
      :default-active="menuIndex.toString()"
      @select="handleSelect"
    >
      <el-menu-item
        index="1"
        class="aside-menu-item"
      >
        <template #title>
          <span>TEST1</span>
          <el-icon :size="20"><TrendCharts /></el-icon>
        </template>
      </el-menu-item>
      <el-menu-item
        index="2"
        class="aside-menu-item"
      >
        <template #title>
          <span>TEST2</span>
          <el-icon :size="20"><Orange /></el-icon>
        </template>
      </el-menu-item>
    </el-menu>
</template>
methods: {
    handleSelect (val) {
      if (val === '1') {
        this.$router.push({ path: '/test/type1/' + val })
      } else if (val === '2') {
        this.$router.push({ path: '/test/type2/' + val })
      }
    }
}

# 页面

created () {
    this.$watch(
      () => this.$route.params,
      (toParams, previousParams) => {
        if (isNotEmpty(toParams.menuIndex)) {
          this.menuIndex = toParams.menuIndex
        }
        if (isNotEmpty(toParams.type)) {
          this.type = toParams.type
        }
        // 根据type查询数据
        ...
      }
    )
    if (isNotEmpty(this.$route.params.menuIndex)) {
      this.menuIndex = this.$route.params.menuIndex
    }
    if (isNotEmpty(this.$route.params.type)) {
      this.type = this.$route.params.type
    }
},
mounted () {
	// 根据type查询数据
	...
}
\ No newline at end of file diff --git a/2023/01/31/KLineChart画波段高低价图/index.html b/2023/01/31/KLineChart画波段高低价图/index.html index a31456d18..4d41cad3c 100644 --- a/2023/01/31/KLineChart画波段高低价图/index.html +++ b/2023/01/31/KLineChart画波段高低价图/index.html @@ -1 +1 @@ -KLineChart 画波段高低价图 - KLineChart - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

使用指定数据方式得到的线条总是不能达到想要的效果,一是阶梯线在价格发生变化的点存在倾斜,二是高低价的线很难完美显示,所以只能自己动手画了。代码仅供参考,如有错误的地方请指正!
ee3c75b472c5869794e205747703d888.png

# 模版代码

this.chart.addTechnicalIndicatorTemplate({
	name: 'BandHighLowInd',
    shortName: '波段高低价',
    calcParams: [{ value: 10 }],
    precision: 2,
    plots: [
      { key: 'high', title: '高: ', color: (data, options) => { return options.line.colors[0] } },
      { key: 'low', title: '低: ', color: (data, options) => { return options.line.colors[1] } },
      { key: 'highLow', title: '高低: ', color: (data, options) => { return options.line.colors[2] } }
    ],
    calcTechnicalIndicator: (dataList, { params }) => {
      let compareKlineSize = params[0] // 取前后 k 的范围
      let highs = []
      let lows = []
      let highLows = []
      let findHigh // 高低价当前查找标识
      dataList.forEach(function (kLineData, i) {
        let frontIndex = i - compareKlineSize
        if (frontIndex <= 0) {
          frontIndex = 0
        }
        let frontDatas = []
        if (frontIndex < i) {
          frontDatas = dataList.slice(frontIndex, i)
        }
        let afterIndex = i + compareKlineSize + 1
        let afterDatas = []
        if (i < dataList.length - 1) {
          afterDatas = dataList.slice(i + 1, afterIndex)
        }
        if (frontDatas.length === compareKlineSize && afterDatas.length === compareKlineSize) { // 前后 K 线数据必须都找到要比较的条数
          let high = null
          let low = null
          frontDatas.concat(afterDatas).forEach(function (kLineData, i) { // 找出前后 k 线中的最高和最低价
            if (high === null || kLineData.high > high) {
              high = kLineData.high
            }
            if (low === null || kLineData.low < low) {
              low = kLineData.low
            }
          })
          if (kLineData.high > high) { // 当前 k 的高大于前后 k 中找出的高,则放入高价集合中
            highs.push({
              time: kLineData.timestamp,
              value: kLineData.high,
              index: i
            })
            if (isNotEmpty(findHigh)) {
              if (findHigh && highLows[highLows.length - 1].value !== kLineData.high) {
                highLows.push({
                  time: kLineData.timestamp,
                  value: kLineData.high,
                  index: i
                })
                findHigh = false
              }
            } else {
              highLows.push({
                time: kLineData.timestamp,
                value: kLineData.high,
                index: i
              })
              findHigh = false
            }
          }
          if (kLineData.low < low) { // 当前 k 的低小于前后 k 中找出的低,则放入低价集合中
            lows.push({
              time: kLineData.timestamp,
              value: kLineData.low,
              index: i
            })
            if (isNotEmpty(findHigh)) {
              if (!findHigh && highLows[highLows.length - 1].value !== kLineData.low) {
                highLows.push({
                  time: kLineData.timestamp,
                  value: kLineData.low,
                  index: i
                })
                findHigh = true
              }
            } else {
              highLows.push({
                time: kLineData.timestamp,
                value: kLineData.low,
                index: i
              })
              findHigh = true
            }
          }
        }
      })
      let high, low, highLow
      return dataList.map((kLineData, i) => {
        let item = {
        }
        highs.forEach((data) => {
          if (kLineData.timestamp === data.time) {
            high = data.value
            item.highOrigin = true
          }
        })
        if (isNotEmpty(high)) { // 持续先前的高,画出阶梯线
          item.timestamp = kLineData.timestamp
          item.high = high
        }
        lows.forEach((data) => {
          if (kLineData.timestamp === data.time) {
            low = data.value
            item.lowOrigin = true
          }
        })
        if (isNotEmpty(low)) { // 持续先前的低,画出阶梯线
          item.timestamp = kLineData.timestamp
          item.low = low
        }
        highLows.forEach((data) => {
          if (kLineData.timestamp === data.time) {
            highLow = data.value
            item.highLowOrigin = true
          }
        })
        if (isNotEmpty(highLow)) { // 持续先前的高低,方便 title 显示
          item.timestamp = kLineData.timestamp
          item.highLow = highLow
        }
        return item
      })
    },
    render: ({ ctx, dataSource, viewport, styles, xAxis, yAxis }) => {
      if (dataSource.technicalIndicatorDataList.length <= 0) {
        return
      }
      let x = xAxis.convertToPixel(0)
      let high, low, highLow, highLowX
      dataSource.technicalIndicatorDataList.forEach(function (data, i) {
        // 画高线
        ctx.textBaseline = 'middle'
        ctx.textAlign = 'center'
        ctx.fillStyle = '#fff'
        ctx.strokeStyle = '#fff'
        if (styles.line && styles.line.colors && styles.line.colors[0]) {
          ctx.fillStyle = styles.line.colors[0]
          ctx.strokeStyle = styles.line.colors[0]
        }
        if (isNotEmpty(high) && data.high !== high) {
          ctx.beginPath()
          ctx.moveTo(x, yAxis.convertToPixel(high))
          ctx.lineTo(x, yAxis.convertToPixel(data.high))
          ctx.stroke()
          ctx.closePath()
        }
        high = data.high
        let y = yAxis.convertToPixel(high)
        ctx.beginPath()
        ctx.moveTo(x, y)
        ctx.lineTo(x + viewport.dataSpace, y)
        ctx.stroke()
        ctx.closePath()
        // 画低线
        ctx.fillStyle = '#fff'
        ctx.strokeStyle = '#fff'
        if (styles.line && styles.line.colors && styles.line.colors[1]) {
          ctx.fillStyle = styles.line.colors[1]
          ctx.strokeStyle = styles.line.colors[1]
        }
        if (isNotEmpty(low) && data.low !== low) {
          ctx.beginPath()
          ctx.moveTo(x, yAxis.convertToPixel(low))
          ctx.lineTo(x, yAxis.convertToPixel(data.low))
          ctx.stroke()
          ctx.closePath()
        }
        low = data.low
        y = yAxis.convertToPixel(low)
        ctx.beginPath()
        ctx.moveTo(x, y)
        ctx.lineTo(x + viewport.dataSpace, y)
        ctx.stroke()
        ctx.closePath()
        // 画高低线
        if (isNotEmpty(data.highLow) && data.highLowOrigin === true) {
          if (isNotEmpty(highLow) && isNotEmpty(highLowX)) {
            ctx.fillStyle = '#fff'
            ctx.strokeStyle = '#fff'
            if (styles.line && styles.line.colors && styles.line.colors[2]) {
              ctx.fillStyle = styles.line.colors[2]
              ctx.strokeStyle = styles.line.colors[2]
            }
            ctx.beginPath()
            ctx.moveTo(highLowX, yAxis.convertToPixel(highLow))
            ctx.lineTo(x, yAxis.convertToPixel(data.highLow))
            ctx.stroke()
            ctx.closePath()
          }
          highLow = data.highLow
          highLowX = x
        }
        // 画价格
        if (data.high !== undefined && data.highOrigin === true) { // 画高价
          let text = Number.parseFloat(data.high).toFixed(2)
          ctx.fillStyle = '#fff'
          if (styles.line && styles.line.colors && styles.line.colors[0]) {
            ctx.fillStyle = styles.line.colors[0]
          }
          let offset = 10
          let y = yAxis.convertToPixel(data.high)
          for (let i = 2; i < offset - 1; i += 2) {
            ctx.fillText('.', x, y - i)
          }
          ctx.fillText(text, x, y - offset)
        }
        if (data.low !== undefined && data.lowOrigin === true) { // 画低价
          let text = Number.parseFloat(data.low).toFixed(2)
          ctx.fillStyle = '#fff'
          if (styles.line && styles.line.colors && styles.line.colors[1]) {
            ctx.fillStyle = styles.line.colors[1]
          }
          let offset = 15
          let y = yAxis.convertToPixel(data.low)
          for (let i = 2; i < offset - 5; i += 2) {
            ctx.fillText('.', x, y + i)
          }
          ctx.fillText(text, x, y + offset)
        }
        x += viewport.dataSpace
      })
    }
})
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +KLineChart 画波段高低价图 - KLineChart - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

使用指定数据方式得到的线条总是不能达到想要的效果,一是阶梯线在价格发生变化的点存在倾斜,二是高低价的线很难完美显示,所以只能自己动手画了。代码仅供参考,如有错误的地方请指正!
ee3c75b472c5869794e205747703d888.png

# 模版代码

this.chart.addTechnicalIndicatorTemplate({
	name: 'BandHighLowInd',
    shortName: '波段高低价',
    calcParams: [{ value: 10 }],
    precision: 2,
    plots: [
      { key: 'high', title: '高: ', color: (data, options) => { return options.line.colors[0] } },
      { key: 'low', title: '低: ', color: (data, options) => { return options.line.colors[1] } },
      { key: 'highLow', title: '高低: ', color: (data, options) => { return options.line.colors[2] } }
    ],
    calcTechnicalIndicator: (dataList, { params }) => {
      let compareKlineSize = params[0] // 取前后 k 的范围
      let highs = []
      let lows = []
      let highLows = []
      let findHigh // 高低价当前查找标识
      dataList.forEach(function (kLineData, i) {
        let frontIndex = i - compareKlineSize
        if (frontIndex <= 0) {
          frontIndex = 0
        }
        let frontDatas = []
        if (frontIndex < i) {
          frontDatas = dataList.slice(frontIndex, i)
        }
        let afterIndex = i + compareKlineSize + 1
        let afterDatas = []
        if (i < dataList.length - 1) {
          afterDatas = dataList.slice(i + 1, afterIndex)
        }
        if (frontDatas.length === compareKlineSize && afterDatas.length === compareKlineSize) { // 前后 K 线数据必须都找到要比较的条数
          let high = null
          let low = null
          frontDatas.concat(afterDatas).forEach(function (kLineData, i) { // 找出前后 k 线中的最高和最低价
            if (high === null || kLineData.high > high) {
              high = kLineData.high
            }
            if (low === null || kLineData.low < low) {
              low = kLineData.low
            }
          })
          if (kLineData.high > high) { // 当前 k 的高大于前后 k 中找出的高,则放入高价集合中
            highs.push({
              time: kLineData.timestamp,
              value: kLineData.high,
              index: i
            })
            if (isNotEmpty(findHigh)) {
              if (findHigh && highLows[highLows.length - 1].value !== kLineData.high) {
                highLows.push({
                  time: kLineData.timestamp,
                  value: kLineData.high,
                  index: i
                })
                findHigh = false
              }
            } else {
              highLows.push({
                time: kLineData.timestamp,
                value: kLineData.high,
                index: i
              })
              findHigh = false
            }
          }
          if (kLineData.low < low) { // 当前 k 的低小于前后 k 中找出的低,则放入低价集合中
            lows.push({
              time: kLineData.timestamp,
              value: kLineData.low,
              index: i
            })
            if (isNotEmpty(findHigh)) {
              if (!findHigh && highLows[highLows.length - 1].value !== kLineData.low) {
                highLows.push({
                  time: kLineData.timestamp,
                  value: kLineData.low,
                  index: i
                })
                findHigh = true
              }
            } else {
              highLows.push({
                time: kLineData.timestamp,
                value: kLineData.low,
                index: i
              })
              findHigh = true
            }
          }
        }
      })
      let high, low, highLow
      return dataList.map((kLineData, i) => {
        let item = {
        }
        highs.forEach((data) => {
          if (kLineData.timestamp === data.time) {
            high = data.value
            item.highOrigin = true
          }
        })
        if (isNotEmpty(high)) { // 持续先前的高,画出阶梯线
          item.timestamp = kLineData.timestamp
          item.high = high
        }
        lows.forEach((data) => {
          if (kLineData.timestamp === data.time) {
            low = data.value
            item.lowOrigin = true
          }
        })
        if (isNotEmpty(low)) { // 持续先前的低,画出阶梯线
          item.timestamp = kLineData.timestamp
          item.low = low
        }
        highLows.forEach((data) => {
          if (kLineData.timestamp === data.time) {
            highLow = data.value
            item.highLowOrigin = true
          }
        })
        if (isNotEmpty(highLow)) { // 持续先前的高低,方便 title 显示
          item.timestamp = kLineData.timestamp
          item.highLow = highLow
        }
        return item
      })
    },
    render: ({ ctx, dataSource, viewport, styles, xAxis, yAxis }) => {
      if (dataSource.technicalIndicatorDataList.length <= 0) {
        return
      }
      let x = xAxis.convertToPixel(0)
      let high, low, highLow, highLowX
      dataSource.technicalIndicatorDataList.forEach(function (data, i) {
        // 画高线
        ctx.textBaseline = 'middle'
        ctx.textAlign = 'center'
        ctx.fillStyle = '#fff'
        ctx.strokeStyle = '#fff'
        if (styles.line && styles.line.colors && styles.line.colors[0]) {
          ctx.fillStyle = styles.line.colors[0]
          ctx.strokeStyle = styles.line.colors[0]
        }
        if (isNotEmpty(high) && data.high !== high) {
          ctx.beginPath()
          ctx.moveTo(x, yAxis.convertToPixel(high))
          ctx.lineTo(x, yAxis.convertToPixel(data.high))
          ctx.stroke()
          ctx.closePath()
        }
        high = data.high
        let y = yAxis.convertToPixel(high)
        ctx.beginPath()
        ctx.moveTo(x, y)
        ctx.lineTo(x + viewport.dataSpace, y)
        ctx.stroke()
        ctx.closePath()
        // 画低线
        ctx.fillStyle = '#fff'
        ctx.strokeStyle = '#fff'
        if (styles.line && styles.line.colors && styles.line.colors[1]) {
          ctx.fillStyle = styles.line.colors[1]
          ctx.strokeStyle = styles.line.colors[1]
        }
        if (isNotEmpty(low) && data.low !== low) {
          ctx.beginPath()
          ctx.moveTo(x, yAxis.convertToPixel(low))
          ctx.lineTo(x, yAxis.convertToPixel(data.low))
          ctx.stroke()
          ctx.closePath()
        }
        low = data.low
        y = yAxis.convertToPixel(low)
        ctx.beginPath()
        ctx.moveTo(x, y)
        ctx.lineTo(x + viewport.dataSpace, y)
        ctx.stroke()
        ctx.closePath()
        // 画高低线
        if (isNotEmpty(data.highLow) && data.highLowOrigin === true) {
          if (isNotEmpty(highLow) && isNotEmpty(highLowX)) {
            ctx.fillStyle = '#fff'
            ctx.strokeStyle = '#fff'
            if (styles.line && styles.line.colors && styles.line.colors[2]) {
              ctx.fillStyle = styles.line.colors[2]
              ctx.strokeStyle = styles.line.colors[2]
            }
            ctx.beginPath()
            ctx.moveTo(highLowX, yAxis.convertToPixel(highLow))
            ctx.lineTo(x, yAxis.convertToPixel(data.highLow))
            ctx.stroke()
            ctx.closePath()
          }
          highLow = data.highLow
          highLowX = x
        }
        // 画价格
        if (data.high !== undefined && data.highOrigin === true) { // 画高价
          let text = Number.parseFloat(data.high).toFixed(2)
          ctx.fillStyle = '#fff'
          if (styles.line && styles.line.colors && styles.line.colors[0]) {
            ctx.fillStyle = styles.line.colors[0]
          }
          let offset = 10
          let y = yAxis.convertToPixel(data.high)
          for (let i = 2; i < offset - 1; i += 2) {
            ctx.fillText('.', x, y - i)
          }
          ctx.fillText(text, x, y - offset)
        }
        if (data.low !== undefined && data.lowOrigin === true) { // 画低价
          let text = Number.parseFloat(data.low).toFixed(2)
          ctx.fillStyle = '#fff'
          if (styles.line && styles.line.colors && styles.line.colors[1]) {
            ctx.fillStyle = styles.line.colors[1]
          }
          let offset = 15
          let y = yAxis.convertToPixel(data.low)
          for (let i = 2; i < offset - 5; i += 2) {
            ctx.fillText('.', x, y + i)
          }
          ctx.fillText(text, x, y + offset)
        }
        x += viewport.dataSpace
      })
    }
})
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/2023/02/18/修改IntellIJ-IDE背景色和字体大小/index.html b/2023/02/18/修改IntellIJ-IDE背景色和字体大小/index.html index 770a17aa8..7590abcaf 100644 --- a/2023/02/18/修改IntellIJ-IDE背景色和字体大小/index.html +++ b/2023/02/18/修改IntellIJ-IDE背景色和字体大小/index.html @@ -1 +1 @@ -修改 IntellIJ IDE 背景色和字体大小 - IDE - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

网上搜索了几个修改 IDE 背景色和字体大小的方法,记录一下方便以后查看。

# 操作截图

  1. 修改代码区颜色
    bb050e7e4c3b3ff2968b0a1be311d31f.png

  2. 修改代码区字体大小
    af92e69249a74978f56a5b2f8bf792a8.png

  3. 修改控制台背景色
    80dd5d82bfc6d0380ce34a590d8beeb4.png

  4. 修改控制台字体大小
    86bd97d1937b77faa27d31db7c2abb91.png

  5. 修改左侧背景色
    4875f8006144733c0e6710a2b04bc2be.jpg

\ No newline at end of file +修改 IntellIJ IDE 背景色和字体大小 - IDE - 解决问题 - 工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 引言

网上搜索了几个修改 IDE 背景色和字体大小的方法,记录一下方便以后查看。

# 操作截图

  1. 修改代码区颜色
    bb050e7e4c3b3ff2968b0a1be311d31f.png

  2. 修改代码区字体大小
    af92e69249a74978f56a5b2f8bf792a8.png

  3. 修改控制台背景色
    80dd5d82bfc6d0380ce34a590d8beeb4.png

  4. 修改控制台字体大小
    86bd97d1937b77faa27d31db7c2abb91.png

  5. 修改左侧背景色
    4875f8006144733c0e6710a2b04bc2be.jpg

  6. 修改 UI 字体大小
    UI.png

\ No newline at end of file diff --git a/404.html b/404.html index da1dcad3a..d9644afa6 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -Σ( ° △ °|||)︴404!何も見えない | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
Σ( ° △ °|||)︴404!何も見えない
\ No newline at end of file +Σ( ° △ °|||)︴404!何も見えない | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
Σ( ° △ °|||)︴404!何も見えない
\ No newline at end of file diff --git a/about/me.html b/about/me.html index 7b1ec1681..af300afd6 100644 --- a/about/me.html +++ b/about/me.html @@ -1 +1 @@ -| ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 个人信息

  • 姓名:李海涛
  • 性别:男
  • 学历:本科
  • 生肖:鼠
  • 星座:天秤

# 个人爱好

  • 跑步
  • 篮球
  • 听歌
  • 电影

# 编程语言

  • java
  • python
  • php

# 项目经历 - 近期

  1. 智能量化决策交易系统

    该项目主要用于对期货、股票等进行智能化交易,会根据用户事先设置的规则决策是否买卖,并
    给出信号、收益、最大回撤等详细的统计报告及分析报表。该项目采用Spring Cloud微服务解决方案
    ,主要功能模块分为行情采集、策略计算、交易信号处理、账户交易服务、ctp网关、策略统计、消息
    推送等。该项目使用IntellIJ做为主要开发工具,前端使用vue框架,图表采用tradingview、
    highchart等。后端使用mybatis、mysql对部分用户、策略、配置信息进行存储,kafka做为行情数据
    、交易信号等消息中间件。使用redis存储当日分时行情等临时数据,mongodb用于存储分析结果、信
    号历史,hbase存储期货行情等详细数据。使用netty框架实现实时消息推送。
  2. IWB-EX 交易平台

    该项目主要依托流行的区块链技术进行白酒的销售。以虚拟币为货币,白酒为等价商品进行交易。
    当虚拟币价格过低时用户可以选择实物白酒进行提货。使用IntellIJ做为开发工具,采用的技术有
    springMVC、mysql、thymeleaf等。
  3. 废品回收管理平台

    该项目主要为废品回收公司提供废品的进出库管理和统计,并打印详细价格单据等。该项目分为
    两个平台,给用户使用的入库填表平台和给企业管理人员使用的审核、管理后台。使用IntellIJ做为
    开发工具,采用的技术有springMVC、mysql、freemarker等。
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file +| ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

# 个人信息

  • 姓名:李海涛
  • 性别:男
  • 学历:本科
  • 生肖:鼠
  • 星座:天秤

# 个人爱好

  • 跑步
  • 篮球
  • 听歌
  • 电影

# 编程语言

  • java
  • python
  • php

# 项目经历 - 近期

  1. 智能量化决策交易系统

    该项目主要用于对期货、股票等进行智能化交易,会根据用户事先设置的规则决策是否买卖,并
    给出信号、收益、最大回撤等详细的统计报告及分析报表。该项目采用Spring Cloud微服务解决方案
    ,主要功能模块分为行情采集、策略计算、交易信号处理、账户交易服务、ctp网关、策略统计、消息
    推送等。该项目使用IntellIJ做为主要开发工具,前端使用vue框架,图表采用tradingview、
    highchart等。后端使用mybatis、mysql对部分用户、策略、配置信息进行存储,kafka做为行情数据
    、交易信号等消息中间件。使用redis存储当日分时行情等临时数据,mongodb用于存储分析结果、信
    号历史,hbase存储期货行情等详细数据。使用netty框架实现实时消息推送。
  2. IWB-EX 交易平台

    该项目主要依托流行的区块链技术进行白酒的销售。以虚拟币为货币,白酒为等价商品进行交易。
    当虚拟币价格过低时用户可以选择实物白酒进行提货。使用IntellIJ做为开发工具,采用的技术有
    springMVC、mysql、thymeleaf等。
  3. 废品回收管理平台

    该项目主要为废品回收公司提供废品的进出库管理和统计,并打印详细价格单据等。该项目分为
    两个平台,给用户使用的入库填表平台和给企业管理人员使用的审核、管理后台。使用IntellIJ做为
    开发工具,采用的技术有springMVC、mysql、freemarker等。
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

Hito Li 微信支付

微信支付

Hito Li 支付宝

支付宝

\ No newline at end of file diff --git a/archives/2022/09/index.html b/archives/2022/09/index.html index 3a676f2ba..3fb65ba38 100644 --- a/archives/2022/09/index.html +++ b/archives/2022/09/index.html @@ -1 +1 @@ -2022 年 / 09 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 / 09 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/10/index.html b/archives/2022/10/index.html index a8720517f..4d20bbc2e 100644 --- a/archives/2022/10/index.html +++ b/archives/2022/10/index.html @@ -1 +1 @@ -2022 年 / 10 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 / 10 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/10/page/2/index.html b/archives/2022/10/page/2/index.html index df2ec2de4..f2096468a 100644 --- a/archives/2022/10/page/2/index.html +++ b/archives/2022/10/page/2/index.html @@ -1 +1 @@ -2022 年 / 10 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 / 10 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/11/index.html b/archives/2022/11/index.html index a806bf2ab..4d6a43fcc 100644 --- a/archives/2022/11/index.html +++ b/archives/2022/11/index.html @@ -1 +1 @@ -2022 年 / 11 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 / 11 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/11/page/2/index.html b/archives/2022/11/page/2/index.html index 8360e9764..846650d6a 100644 --- a/archives/2022/11/page/2/index.html +++ b/archives/2022/11/page/2/index.html @@ -1 +1 @@ -2022 年 / 11 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 / 11 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/12/index.html b/archives/2022/12/index.html index 7d4fc6145..5c710afaf 100644 --- a/archives/2022/12/index.html +++ b/archives/2022/12/index.html @@ -1 +1 @@ -2022 年 / 12 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 / 12 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/index.html b/archives/2022/index.html index af6cce90a..bdd1540e3 100644 --- a/archives/2022/index.html +++ b/archives/2022/index.html @@ -1 +1 @@ -2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/page/2/index.html b/archives/2022/page/2/index.html index 7a427dcd4..2f6d11705 100644 --- a/archives/2022/page/2/index.html +++ b/archives/2022/page/2/index.html @@ -1 +1 @@ -2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/page/3/index.html b/archives/2022/page/3/index.html index 78a6981cb..f596db57d 100644 --- a/archives/2022/page/3/index.html +++ b/archives/2022/page/3/index.html @@ -1 +1 @@ -2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2022/page/4/index.html b/archives/2022/page/4/index.html index 4795ddea8..36b465c56 100644 --- a/archives/2022/page/4/index.html +++ b/archives/2022/page/4/index.html @@ -1 +1 @@ -2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2022 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2023/01/index.html b/archives/2023/01/index.html index c93c37f56..6f6dd1ac3 100644 --- a/archives/2023/01/index.html +++ b/archives/2023/01/index.html @@ -1 +1 @@ -2023 年 / 01 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2023 年 / 01 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2023/02/index.html b/archives/2023/02/index.html index ebb002754..7ed3f8105 100644 --- a/archives/2023/02/index.html +++ b/archives/2023/02/index.html @@ -1 +1 @@ -2023 年 / 02 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2023 年 / 02 月 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/2023/index.html b/archives/2023/index.html index 819e1021c..c0c0faeb0 100644 --- a/archives/2023/index.html +++ b/archives/2023/index.html @@ -1 +1 @@ -2023 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +2023 年 - 归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/archives/index.html b/archives/index.html index a39e49a40..50a4a3de7 100644 --- a/archives/index.html +++ b/archives/index.html @@ -1 +1 @@ -归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

首页 / 目前共计 40 篇文章。 还行 继续努力。

2023 年/02 月 ( 1 )

2023 年/01 月 ( 3 )

2022 年/12 月 ( 2 )

2022 年/11 月 ( 12 )

2022 年/10 月 ( 13 )

2022 年/09 月 ( 9 )

\ No newline at end of file +归档 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

首页 / 目前共计 40 篇文章。 还行 继续努力。

2023 年/02 月 ( 1 )

2023 年/01 月 ( 3 )

2022 年/12 月 ( 2 )

2022 年/11 月 ( 12 )

2022 年/10 月 ( 13 )

2022 年/09 月 ( 9 )

\ No newline at end of file diff --git a/atom.xml b/atom.xml index 922d69100..def5b33a7 100644 --- a/atom.xml +++ b/atom.xml @@ -45,6 +45,10 @@ <p>修改左侧背景色<br /> <img data-src="https://pic.hitoli.com/images/2023/02/18/4875f8006144733c0e6710a2b04bc2be.jpg" alt="4875f8006144733c0e6710a2b04bc2be.jpg" /></p> </li> +<li> +<p>修改 UI 字体大小<br /> +<img data-src="https://pic.hitoli.com/images/2023/03/02/UI.png" alt="UI.png" /></p> +</li> </ol> @@ -67,8 +71,8 @@ - + 2023-01-31T01:44:00.000Z @@ -149,8 +153,8 @@ - + 2022-12-02T07:16:00.000Z diff --git a/categories/Linux/Shell/index.html b/categories/Linux/Shell/index.html index 4f0e459e7..3ce261c86 100644 --- a/categories/Linux/Shell/index.html +++ b/categories/Linux/Shell/index.html @@ -1 +1 @@ -分类:Shell | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Shell | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/Linux/index.html b/categories/Linux/index.html index 9d0d6b876..c282bfcc6 100644 --- a/categories/Linux/index.html +++ b/categories/Linux/index.html @@ -1 +1 @@ -分类:Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/Linux/page/2/index.html b/categories/Linux/page/2/index.html index cc83c8686..6f879e266 100644 --- a/categories/Linux/page/2/index.html +++ b/categories/Linux/page/2/index.html @@ -1 +1 @@ -分类:Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/Linux/服务/Nginx/index.html b/categories/Linux/服务/Nginx/index.html index 3ea823401..87027c6ff 100644 --- a/categories/Linux/服务/Nginx/index.html +++ b/categories/Linux/服务/Nginx/index.html @@ -1 +1 @@ -分类:Nginx | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Nginx | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/Linux/服务/index.html b/categories/Linux/服务/index.html index d5f228bd4..fc061c0ab 100644 --- a/categories/Linux/服务/index.html +++ b/categories/Linux/服务/index.html @@ -1 +1 @@ -分类:服务 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:服务 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/Windows/index.html b/categories/Windows/index.html index ea4ac9333..68e8eb457 100644 --- a/categories/Windows/index.html +++ b/categories/Windows/index.html @@ -1 +1 @@ -分类:Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Windows | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/Windows/工具/index.html b/categories/Windows/工具/index.html index 58334710e..4a75620c2 100644 --- a/categories/Windows/工具/index.html +++ b/categories/Windows/工具/index.html @@ -1 +1 @@ -分类:工具 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:工具 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/Windows/解决问题/index.html b/categories/Windows/解决问题/index.html index 2ff5bd741..0549b5d6b 100644 --- a/categories/Windows/解决问题/index.html +++ b/categories/Windows/解决问题/index.html @@ -1 +1 @@ -分类:解决问题 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:解决问题 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/index.html b/categories/index.html index 0cb74dd5b..271d201ed 100644 --- a/categories/index.html +++ b/categories/index.html @@ -1 +1 @@ -全部分类 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +全部分类 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/工作/index.html b/categories/工作/index.html index 811aa2fda..15f7bfa65 100644 --- a/categories/工作/index.html +++ b/categories/工作/index.html @@ -1 +1 @@ -分类:工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:工作 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/工作/解决问题/Highcharts/index.html b/categories/工作/解决问题/Highcharts/index.html index 8e721e638..2c0a69d9f 100644 --- a/categories/工作/解决问题/Highcharts/index.html +++ b/categories/工作/解决问题/Highcharts/index.html @@ -1 +1 @@ -分类:Highcharts | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Highcharts | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/工作/解决问题/IDE/index.html b/categories/工作/解决问题/IDE/index.html index 18d5ceb42..da9e680ea 100644 --- a/categories/工作/解决问题/IDE/index.html +++ b/categories/工作/解决问题/IDE/index.html @@ -1 +1 @@ -分类:IDE | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:IDE | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/工作/解决问题/KLineChart/index.html b/categories/工作/解决问题/KLineChart/index.html index a2dcd983d..0e15744cd 100644 --- a/categories/工作/解决问题/KLineChart/index.html +++ b/categories/工作/解决问题/KLineChart/index.html @@ -1 +1 @@ -分类:KLineChart | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:KLineChart | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/工作/解决问题/Vue/index.html b/categories/工作/解决问题/Vue/index.html index 776e299ce..f254fe0c7 100644 --- a/categories/工作/解决问题/Vue/index.html +++ b/categories/工作/解决问题/Vue/index.html @@ -1 +1 @@ -分类:Vue | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Vue | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/工作/解决问题/index.html b/categories/工作/解决问题/index.html index ff9d0498b..b57dae29f 100644 --- a/categories/工作/解决问题/index.html +++ b/categories/工作/解决问题/index.html @@ -1 +1 @@ -分类:解决问题 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:解决问题 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/极空间/Docker/Hexo/index.html b/categories/极空间/Docker/Hexo/index.html index 804dc16e7..a60e81fb4 100644 --- a/categories/极空间/Docker/Hexo/index.html +++ b/categories/极空间/Docker/Hexo/index.html @@ -1 +1 @@ -分类:Hexo | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Hexo | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/极空间/Docker/index.html b/categories/极空间/Docker/index.html index b9c5802aa..9f1e7929a 100644 --- a/categories/极空间/Docker/index.html +++ b/categories/极空间/Docker/index.html @@ -1 +1 @@ -分类:Docker | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:Docker | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/极空间/index.html b/categories/极空间/index.html index 903282adc..df76f2681 100644 --- a/categories/极空间/index.html +++ b/categories/极空间/index.html @@ -1 +1 @@ -分类:极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/生活/index.html b/categories/生活/index.html index 825ffa976..49e00226b 100644 --- a/categories/生活/index.html +++ b/categories/生活/index.html @@ -1 +1 @@ -分类:生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:生活 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/生活/心得体会/index.html b/categories/生活/心得体会/index.html index 353077c7a..cd4fe0944 100644 --- a/categories/生活/心得体会/index.html +++ b/categories/生活/心得体会/index.html @@ -1 +1 @@ -分类:心得体会 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:心得体会 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/categories/生活/心情/index.html b/categories/生活/心情/index.html index 0bfdc7485..1fb2d477d 100644 --- a/categories/生活/心情/index.html +++ b/categories/生活/心情/index.html @@ -1 +1 @@ -分类:心情 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +分类:心情 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/feed.json b/feed.json index 3c495fafd..45ca8172e 100644 --- a/feed.json +++ b/feed.json @@ -11,7 +11,7 @@ "url": "https://hitoli.com/2023/02/18/%E4%BF%AE%E6%94%B9IntellIJ-IDE%E8%83%8C%E6%99%AF%E8%89%B2%E5%92%8C%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F/", "title": "修改IntellIJ IDE背景色和字体大小", "date_published": "2023-02-18T09:42:00.000Z", - "content_html": "

# 引言

\n

网上搜索了几个修改 IDE 背景色和字体大小的方法,记录一下方便以后查看。

\n

# 操作截图

\n
    \n
  1. \n

    修改代码区颜色
    \n\"bb050e7e4c3b3ff2968b0a1be311d31f.png\"

    \n
  2. \n
  3. \n

    修改代码区字体大小
    \n\"af92e69249a74978f56a5b2f8bf792a8.png\"

    \n
  4. \n
  5. \n

    修改控制台背景色
    \n\"80dd5d82bfc6d0380ce34a590d8beeb4.png\"

    \n
  6. \n
  7. \n

    修改控制台字体大小
    \n\"86bd97d1937b77faa27d31db7c2abb91.png\"

    \n
  8. \n
  9. \n

    修改左侧背景色
    \n\"4875f8006144733c0e6710a2b04bc2be.jpg\"

    \n
  10. \n
\n", + "content_html": "

# 引言

\n

网上搜索了几个修改 IDE 背景色和字体大小的方法,记录一下方便以后查看。

\n

# 操作截图

\n
    \n
  1. \n

    修改代码区颜色
    \n\"bb050e7e4c3b3ff2968b0a1be311d31f.png\"

    \n
  2. \n
  3. \n

    修改代码区字体大小
    \n\"af92e69249a74978f56a5b2f8bf792a8.png\"

    \n
  4. \n
  5. \n

    修改控制台背景色
    \n\"80dd5d82bfc6d0380ce34a590d8beeb4.png\"

    \n
  6. \n
  7. \n

    修改控制台字体大小
    \n\"86bd97d1937b77faa27d31db7c2abb91.png\"

    \n
  8. \n
  9. \n

    修改左侧背景色
    \n\"4875f8006144733c0e6710a2b04bc2be.jpg\"

    \n
  10. \n
  11. \n

    修改 UI 字体大小
    \n\"UI.png\"

    \n
  12. \n
\n", "tags": [ "工作", "解决问题", @@ -31,8 +31,8 @@ "解决问题", "KLineChart", "KLineChart", - "K线", - "自定义指标" + "自定义指标", + "K线" ] }, { @@ -85,8 +85,8 @@ "解决问题", "KLineChart", "KLineChart", - "K线", - "自定义指标" + "自定义指标", + "K线" ] }, { diff --git a/index.html b/index.html index e8d778b88..50487f276 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

文章列表

83 1 分钟

# 引言 网上搜索了几个修改 IDE 背景色和字体大小的方法,记录一下方便以后查看。 # 操作截图 修改代码区颜色 修改代码区字体大小 修改控制台背景色 修改控制台字体大小 修改左侧背景色
5.8k 5 分钟

# 引言 使用指定数据方式得到的线条总是不能达到想要的效果,一是阶梯线在价格发生变化的点存在倾斜,二是高低价的线很难完美显示,所以只能自己动手画了。代码仅供参考,如有错误的地方请指正! # 模版代码 this.chart.addTechnicalIndicatorTemplate(&#123; name: 'BandHighLowInd', shortName: '波段高低价', calcParams: [&#123; value: 10 &#125;], precision: 2, plots: [ &#123; key:...
1.4k 1 分钟

# 引言 在开发前端页面时会存在相同的页面展示,只是菜单名称不同、数据类型不同的情况。如果再拷贝一个页面来展示后期就需要维护两个页面,同时也增加了工作量。但是只使用一个页面通过传参来改变数据就方便多了。 # 路由配置 &#123; path: '/test/:type/:menuIndex', name: 'Test', component: _import('xxx/Test.vue') &#125;# 菜单配置 &lt;template> &lt;el-menu...
6.5k 6 分钟

# 引言 项目中需要画一幅收益概览图,研究了一下 Highcharts 的用法。特此收录方便以后再次使用时查阅。 # 代码 //x 轴时间集合var chartXAxisDateTimes = ['2022-01-01 00:00:00', '2022-02-01 00:00:00', '2022-03-01 00:00:00', '2022-04-01 00:00:00', '2022-05-01 00:00:00']//y 轴数据集合var chartYAxisDatas = [ &#123;...
391 1 分钟

# 引言 最近重装了家里一台 mini 电脑,把系统升级成了最新的 win10 系统。但是使用起来却异常卡顿,查看任务管理器发现有个 wsappx 进程占用 cpu 严重。于是百度搜索得知它是微软商店的依赖进程,而我根本就用不上,所以直接禁用。 # 方法一 开始菜单点击 “开始 / 应用商店” 菜单项。 接着就会打开应用商店窗口,在窗口中点击个人头像的图标。 在弹出的菜单中点击 “设置” 菜单项。 在打开的应用商店设置窗口中,找到自动更新应用一项。 点击该项下面的开关,把该项下面的开关设置为关即可。 # 方法二 win 键 + r,输入 regedit 计算机...
4.4k 4 分钟

# 引言 本次任务是需要在一个指标图上通过点击标记画出此标记参与计算的数据范围、最高最低值、参考线等等,于是有了以下代码。代码仅供参考,如有错误的地方请指正! # 模版代码 // 箱体指标const boxDataScope = 300 // 箱体范围// 黄金线参数const goldenSectionA = 0.191const goldenSectionB = 0.382const goldenSectionC = 0.5const goldenSectionD = 0.618const goldenSectionE =...
978 1 分钟

# 介绍 Tengine 的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的 Web 平台。从 2011 年 12 月开始,Tengine 成为一个开源项目。现在,它由 Tengine 团队开发和维护。Tengine 团队的核心成员来自于淘宝、搜狗等互联网企业。 tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx...
1.6k 1 分钟

# 应用场景: 由于有时候 nginx 代理的时候,第三方域名对应的 ip 可能发生变化,然而没有提前通知,然而如果不配置什么,nginx 又不能智能解析,因此 nginx 动态解析域名就比较重要。 # 使用模块 nginx-upstream-dynamic-servers 该模块在启动 nginx 的时候会对域名进行一次解析,解析完成后,在 DNS 服务器设定的 TTL 过期时间内不会再次更新,在 TTL 过期后则会再次发起域名解析请求更新域名所对应的 IP 地址。 需要在 nginx 的配置文件中的 http 配置域内指定使用的 DNS 服务器,在 upstream 中需要进行域名解析的...
1k 1 分钟

# 引言 stream 模块一般用于 TCP/UDP 数据流的代理和负载均衡,可以通过 stream 模块代理转发 TCP 消息。我是用来转发 mysql、gitee 等连接的,有天 ip 发生了变动导致连接不上。前期试过配置 resolver 114.114.114.114 valid=60s; 来动态解析域名,结果 stream 模块不支持 set 函数,这就导致 ip 变动后必须手动重启或者 reload 一下 nginx 才能正常连接。后面经过搜索发现有人说用 Tengine 替代 nginx 可以实现就试了试,结果发现 Tengine 只能实现 http...
2.1k 2 分钟

# 引言 最近接到一个任务是通过 KLineChart✔️8.6.1 实现在一幅图上画两个合约的蜡烛图。研究 api 发现并没有通过配置实现的方法,于是联系作者沟通得知需要自己画图实现。于是有了本篇文章。 # 添加模版 let shortName = this.constant.periodTypeEnum.getNameByCode(this.klineType) + ' 合约2:' + this.currentInstrumentIdthis.chart.addTechnicalIndicatorTemplate(&#123; name:...
\ No newline at end of file +☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣

文章列表

91 1 分钟

# 引言 网上搜索了几个修改 IDE 背景色和字体大小的方法,记录一下方便以后查看。 # 操作截图 修改代码区颜色 修改代码区字体大小 修改控制台背景色 修改控制台字体大小 修改左侧背景色 修改 UI 字体大小
5.8k 5 分钟

# 引言 使用指定数据方式得到的线条总是不能达到想要的效果,一是阶梯线在价格发生变化的点存在倾斜,二是高低价的线很难完美显示,所以只能自己动手画了。代码仅供参考,如有错误的地方请指正! # 模版代码 this.chart.addTechnicalIndicatorTemplate(&#123; name: 'BandHighLowInd', shortName: '波段高低价', calcParams: [&#123; value: 10 &#125;], precision: 2, plots: [ &#123; key:...
1.4k 1 分钟

# 引言 在开发前端页面时会存在相同的页面展示,只是菜单名称不同、数据类型不同的情况。如果再拷贝一个页面来展示后期就需要维护两个页面,同时也增加了工作量。但是只使用一个页面通过传参来改变数据就方便多了。 # 路由配置 &#123; path: '/test/:type/:menuIndex', name: 'Test', component: _import('xxx/Test.vue') &#125;# 菜单配置 &lt;template> &lt;el-menu...
6.5k 6 分钟

# 引言 项目中需要画一幅收益概览图,研究了一下 Highcharts 的用法。特此收录方便以后再次使用时查阅。 # 代码 //x 轴时间集合var chartXAxisDateTimes = ['2022-01-01 00:00:00', '2022-02-01 00:00:00', '2022-03-01 00:00:00', '2022-04-01 00:00:00', '2022-05-01 00:00:00']//y 轴数据集合var chartYAxisDatas = [ &#123;...
391 1 分钟

# 引言 最近重装了家里一台 mini 电脑,把系统升级成了最新的 win10 系统。但是使用起来却异常卡顿,查看任务管理器发现有个 wsappx 进程占用 cpu 严重。于是百度搜索得知它是微软商店的依赖进程,而我根本就用不上,所以直接禁用。 # 方法一 开始菜单点击 “开始 / 应用商店” 菜单项。 接着就会打开应用商店窗口,在窗口中点击个人头像的图标。 在弹出的菜单中点击 “设置” 菜单项。 在打开的应用商店设置窗口中,找到自动更新应用一项。 点击该项下面的开关,把该项下面的开关设置为关即可。 # 方法二 win 键 + r,输入 regedit 计算机...
4.4k 4 分钟

# 引言 本次任务是需要在一个指标图上通过点击标记画出此标记参与计算的数据范围、最高最低值、参考线等等,于是有了以下代码。代码仅供参考,如有错误的地方请指正! # 模版代码 // 箱体指标const boxDataScope = 300 // 箱体范围// 黄金线参数const goldenSectionA = 0.191const goldenSectionB = 0.382const goldenSectionC = 0.5const goldenSectionD = 0.618const goldenSectionE =...
978 1 分钟

# 介绍 Tengine 的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的 Web 平台。从 2011 年 12 月开始,Tengine 成为一个开源项目。现在,它由 Tengine 团队开发和维护。Tengine 团队的核心成员来自于淘宝、搜狗等互联网企业。 tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx...
1.6k 1 分钟

# 应用场景: 由于有时候 nginx 代理的时候,第三方域名对应的 ip 可能发生变化,然而没有提前通知,然而如果不配置什么,nginx 又不能智能解析,因此 nginx 动态解析域名就比较重要。 # 使用模块 nginx-upstream-dynamic-servers 该模块在启动 nginx 的时候会对域名进行一次解析,解析完成后,在 DNS 服务器设定的 TTL 过期时间内不会再次更新,在 TTL 过期后则会再次发起域名解析请求更新域名所对应的 IP 地址。 需要在 nginx 的配置文件中的 http 配置域内指定使用的 DNS 服务器,在 upstream 中需要进行域名解析的...
1k 1 分钟

# 引言 stream 模块一般用于 TCP/UDP 数据流的代理和负载均衡,可以通过 stream 模块代理转发 TCP 消息。我是用来转发 mysql、gitee 等连接的,有天 ip 发生了变动导致连接不上。前期试过配置 resolver 114.114.114.114 valid=60s; 来动态解析域名,结果 stream 模块不支持 set 函数,这就导致 ip 变动后必须手动重启或者 reload 一下 nginx 才能正常连接。后面经过搜索发现有人说用 Tengine 替代 nginx 可以实现就试了试,结果发现 Tengine 只能实现 http...
2.1k 2 分钟

# 引言 最近接到一个任务是通过 KLineChart✔️8.6.1 实现在一幅图上画两个合约的蜡烛图。研究 api 发现并没有通过配置实现的方法,于是联系作者沟通得知需要自己画图实现。于是有了本篇文章。 # 添加模版 let shortName = this.constant.periodTypeEnum.getNameByCode(this.klineType) + ' 合约2:' + this.currentInstrumentIdthis.chart.addTechnicalIndicatorTemplate(&#123; name:...
\ No newline at end of file diff --git a/page/2/index.html b/page/2/index.html index d6c362605..30a38d467 100644 --- a/page/2/index.html +++ b/page/2/index.html @@ -1 +1 @@ -☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
534 1 分钟

# 问题描述 今天无意中发现原本能正常增加的 id 突然不变了,查看 sql 发现是取的对应表的自增 id。虽然存到表中的新数据自增 id 变化了,但返回的 id 总是不变。经过查询发现表的自增 id 是存在 information_schema 库中的 tables 表中。tables 表中存储了所有表的对应信息,其中有个 auto_increment 字段存储的就是对应表的下一个自增值。但是 mysql 在新版本中修改了此值的更新规则,老版本中是实时更新,新版本修改为 24 小时更新一次。为了不修改原代码中的逻辑,只能通过修改 mysql 配置使项目正常工作了。 #...
937 1 分钟

# 引言 很多朋友安装了 mysql 后不知道可以用工具管理,所以专门找了两个数据库管理工具方便大家使用。 # Navicat 下载 安装一路下一步即可 (注意:安装完成后先不要运行) 注册 1、运行注册机 2、修改 Your Name(可不改) 3、点击 Patch(此时会提示:navicat.exe - x64 -&gt; Cracked) 4、运行 navicat 5、点击第一个 Generate 获取注册码 (Your Name 上一行) 6、点击 Copy 然后粘贴到 navicat 窗口上(也可能会自动粘贴进去) 7、点击 navicat...
638 1 分钟

# 引言 今天在部署 vue 项目时发现生产环境的端口只有一个,而且被多个项目公用了,刚好此项目又没有配置服务名而是直接使用的根路径。没办法只有修改项目配置重新编译了! # 配置 在项目根目录添加两个文件。 .env.alpha NODE_ENV = 'production'VUE_APP_BASE_URL = '/'.env.prod NODE_ENV = 'production'VUE_APP_BASE_URL = '/projectName' 在 package.json...
6k 5 分钟

# 引言 所有配置方法和介绍均来至于网络搜索汇总,主要用于方便后期巩固学习。 # 何为反向代理 在介绍反向代理之前,先来了解一下正向代理。 正向代理:如果把局域网外的 Internet 想象成一个巨大的资源库,则局域网中的客户端要访问...
1.5k 1 分钟

# 描述 今天需要把一个 web 项目部署到 ubuntu 服务器上,结果直接使用 apt install nodejs 安装的 nodejs 版本过低,导致编译失败。最后通过查看官网文档获取到了 ubuntu 最新 nodejs 的安装命令。 # 过程 卸载旧的 nodejs(此命令会卸载掉相关依赖包) sudo apt autoremove --purge nodejs 安装 NodeJS curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &amp;&amp; sudo...
1k 1 分钟

# 区别: 2>/dev/null意思就是把错误输出到 “黑洞” >/dev/null 2>&amp;1默认情况是 1,也就是等同于 1&gt;/dev/null 2&gt;&amp;1。意思就是把标准输出重定向到 “黑洞”,还把错误输出 2 重定向到标准输出 1,也就是标准输出和错误输出都进了 “黑洞” 2>&amp;1 >/dev/null意思就是把错误输出 2 重定向到标准出书 1,也就是屏幕,标准输出进了 “黑洞”,也就是标准输出进了黑洞,错误输出打印到屏幕 # 解释: 文件描述符 Linux...
68 1 分钟

# 360 独立版小工具 360 全家桶众说纷纭但工具箱还是挺实用的,这波小工具可以单独下载使用,有需要的朋友赶紧下载吧! 下载地址 # 部分工具截图
115 1 分钟

# 介绍 当你经常需要在家远程到公司进行办公,或者开启了很多临时文件、文档、软件需要等到第二天继续之前的工作时,结果系统自行更新并重启了。是不是会让你非常郁闷。关闭系统自行更新就可以轻松解决此类问题。 # 下载 win10 / win11 / 本地
2.3k 2 分钟

# 介绍 ip 直连一般都映射了 5055, 但是直接访问 5055 极空间只提供了 http 协议,如果希望使用 https 协议则必须使用其它端口进行访问。以下方案采用 nginx 反向代理实现,端口使用 10000 举例。 # 配置 需要先把 10000 端口在路由器上做好映射。 证书生成好并放置到 nginx 上。(证书生成方法不做介绍请自行百度) http 跳转 https 配置 server &#123; if ($scheme = http) &#123; rewrite ^(.*)$ https://$host$1...
\ No newline at end of file +☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
534 1 分钟

# 问题描述 今天无意中发现原本能正常增加的 id 突然不变了,查看 sql 发现是取的对应表的自增 id。虽然存到表中的新数据自增 id 变化了,但返回的 id 总是不变。经过查询发现表的自增 id 是存在 information_schema 库中的 tables 表中。tables 表中存储了所有表的对应信息,其中有个 auto_increment 字段存储的就是对应表的下一个自增值。但是 mysql 在新版本中修改了此值的更新规则,老版本中是实时更新,新版本修改为 24 小时更新一次。为了不修改原代码中的逻辑,只能通过修改 mysql 配置使项目正常工作了。 #...
937 1 分钟

# 引言 很多朋友安装了 mysql 后不知道可以用工具管理,所以专门找了两个数据库管理工具方便大家使用。 # Navicat 下载 安装一路下一步即可 (注意:安装完成后先不要运行) 注册 1、运行注册机 2、修改 Your Name(可不改) 3、点击 Patch(此时会提示:navicat.exe - x64 -&gt; Cracked) 4、运行 navicat 5、点击第一个 Generate 获取注册码 (Your Name 上一行) 6、点击 Copy 然后粘贴到 navicat 窗口上(也可能会自动粘贴进去) 7、点击 navicat...
638 1 分钟

# 引言 今天在部署 vue 项目时发现生产环境的端口只有一个,而且被多个项目公用了,刚好此项目又没有配置服务名而是直接使用的根路径。没办法只有修改项目配置重新编译了! # 配置 在项目根目录添加两个文件。 .env.alpha NODE_ENV = 'production'VUE_APP_BASE_URL = '/'.env.prod NODE_ENV = 'production'VUE_APP_BASE_URL = '/projectName' 在 package.json...
6k 5 分钟

# 引言 所有配置方法和介绍均来至于网络搜索汇总,主要用于方便后期巩固学习。 # 何为反向代理 在介绍反向代理之前,先来了解一下正向代理。 正向代理:如果把局域网外的 Internet 想象成一个巨大的资源库,则局域网中的客户端要访问...
1.5k 1 分钟

# 描述 今天需要把一个 web 项目部署到 ubuntu 服务器上,结果直接使用 apt install nodejs 安装的 nodejs 版本过低,导致编译失败。最后通过查看官网文档获取到了 ubuntu 最新 nodejs 的安装命令。 # 过程 卸载旧的 nodejs(此命令会卸载掉相关依赖包) sudo apt autoremove --purge nodejs 安装 NodeJS curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &amp;&amp; sudo...
1k 1 分钟

# 区别: 2>/dev/null意思就是把错误输出到 “黑洞” >/dev/null 2>&amp;1默认情况是 1,也就是等同于 1&gt;/dev/null 2&gt;&amp;1。意思就是把标准输出重定向到 “黑洞”,还把错误输出 2 重定向到标准输出 1,也就是标准输出和错误输出都进了 “黑洞” 2>&amp;1 >/dev/null意思就是把错误输出 2 重定向到标准出书 1,也就是屏幕,标准输出进了 “黑洞”,也就是标准输出进了黑洞,错误输出打印到屏幕 # 解释: 文件描述符 Linux...
68 1 分钟

# 360 独立版小工具 360 全家桶众说纷纭但工具箱还是挺实用的,这波小工具可以单独下载使用,有需要的朋友赶紧下载吧! 下载地址 # 部分工具截图
115 1 分钟

# 介绍 当你经常需要在家远程到公司进行办公,或者开启了很多临时文件、文档、软件需要等到第二天继续之前的工作时,结果系统自行更新并重启了。是不是会让你非常郁闷。关闭系统自行更新就可以轻松解决此类问题。 # 下载 win10 / win11 / 本地
2.3k 2 分钟

# 介绍 ip 直连一般都映射了 5055, 但是直接访问 5055 极空间只提供了 http 协议,如果希望使用 https 协议则必须使用其它端口进行访问。以下方案采用 nginx 反向代理实现,端口使用 10000 举例。 # 配置 需要先把 10000 端口在路由器上做好映射。 证书生成好并放置到 nginx 上。(证书生成方法不做介绍请自行百度) http 跳转 https 配置 server &#123; if ($scheme = http) &#123; rewrite ^(.*)$ https://$host$1...
\ No newline at end of file diff --git a/page/3/index.html b/page/3/index.html index 75a72edf1..875e419c1 100644 --- a/page/3/index.html +++ b/page/3/index.html @@ -1 +1 @@ -☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
2.2k 2 分钟

# 介绍 青龙面板是一个支持 python3、javascript、shell、typescript 的定时任务管理面板。它支持在线管理脚本、环境变量、配置文件,支持在线查看日志及支持多种方式的消息通知。 # 安装 本文使用的是 whyour/qinglong 的镜像。 路径映射(由于青龙面板有 nodejs 环境,所以我把 hexo 博客的编译也放置在上面,再把 nginx 的 html 映射过来,这样就可以直接编译发布了。) #青龙面板装载路径/ql/data#博客装载路径(如果你不部署 hexo 博客可以不用配置)/root/.ssh #ssh 证书文件(如果你不用把 hexo...
929 1 分钟

valine 评论需要 LeanCloud 支持 # LeanCloud 注册 到 LeanCloud 网站完成注册。 创建应用。 名称随便取,方案看自己选择。开发版免费但是有限制,商业版收费无限制。 点击配置按钮进行配置。 点击设置 - 应用凭证可获取 App ID 和 App Key 点击设置 - 安全中心根据自己的需求配置 # 修改 Theme.Shoka 配置 valine: appId: 粘贴5中获取的App ID #Your_appId appKey: 粘贴5中获取的App Key #Your_appkey placeholder: ヽ(○´∀`)ノ♪欢迎畅所欲言 #...
535 1 分钟

# 介绍 mariadb 属于 mysql 的一个分支,完全兼容 mysql,使用方式和 mysql 无区别。 # 安装 本文介绍安装的镜像为 linuxserver_mariadb 的 10.5.13-r0-ls45,原则上使用最新版即可 配置文件映射 端口 环境(MYSQL_ROOT_PASSWORD 为数据库 root 用户密码) 到此已经可以在内网使用了,连接方法同 mysql 一样 按本文设置内网连接信息为: ip:极空间内网 ip 端口:3306 用户名:root 密码:MYSQL_ROOT_PASSWORD 对应的值 # 配置 配置 nginx...
1.2k 1 分钟

# 安装 下载最新版 wordpress 镜像,如极空间无法下载,可到 passerma 网站下载。 需要先在 mysql 中创建给 wordpress 使用的库。 文件路径映射(目前极空间不能映射到高速盘,否则无法启动)。 端口映射。 通过映射的端口访问安装界面(一定要通过最终访问的页面进行安装,否则修改配置比较麻烦。如最终是域名访问,就先把域名解析代理等先配置好,再通过域名访问安装)。 # 配置 如需使用 https 访问,需要在 wp-config.php 中加入以下代码,否则资源文件无法访问。 if((!empty(...
101 1 分钟

一年一次的总结时间又到了,这一年前半年平平无奇,后半年惊涛骇浪。中年危机如期而遇,人身的低谷终究还是来了。很沮丧也很无助,但还是要坚强面对。人生起起伏伏,时好时坏,终归还是会好起来的。加油!加油!加油 !
6.7k 6 分钟

# 监控端服务安装与配置 nagios 需要安装主程序 core 和 nrpe(nagios 和各被监控主机都必须安装)。如需使用自研前端可通过安装 ndoutils (用于把 nagios 监控信息写入数据库) 和 mysql 实现。具体安装见官网 nagios 默认监控命令脚本放置在 libexec 中,自定义脚本也放到此处 etc/objects/commands.cfg 用于保存 nagios 默认监控命令 etc/nrpe.cfg 文件中需要添加用于被监控执行命令项(各被监控主机中都需要添加) etc/objects/hosts...
3.1k 3 分钟

# 主服务 基础配置 port 6379requirepass 123456(密码,建议不设置)vm-enabled no (虚拟内存,内存够的情况下可以不使用)maxmemory 1GB(告诉Redis当使用了多少物理内存后就开始拒绝后续的写入)bind 127.0.0.1 (注释掉,否则不能外部连接)rdbchecksum no(持久化数据检查)list-max-ziplist-size 1024(ziplist的最大容量,正数为自己指定的大小。负数-1到-5为对应的值4到64Kb)list-compress-depth...
356 1 分钟

# 使用场景   在 A 域名的页面向 B 域名提交数据时需要代入 B 域名的 cookie,否则 B 域名会跳转到登陆页面。解决方式需要使用到 nginx 反向代理,配置如下: server &#123; listen port ssl http2; server_name xxx.com; ssl_certificate_key /xxx.key; ssl_certificate /xxx.pem; proxy_cookie_path ~(.*) "$1; SameSite=None; secure; httponly"; location /...
111 1 分钟

# 简介 PicGo 是一款开源的图床管理工具,十分流行。 PicGo 官方指南:PicGo | PicGo # 配置 安装插件(需要先安装 NodeJS) 图床配置   url 后缀必须用红线圈中的部分,key 在 chevereto 登陆后 api 配置中查找
709 1 分钟

# 前期准备   首先安装好 svn 和 git 工具。 # svn 转 git 1、 到 svn 项目目录右键选中 gitbash 打开窗口,执行获取用户并映射成 git 样式账号命令如下: svn log -q | awk -F '|' '/^r/ &#123;sub(&quot;^ &quot;, &quot;&quot;, $2); sub(&quot; $&quot;, &quot;&quot;, $2); print $2&quot; =...
\ No newline at end of file +☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
2.2k 2 分钟

# 介绍 青龙面板是一个支持 python3、javascript、shell、typescript 的定时任务管理面板。它支持在线管理脚本、环境变量、配置文件,支持在线查看日志及支持多种方式的消息通知。 # 安装 本文使用的是 whyour/qinglong 的镜像。 路径映射(由于青龙面板有 nodejs 环境,所以我把 hexo 博客的编译也放置在上面,再把 nginx 的 html 映射过来,这样就可以直接编译发布了。) #青龙面板装载路径/ql/data#博客装载路径(如果你不部署 hexo 博客可以不用配置)/root/.ssh #ssh 证书文件(如果你不用把 hexo...
929 1 分钟

valine 评论需要 LeanCloud 支持 # LeanCloud 注册 到 LeanCloud 网站完成注册。 创建应用。 名称随便取,方案看自己选择。开发版免费但是有限制,商业版收费无限制。 点击配置按钮进行配置。 点击设置 - 应用凭证可获取 App ID 和 App Key 点击设置 - 安全中心根据自己的需求配置 # 修改 Theme.Shoka 配置 valine: appId: 粘贴5中获取的App ID #Your_appId appKey: 粘贴5中获取的App Key #Your_appkey placeholder: ヽ(○´∀`)ノ♪欢迎畅所欲言 #...
535 1 分钟

# 介绍 mariadb 属于 mysql 的一个分支,完全兼容 mysql,使用方式和 mysql 无区别。 # 安装 本文介绍安装的镜像为 linuxserver_mariadb 的 10.5.13-r0-ls45,原则上使用最新版即可 配置文件映射 端口 环境(MYSQL_ROOT_PASSWORD 为数据库 root 用户密码) 到此已经可以在内网使用了,连接方法同 mysql 一样 按本文设置内网连接信息为: ip:极空间内网 ip 端口:3306 用户名:root 密码:MYSQL_ROOT_PASSWORD 对应的值 # 配置 配置 nginx...
1.2k 1 分钟

# 安装 下载最新版 wordpress 镜像,如极空间无法下载,可到 passerma 网站下载。 需要先在 mysql 中创建给 wordpress 使用的库。 文件路径映射(目前极空间不能映射到高速盘,否则无法启动)。 端口映射。 通过映射的端口访问安装界面(一定要通过最终访问的页面进行安装,否则修改配置比较麻烦。如最终是域名访问,就先把域名解析代理等先配置好,再通过域名访问安装)。 # 配置 如需使用 https 访问,需要在 wp-config.php 中加入以下代码,否则资源文件无法访问。 if((!empty(...
101 1 分钟

一年一次的总结时间又到了,这一年前半年平平无奇,后半年惊涛骇浪。中年危机如期而遇,人身的低谷终究还是来了。很沮丧也很无助,但还是要坚强面对。人生起起伏伏,时好时坏,终归还是会好起来的。加油!加油!加油 !
6.7k 6 分钟

# 监控端服务安装与配置 nagios 需要安装主程序 core 和 nrpe(nagios 和各被监控主机都必须安装)。如需使用自研前端可通过安装 ndoutils (用于把 nagios 监控信息写入数据库) 和 mysql 实现。具体安装见官网 nagios 默认监控命令脚本放置在 libexec 中,自定义脚本也放到此处 etc/objects/commands.cfg 用于保存 nagios 默认监控命令 etc/nrpe.cfg 文件中需要添加用于被监控执行命令项(各被监控主机中都需要添加) etc/objects/hosts...
3.1k 3 分钟

# 主服务 基础配置 port 6379requirepass 123456(密码,建议不设置)vm-enabled no (虚拟内存,内存够的情况下可以不使用)maxmemory 1GB(告诉Redis当使用了多少物理内存后就开始拒绝后续的写入)bind 127.0.0.1 (注释掉,否则不能外部连接)rdbchecksum no(持久化数据检查)list-max-ziplist-size 1024(ziplist的最大容量,正数为自己指定的大小。负数-1到-5为对应的值4到64Kb)list-compress-depth...
356 1 分钟

# 使用场景   在 A 域名的页面向 B 域名提交数据时需要代入 B 域名的 cookie,否则 B 域名会跳转到登陆页面。解决方式需要使用到 nginx 反向代理,配置如下: server &#123; listen port ssl http2; server_name xxx.com; ssl_certificate_key /xxx.key; ssl_certificate /xxx.pem; proxy_cookie_path ~(.*) "$1; SameSite=None; secure; httponly"; location /...
111 1 分钟

# 简介 PicGo 是一款开源的图床管理工具,十分流行。 PicGo 官方指南:PicGo | PicGo # 配置 安装插件(需要先安装 NodeJS) 图床配置   url 后缀必须用红线圈中的部分,key 在 chevereto 登陆后 api 配置中查找
709 1 分钟

# 前期准备   首先安装好 svn 和 git 工具。 # svn 转 git 1、 到 svn 项目目录右键选中 gitbash 打开窗口,执行获取用户并映射成 git 样式账号命令如下: svn log -q | awk -F '|' '/^r/ &#123;sub(&quot;^ &quot;, &quot;&quot;, $2); sub(&quot; $&quot;, &quot;&quot;, $2); print $2&quot; =...
\ No newline at end of file diff --git a/page/4/index.html b/page/4/index.html index c5e19b946..f9cf51a28 100644 --- a/page/4/index.html +++ b/page/4/index.html @@ -1 +1 @@ -☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
1.6k 1 分钟

# X-Frame-Options 响应头配置详解   X-Frame-Options HTTP 响应头是用来给浏览器指示允许一个页面可否在,或者 中展现的标记。网站可以使用此功能,来确保自己网站的内容没有被嵌套到别人的网站中去,也从而避免了点击劫持 (clickjacking) 的攻击。 X-Frame-Options 三个参数: 1、 DENY   表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。 2、SAMEORIGIN   表示该页面可以在相同域名页面的 frame 中展示。 3、ALLOW-FROM uri   表示该页面可以在指定来源的 frame...
1.1k 1 分钟

# nginx 负载均衡配置 轮询(默认)   每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器 down 掉,能自动剔除。 upstream my_server &#123; server 192.168.0.2:8080; server 192.168.0.3:8080;&#125;server &#123; listen 80; server_name 192.168.0.1; # Path to the root of your installation location / &#123; proxy_pass...
18k 17 分钟

# 问题描述 今天突然发现博客的音乐无法播放了,经过一顿查找,发现是因为 https://api.i-meto.com/meting/api 获取的音乐地址出现了问题,估计是被网易云给封禁了。shoka 主题应该是通过这个网站提取音乐地址、图片等信息。通过断点发现网易播放列表还是能正常获取的,只是列表中的具体音乐、图片出现了问题。因为 meto 是把音乐的 url 指向自己的服务地址,然后通过参数获取的最终音乐,所以我通过参数拼凑出最终的网易云音乐地址,自此问题基本解决。只针对网易播放列表,图片只能使用一张固定的(因为图片的具体规律不知道 O (∩_∩) O~)。 # 解决方法 到...
258 1 分钟

今天突然发现自己的网站不能访问了。经过一顿排查,发现是家里的外网 ip 变动后 nginx 解析的域名 ip 还是旧 ip 导致的。手动重启 nginx 后恢复正常。但这不是长久之计,如果每次 ip 变动都需要重启一次 nginx,想想都头大。于是查询资料后获得了解决办法,方法如下: location / &#123; resolver 114.114.114.114 valid=60s; #自定义缓存有效时间间隔对变量中的域名进行解析 set $my_server "https://ip:port"; proxy_pass...
179 1 分钟

# 下载工具 protoc-3.19.5-win64.zip # 生成 js 文件 把 xxx.proto 文件拷贝到解压的 protoc-3.19.5-win64\bin 目录下 cmd 到相同的 bin 目录下 执行 protoc.exe --js_out=import_style=commonjs,binary:. ./xxx.proto 命令,就会在 bin 目录下生成 xxx_pb.js 文件
508 1 分钟

今天前端开发跟我反馈用 vue 的 socketio 连接不上后台服务,连接无反应无任何报错。所以不清楚是前端代码问题还是后台服务的问题。由于框架为另一同事搭建,我只负责处理后端业务逻辑部分,所以第一时间我也不清楚具体的原因。于是我找了个第三方的 socket 工具尝试连接,果然有问题。但是只是提示连接不上,无明显错误原因。到后台查看发现有提示 Unknown transport for request 错误,最后通过调试发现 netty-socketio 的库中 AuthorizeHandler 类有段处理 transport 的代码只能接受大写的 WEBSOCKET 或者...
588 1 分钟

# Hexo + Theme.Shoka 安装   安装介绍 # algolia 注册 algolia 不支持国内邮箱注册,而 google 和 github 由于国内被墙也没法使用。所以只能先注册 netlify 然后通过 netlify 注册 algolia。 登录 algolia 后创建一个 index,名字随意记住既可。 点击右上角红点,弹出窗口点 settings 按钮。 点击 API KEYS,获取 appId 和 adminApiKey 填入 hexo 的_config.yml 中 apiKey 暂时不填。 algolia: appId: #Your appId...
608 1 分钟

# 安装准备 需要先安装好 mysql 数据库 选择版本,1.5 版以前支持中文,之后被维护的团队删除只支持英文 本文介绍使用的是 linuxserver_chevereto 的镜像 需要预先创建好给 chevereto 使用的库、账户、密码 经过测试,使用 surenkid_chevereto 的镜像可以完美支持多国语言,配置同 linuxserver_chevereto 一样 # 容器配置 映射路径(不要放在高速盘,否则会有权限问题) 端口 环境(puid 和 pgid 使用 1000,不要使用 0,否则会报错) # 初始化配置 使用 http:// 极空间...
1.5k 1 分钟

# hexo 博客安装 安装 nodejs 安装 git 安装 hexo(windows 需进入 git bash) npm install -g hexo-cli 初始化博客目录 hexo init blog 进入博客目录 cd blog 初始化 hexo 到博客目录 npm install # shoka 主题安装 下载主题 git clone https://github.com/amehime/hexo-theme-shoka.git ./themes/shoka 卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器 npm un...
\ No newline at end of file +☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
1.6k 1 分钟

# X-Frame-Options 响应头配置详解   X-Frame-Options HTTP 响应头是用来给浏览器指示允许一个页面可否在,或者 中展现的标记。网站可以使用此功能,来确保自己网站的内容没有被嵌套到别人的网站中去,也从而避免了点击劫持 (clickjacking) 的攻击。 X-Frame-Options 三个参数: 1、 DENY   表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。 2、SAMEORIGIN   表示该页面可以在相同域名页面的 frame 中展示。 3、ALLOW-FROM uri   表示该页面可以在指定来源的 frame...
1.1k 1 分钟

# nginx 负载均衡配置 轮询(默认)   每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器 down 掉,能自动剔除。 upstream my_server &#123; server 192.168.0.2:8080; server 192.168.0.3:8080;&#125;server &#123; listen 80; server_name 192.168.0.1; # Path to the root of your installation location / &#123; proxy_pass...
18k 17 分钟

# 问题描述 今天突然发现博客的音乐无法播放了,经过一顿查找,发现是因为 https://api.i-meto.com/meting/api 获取的音乐地址出现了问题,估计是被网易云给封禁了。shoka 主题应该是通过这个网站提取音乐地址、图片等信息。通过断点发现网易播放列表还是能正常获取的,只是列表中的具体音乐、图片出现了问题。因为 meto 是把音乐的 url 指向自己的服务地址,然后通过参数获取的最终音乐,所以我通过参数拼凑出最终的网易云音乐地址,自此问题基本解决。只针对网易播放列表,图片只能使用一张固定的(因为图片的具体规律不知道 O (∩_∩) O~)。 # 解决方法 到...
258 1 分钟

今天突然发现自己的网站不能访问了。经过一顿排查,发现是家里的外网 ip 变动后 nginx 解析的域名 ip 还是旧 ip 导致的。手动重启 nginx 后恢复正常。但这不是长久之计,如果每次 ip 变动都需要重启一次 nginx,想想都头大。于是查询资料后获得了解决办法,方法如下: location / &#123; resolver 114.114.114.114 valid=60s; #自定义缓存有效时间间隔对变量中的域名进行解析 set $my_server "https://ip:port"; proxy_pass...
179 1 分钟

# 下载工具 protoc-3.19.5-win64.zip # 生成 js 文件 把 xxx.proto 文件拷贝到解压的 protoc-3.19.5-win64\bin 目录下 cmd 到相同的 bin 目录下 执行 protoc.exe --js_out=import_style=commonjs,binary:. ./xxx.proto 命令,就会在 bin 目录下生成 xxx_pb.js 文件
508 1 分钟

今天前端开发跟我反馈用 vue 的 socketio 连接不上后台服务,连接无反应无任何报错。所以不清楚是前端代码问题还是后台服务的问题。由于框架为另一同事搭建,我只负责处理后端业务逻辑部分,所以第一时间我也不清楚具体的原因。于是我找了个第三方的 socket 工具尝试连接,果然有问题。但是只是提示连接不上,无明显错误原因。到后台查看发现有提示 Unknown transport for request 错误,最后通过调试发现 netty-socketio 的库中 AuthorizeHandler 类有段处理 transport 的代码只能接受大写的 WEBSOCKET 或者...
588 1 分钟

# Hexo + Theme.Shoka 安装   安装介绍 # algolia 注册 algolia 不支持国内邮箱注册,而 google 和 github 由于国内被墙也没法使用。所以只能先注册 netlify 然后通过 netlify 注册 algolia。 登录 algolia 后创建一个 index,名字随意记住既可。 点击右上角红点,弹出窗口点 settings 按钮。 点击 API KEYS,获取 appId 和 adminApiKey 填入 hexo 的_config.yml 中 apiKey 暂时不填。 algolia: appId: #Your appId...
608 1 分钟

# 安装准备 需要先安装好 mysql 数据库 选择版本,1.5 版以前支持中文,之后被维护的团队删除只支持英文 本文介绍使用的是 linuxserver_chevereto 的镜像 需要预先创建好给 chevereto 使用的库、账户、密码 经过测试,使用 surenkid_chevereto 的镜像可以完美支持多国语言,配置同 linuxserver_chevereto 一样 # 容器配置 映射路径(不要放在高速盘,否则会有权限问题) 端口 环境(puid 和 pgid 使用 1000,不要使用 0,否则会报错) # 初始化配置 使用 http:// 极空间...
1.5k 1 分钟

# hexo 博客安装 安装 nodejs 安装 git 安装 hexo(windows 需进入 git bash) npm install -g hexo-cli 初始化博客目录 hexo init blog 进入博客目录 cd blog 初始化 hexo 到博客目录 npm install # shoka 主题安装 下载主题 git clone https://github.com/amehime/hexo-theme-shoka.git ./themes/shoka 卸载 hexo-renderer-marked 以及别的 markdown 文件渲染器 npm un...
\ No newline at end of file diff --git a/rss.xml b/rss.xml index 161abb21b..1212362de 100644 --- a/rss.xml +++ b/rss.xml @@ -54,6 +54,10 @@ <p>修改左侧背景色<br /> <img data-src="https://pic.hitoli.com/images/2023/02/18/4875f8006144733c0e6710a2b04bc2be.jpg" alt="4875f8006144733c0e6710a2b04bc2be.jpg" /></p> </li> +<li> +<p>修改 UI 字体大小<br /> +<img data-src="https://pic.hitoli.com/images/2023/03/02/UI.png" alt="UI.png" /></p> +</li> </ol> ]]> @@ -65,8 +69,8 @@ - + Tue, 31 Jan 2023 09:44:00 +0800 - + Fri, 02 Dec 2022 15:16:00 +0800 标签:2>&1 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:2>&1 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/360小工具/index.html b/tags/360小工具/index.html index cd7d3ccdc..68343a34e 100644 --- a/tags/360小工具/index.html +++ b/tags/360小工具/index.html @@ -1 +1 @@ -标签:360小工具 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:360小工具 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Hexo-admin/index.html b/tags/Hexo-admin/index.html index 0e8987580..231a89823 100644 --- a/tags/Hexo-admin/index.html +++ b/tags/Hexo-admin/index.html @@ -1 +1 @@ -标签:Hexo-admin | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Hexo-admin | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Hexo/index.html b/tags/Hexo/index.html index 5e63e9874..d1699d01d 100644 --- a/tags/Hexo/index.html +++ b/tags/Hexo/index.html @@ -1 +1 @@ -标签:Hexo | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Hexo | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Highcharts/index.html b/tags/Highcharts/index.html index 6f24cad4f..7d53cce34 100644 --- a/tags/Highcharts/index.html +++ b/tags/Highcharts/index.html @@ -1 +1 @@ -标签:Highcharts | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Highcharts | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/IDE/index.html b/tags/IDE/index.html index 6d4887849..6a0756c75 100644 --- a/tags/IDE/index.html +++ b/tags/IDE/index.html @@ -1 +1 @@ -标签:IDE | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:IDE | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/KLineChart/index.html b/tags/KLineChart/index.html index 974f6db8f..ae8a4bf97 100644 --- a/tags/KLineChart/index.html +++ b/tags/KLineChart/index.html @@ -1 +1 @@ -标签:KLineChart | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:KLineChart | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/K线/index.html b/tags/K线/index.html index 237d25657..2e66c244b 100644 --- a/tags/K线/index.html +++ b/tags/K线/index.html @@ -1 +1 @@ -标签:K线 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:K线 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/NodeJS/index.html b/tags/NodeJS/index.html index 2dfba383a..21d4d3371 100644 --- a/tags/NodeJS/index.html +++ b/tags/NodeJS/index.html @@ -1 +1 @@ -标签:NodeJS | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:NodeJS | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/PicGo/index.html b/tags/PicGo/index.html index 4f9331eff..524b8e2ba 100644 --- a/tags/PicGo/index.html +++ b/tags/PicGo/index.html @@ -1 +1 @@ -标签:PicGo | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:PicGo | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Shell/index.html b/tags/Shell/index.html index 47268197d..950c49570 100644 --- a/tags/Shell/index.html +++ b/tags/Shell/index.html @@ -1 +1 @@ -标签:Shell | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Shell | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Shoka/index.html b/tags/Shoka/index.html index ed3408b8e..71de0877d 100644 --- a/tags/Shoka/index.html +++ b/tags/Shoka/index.html @@ -1 +1 @@ -标签:Shoka | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Shoka | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Tengine/index.html b/tags/Tengine/index.html index c90b08ad4..19a5c28d2 100644 --- a/tags/Tengine/index.html +++ b/tags/Tengine/index.html @@ -1 +1 @@ -标签:Tengine | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Tengine | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Valine/index.html b/tags/Valine/index.html index c0115722f..90c01f20d 100644 --- a/tags/Valine/index.html +++ b/tags/Valine/index.html @@ -1 +1 @@ -标签:Valine | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Valine | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Windows10/index.html b/tags/Windows10/index.html index e7d1e7a91..109ab3bc7 100644 --- a/tags/Windows10/index.html +++ b/tags/Windows10/index.html @@ -1 +1 @@ -标签:Windows10 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Windows10 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Windows11/index.html b/tags/Windows11/index.html index 762d530a8..6b152a81a 100644 --- a/tags/Windows11/index.html +++ b/tags/Windows11/index.html @@ -1 +1 @@ -标签:Windows11 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Windows11 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/Wordpress/index.html b/tags/Wordpress/index.html index bf9c0670c..503d14df2 100644 --- a/tags/Wordpress/index.html +++ b/tags/Wordpress/index.html @@ -1 +1 @@ -标签:Wordpress | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:Wordpress | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/algolia/index.html b/tags/algolia/index.html index b0eedd6b0..72a0e3c9f 100644 --- a/tags/algolia/index.html +++ b/tags/algolia/index.html @@ -1 +1 @@ -标签:algolia | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:algolia | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/chevereto/index.html b/tags/chevereto/index.html index 8a5d118d3..25ebce778 100644 --- a/tags/chevereto/index.html +++ b/tags/chevereto/index.html @@ -1 +1 @@ -标签:chevereto | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:chevereto | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/cookie/index.html b/tags/cookie/index.html index dd11111fd..30dde2428 100644 --- a/tags/cookie/index.html +++ b/tags/cookie/index.html @@ -1 +1 @@ -标签:cookie | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:cookie | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/docker/index.html b/tags/docker/index.html index bfc2b7028..b2776daff 100644 --- a/tags/docker/index.html +++ b/tags/docker/index.html @@ -1 +1 @@ -标签:docker | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:docker | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/git/index.html b/tags/git/index.html index fc1aa9c34..4a02f2729 100644 --- a/tags/git/index.html +++ b/tags/git/index.html @@ -1 +1 @@ -标签:git | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:git | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/https/index.html b/tags/https/index.html index 7ca577544..2fff1b3ba 100644 --- a/tags/https/index.html +++ b/tags/https/index.html @@ -1 +1 @@ -标签:https | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:https | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/iframe/index.html b/tags/iframe/index.html index ed890b288..aa5163b89 100644 --- a/tags/iframe/index.html +++ b/tags/iframe/index.html @@ -1 +1 @@ -标签:iframe | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:iframe | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/index.html b/tags/index.html index 97fefa5a0..ad82b62b1 100644 --- a/tags/index.html +++ b/tags/index.html @@ -1 +1 @@ -全部标签 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +全部标签 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/intellIJ/index.html b/tags/intellIJ/index.html index 3698b2c5d..057b2121e 100644 --- a/tags/intellIJ/index.html +++ b/tags/intellIJ/index.html @@ -1 +1 @@ -标签:intellIJ | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:intellIJ | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/js/index.html b/tags/js/index.html index 4e17c421b..d958756f4 100644 --- a/tags/js/index.html +++ b/tags/js/index.html @@ -1 +1 @@ -标签:js | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:js | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/mariadb/index.html b/tags/mariadb/index.html index cce6cd42f..af3bf7b7f 100644 --- a/tags/mariadb/index.html +++ b/tags/mariadb/index.html @@ -1 +1 @@ -标签:mariadb | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:mariadb | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/mysql/index.html b/tags/mysql/index.html index 71cb4551f..7c0adb73b 100644 --- a/tags/mysql/index.html +++ b/tags/mysql/index.html @@ -1 +1 @@ -标签:mysql | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:mysql | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/nagios/index.html b/tags/nagios/index.html index 57d8eb7bb..d1a1c8efe 100644 --- a/tags/nagios/index.html +++ b/tags/nagios/index.html @@ -1 +1 @@ -标签:nagios | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:nagios | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/netty/index.html b/tags/netty/index.html index 26568cd43..62e8bc67c 100644 --- a/tags/netty/index.html +++ b/tags/netty/index.html @@ -1 +1 @@ -标签:netty | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:netty | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/nginx/index.html b/tags/nginx/index.html index 38ea33631..34903671e 100644 --- a/tags/nginx/index.html +++ b/tags/nginx/index.html @@ -1 +1 @@ -标签:nginx | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:nginx | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/protobuf/index.html b/tags/protobuf/index.html index b5757e492..aab50971f 100644 --- a/tags/protobuf/index.html +++ b/tags/protobuf/index.html @@ -1 +1 @@ -标签:protobuf | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:protobuf | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/redis/index.html b/tags/redis/index.html index 9c300f7df..fa60544b6 100644 --- a/tags/redis/index.html +++ b/tags/redis/index.html @@ -1 +1 @@ -标签:redis | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:redis | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/socketIO/index.html b/tags/socketIO/index.html index 675cb97f0..3c0d68d8c 100644 --- a/tags/socketIO/index.html +++ b/tags/socketIO/index.html @@ -1 +1 @@ -标签:socketIO | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:socketIO | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/stream/index.html b/tags/stream/index.html index 9906800b4..a7481fa71 100644 --- a/tags/stream/index.html +++ b/tags/stream/index.html @@ -1 +1 @@ -标签:stream | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:stream | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/svn/index.html b/tags/svn/index.html index 850b6c818..caac4d13c 100644 --- a/tags/svn/index.html +++ b/tags/svn/index.html @@ -1 +1 @@ -标签:svn | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:svn | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/vue/index.html b/tags/vue/index.html index 4f6ff8034..a4c1ace93 100644 --- a/tags/vue/index.html +++ b/tags/vue/index.html @@ -1 +1 @@ -标签:vue | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:vue | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/web/index.html b/tags/web/index.html index 50ada5599..87d22b526 100644 --- a/tags/web/index.html +++ b/tags/web/index.html @@ -1 +1 @@ -标签:web | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:web | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/win10/index.html b/tags/win10/index.html index 2a604aad9..877d503d2 100644 --- a/tags/win10/index.html +++ b/tags/win10/index.html @@ -1 +1 @@ -标签:win10 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:win10 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/wsappx/index.html b/tags/wsappx/index.html index c0f0d2cd4..710da3e92 100644 --- a/tags/wsappx/index.html +++ b/tags/wsappx/index.html @@ -1 +1 @@ -标签:wsappx | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:wsappx | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/yarn/index.html b/tags/yarn/index.html index 81df23b56..190f445aa 100644 --- a/tags/yarn/index.html +++ b/tags/yarn/index.html @@ -1 +1 @@ -标签:yarn | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:yarn | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/动态域名解析/index.html b/tags/动态域名解析/index.html index 5c86f1943..05860009c 100644 --- a/tags/动态域名解析/index.html +++ b/tags/动态域名解析/index.html @@ -1 +1 @@ -标签:动态域名解析 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:动态域名解析 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/博客/index.html b/tags/博客/index.html index a76252f63..ae351a978 100644 --- a/tags/博客/index.html +++ b/tags/博客/index.html @@ -1 +1 @@ -标签:博客 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:博客 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/反向代理/index.html b/tags/反向代理/index.html index 282909be1..7f0202ee0 100644 --- a/tags/反向代理/index.html +++ b/tags/反向代理/index.html @@ -1 +1 @@ -标签:反向代理 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:反向代理 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/图床/index.html b/tags/图床/index.html index ff72a2c9a..4ad1792f8 100644 --- a/tags/图床/index.html +++ b/tags/图床/index.html @@ -1 +1 @@ -标签:图床 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:图床 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/图片上传/index.html b/tags/图片上传/index.html index 4ec64a030..e30da93ed 100644 --- a/tags/图片上传/index.html +++ b/tags/图片上传/index.html @@ -1 +1 @@ -标签:图片上传 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:图片上传 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/定时任务/index.html b/tags/定时任务/index.html index e8623d744..d70cce9a0 100644 --- a/tags/定时任务/index.html +++ b/tags/定时任务/index.html @@ -1 +1 @@ -标签:定时任务 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:定时任务 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/心情/index.html b/tags/心情/index.html index 17f31a8b8..36b8cac71 100644 --- a/tags/心情/index.html +++ b/tags/心情/index.html @@ -1 +1 @@ -标签:心情 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:心情 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/搜索/index.html b/tags/搜索/index.html index 33fcd2247..47d51146f 100644 --- a/tags/搜索/index.html +++ b/tags/搜索/index.html @@ -1 +1 @@ -标签:搜索 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:搜索 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/数据库工具/index.html b/tags/数据库工具/index.html index 8f3e7d3c7..3595deb31 100644 --- a/tags/数据库工具/index.html +++ b/tags/数据库工具/index.html @@ -1 +1 @@ -标签:数据库工具 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:数据库工具 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/服务监控/index.html b/tags/服务监控/index.html index 6407cc059..9a25591c6 100644 --- a/tags/服务监控/index.html +++ b/tags/服务监控/index.html @@ -1 +1 @@ -标签:服务监控 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:服务监控 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/极空间/index.html b/tags/极空间/index.html index 2a83d2374..fa1d360cf 100644 --- a/tags/极空间/index.html +++ b/tags/极空间/index.html @@ -1 +1 @@ -标签:极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:极空间 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/背景音乐/index.html b/tags/背景音乐/index.html index c52ada48c..152af6cb3 100644 --- a/tags/背景音乐/index.html +++ b/tags/背景音乐/index.html @@ -1 +1 @@ -标签:背景音乐 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:背景音乐 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/自动更新/index.html b/tags/自动更新/index.html index e66996b40..6b8ba4948 100644 --- a/tags/自动更新/index.html +++ b/tags/自动更新/index.html @@ -1 +1 @@ -标签:自动更新 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:自动更新 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/自定义指标/index.html b/tags/自定义指标/index.html index ed4fefd4f..6d6fe60e7 100644 --- a/tags/自定义指标/index.html +++ b/tags/自定义指标/index.html @@ -1 +1 @@ -标签:自定义指标 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:自定义指标 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/蜡烛图/index.html b/tags/蜡烛图/index.html index b1a69bc85..1c9901e81 100644 --- a/tags/蜡烛图/index.html +++ b/tags/蜡烛图/index.html @@ -1 +1 @@ -标签:蜡烛图 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:蜡烛图 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/评论/index.html b/tags/评论/index.html index 789c51dde..d4780959d 100644 --- a/tags/评论/index.html +++ b/tags/评论/index.html @@ -1 +1 @@ -标签:评论 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:评论 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/负载均衡/index.html b/tags/负载均衡/index.html index 8d4b15295..d79722302 100644 --- a/tags/负载均衡/index.html +++ b/tags/负载均衡/index.html @@ -1 +1 @@ -标签:负载均衡 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:负载均衡 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/踩坑/index.html b/tags/踩坑/index.html index 9e27fe31e..65e94215a 100644 --- a/tags/踩坑/index.html +++ b/tags/踩坑/index.html @@ -1 +1 @@ -标签:踩坑 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:踩坑 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/郁闷/index.html b/tags/郁闷/index.html index 26d945207..3a9486f61 100644 --- a/tags/郁闷/index.html +++ b/tags/郁闷/index.html @@ -1 +1 @@ -标签:郁闷 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:郁闷 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/青龙面板/index.html b/tags/青龙面板/index.html index e084fa7c9..44a67a762 100644 --- a/tags/青龙面板/index.html +++ b/tags/青龙面板/index.html @@ -1 +1 @@ -标签:青龙面板 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:青龙面板 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file diff --git a/tags/项目部署/index.html b/tags/项目部署/index.html index f95581c75..75624ea2d 100644 --- a/tags/项目部署/index.html +++ b/tags/项目部署/index.html @@ -1 +1 @@ -标签:项目部署 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file +标签:项目部署 | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣
\ No newline at end of file