Short cuts

Linux Ubuntu

1
2
3
Ctrl + Alt + T: open the terminal
Ctrl + Alt + C: copy
Ctrl + Alt + V: paste

MacOS

1
2
screen shot: Shift + Command + 5
switch full screen mode: Command + Control + F

Command line

LInux command line

ref : https://www.linuxcool.com/

Hexo

command line

1
2
3
4
5
6
7
# 创建 post,会创建一个 md 文件和一个空文件夹
hexo new post-title

# 部署
hexo g -d

# 删除 post,删除 md 文件和文件夹

本地图片插入

ref : https://blog.csdn.net/xjm850552586/article/details/84101345

Config

Linux Ubuntu

系统设置

  1. /etc 目录下 profile 、bash.bashrc 和用户目录下 .profile 、.bashrc 的区别?
    1. /etc/profile 和 bash.bashrc 的文件是针对所用用户来说的,每个用户登录的时候都会执行。profile 只执行一次,bash.bashrc 在每次登录 Shell 的时候都会执行。bash.bashrc 包含在 profile 内。
    2. ~/.profile 和 ~/.bashrc 文件是针对单个用户的。
      1. ~./profile : Login Shell 登录时执行:其中包括执行 ~/.bashrc
      2. ~/.bashrc : Non-login Shell 登录时执行

Installations

Prometheus 安装

鉴于 docker 弄了好久没有搞定,所以还是装在本地吧

参考链接: https://prometheus.io/docs/prometheus/latest/getting_started/

  1. 环境

    1
    windows + 虚拟机: win10 + VMware Workstation 15 + Ubuntu 20.04.1
  2. 安装 Prometheus

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    # 下载安装包并解压
    wget https://github.com/prometheus/prometheus/releases/download/v2.27.1/prometheus-2.27.1.linux-amd64.tar.gz
    tar xvfz prometheus-2.27.1.linux-amd64.tar.gz
    mv prometheus-2.27.1.linux-amd64 prometheus
    cd prometheus

    # 启动 Prometheus
    ./prometheus --config.file=prometheus.yml

    # 打开浏览器 http://localhost:9090/ 就能看到图形界面了。

    # 关闭 Prometheus:Ctrl + c