每日小结

#Spring-doc OpenAPI 注解

@Operation @Response @Parameter

#Ubuntu 设置代理

启动 clash for linux

  • 配置代理地址配置文件

  • 配置 restAPI 地址和访问密码

  • 将 clash 作为一个 daemon 进程:

    • 使用 systemd:

      先创建配置文件/etc/systemd/system/clash.service

      1
      2
      3
      4
      5
      6
      7
      8
      [Unit]
      Description=Clash Daemon

      [Service]
      ExecStart=/usr/local/bin/clash -d /etc/clash/

      [Install]
      WantedBy=multi-user.target

      然后 clash 就成为了一个 service, 可以通过 systemctl 命令启动, 通过 journalctl 命令查看日志等

    • 使用 pm2: pm2 start clash

  • 在.bashrc 或者.zshrc 文件底部设置

1
2
3
4
5
$ export all_proxy='socks5://localhost:7891'
$ export http_proxy='http://localhost:7890'
$ export https_proxy='http://localhost:7890'
$ export ftp_proxy='http://localhost:7890'
$ export no_proxy='localhost,127.0.0.1'

#Shell 的类型

#shell 的类型

常见的 shell 有 sh, bash, zsh 等,

查看当前使用的 shell: echo $SHELL

查看系统中的所有 shell: cat /etc/shells

#登录 shell 和非登录 shell

#交互式 shell 和非交互式 shell

#.profile 和 .xxshrc

  • /etc/profile 为系统的每个用户设置环境信息,当第一个用户登录时, 该文件被执行, 并从/etc/profile.d 目录的配置文件中搜集 shell 的设置

  • /etc/xxshrc 为每一个运行 xx shell 的用户执行此文件. 当 xx shell 被打开时, 该文件被读取。有些 linux 版本中的/etc 目录下已经没有了该文件。

  • ~/.profile 每个用户都可使用该文件输入专用于自己使用的 shell 信息, 当用户登录时,该文件仅仅执行一次 默认情况下,它设置一些环境变量,然后执行用户的.xxshrc 文件.

  • ~/.xxshrc 该文件包含专用于某个用户的 xx shell 的配置, 当该用户登录时以及每次打开新的 xx shell 时,该文件被读取.

#Hexo layout

hexo 中每种不同的页面样式称为一个 layout

根据 md 放置的位置不同, 使用的 layout 也不同