0%

Oh My Zsh

Installation

  1. Install Zsh

    1
    sudo apt install zsh
  2. Install Oh My Zsh

    1
    sh -c "$(wget -O- https://gitee.com/mcornella/ohmyzsh/raw/master/tools/install.sh)"
  3. Config ZSH
    修改 .zshrc 文件,添加 conda,cuda 等路径

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    __conda_setup="$('/home/xxxx/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
    if [ $? -eq 0 ]; then
    eval "$__conda_setup"
    else
    if [ -f "/home/xxxx/anaconda3/etc/profile.d/conda.sh" ]; then
    . "/home/xxxx/anaconda3/etc/profile.d/conda.sh"
    else
    export PATH="/home/bjy/anaconda3/bin:$PATH"
    fi
    fi
    unset __conda_setup

    export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH
    export PATH=$PATH:/usr/local/cuda-11.1/bin
  4. Change theme
    修改 .zshrc 文件

    1
    ZSH_THEME="af-magic"

Plugins

Autosuggestions

  1. 首先从 GitHub 下载插件

    1
    git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  2. 再修改 .zshrc 配置文件

    1
    2
    plugins=(git)
    plugins=(git zsh-autosuggestions)

SSH

  1. 客户端生成密钥对(之前生成过就不用这一步了)

    1
    ssh-keygen -t rsa
  2. 使用指令直接将公钥传送至服务器

    1
    ssh-copy-id bje@10.176.62.5

免密码ssh登陆就设置完成了。


Reference

https://github.com/ohmyzsh/ohmyzsh

Hexo

Commands

Pipeline

1
2
3
hexo generate

hexo deploy

Installation

1
2
3
4
5
6
7
sudo npm install -g hexo-cli

npm uninstall hexo-renderer-marked --save

npm install hexo-renderer-kramed --save

npm install hexo-math --save

安装完成后,下载主题 theme 并在站点配置文件中选择主题。

之后,再在 next 的配置文件中将 mathjax 设置为 true

在每一篇博客的上方将mathjax 标志设置成 true

1
2
3
4
5
---
title: index.html
tags:
mathjax: true
--


MarkDown

Code Zone

Multi Lines

1
2
3
4
` ` ` c++
# include <iostream>
return 0
` ` `
1
2
# include <iostream>
return 0

Single Lines

1
`return`

return 0

Insert Images

1
2
3
<img src='folder_name/img.jpg' align="justify">

<img src='folder_name/img.jpg' width=600px>
1
[click here](https: //eulring.github.io/)

click here

Fonts

1
_eulring_    __eulring__   ___eulring___   ~~eulring~~   `eulring`

_eulring_ eulring _eulring_ eulring eulring

Reference

1
2
3
4
> Eulring <br/>
> Eulring <br/>
>> Eulring <br/>
>>> Eulring <br/>

Eulring

Eulring

Eulring

Eulring

List

1
2
3
- a
- b
- c
  • a
    • b
  • c
1
2
3
1. a
1. b
2. c
  1. a
    1. b
  2. c

Table

1
2
3
| DataSet | Scale | categories | generations |
| :------| ------: | ------: |:------: |
| CoCo | 120000 | 91 | - |
DataSet Scale categories generations
CoCo 120000 91 -

Separate Line

1
---

Equation

如果 Hexo 安装过 mathjax,还可以插入公式:

1
$$e^{\pi i}+1=0$$


Reference

https://www.jianshu.com/p/7ab21c7f0674

Commands

user manage

1
2
3
4
sudo adduser username                   # 添加用户
sudo adduser username sudo # 给用户sudo权限
sudo deluser username sudo # 删除用户的sudo权限
sudo userdel -r username # 删除用户



.