Chemacs Notes

教程

windows

配置例子

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
(
 ("spacemacs" . ((user-emacs-directory . "~/.emacs.d.spacemacs")
         (server-name . "~/.emacs.d/server/spacemacs")
         (env . (("SPACEMACSDIR" . "~/.emacs.d.spacemacs")))))

 ("default"  .  ((user-emacs-directory . "~/.emacs.d.default")
         (server-name . "~/.emacs.d/server/server")
         ))

 ("doom" . ((user-emacs-directory . "~/.emacs.d.doom")
        ;; (env . (("DOOMDIR" . "~/doom-config")))
        ))
 )

打开 emacsclient 方法

1
2
3
4
5
6
7
emacsclient -c -t -a=""

emacsclient -c -t -f "~/.emacs.d/server/server"
emacsclient -c -t -f server

emacsclient -c -t -f "~/.emacs.d/server/spacemacs"
emacsclient -c -t -f spacemacs
  • 可以通过指定 server 文件路径来

启动 daemon 方法

1
2
3
4
emacs --daemon  # alternate-editor='' server-file=server

emacs --with-profile spacemacs --daemon=spacemacs  # server-file='~/.emacs.d.spacemacs/server/spacemacs'
emacs --with-profile spacemacs --daemon="~/.emacs.d/server/spacemacs" # server-file='spacemacs'
  • -f 或 –server-file=/path/to/file: 针对 windows
  • -s 或 –socket-name: 针对 linux

OAuth

教程

概念

token 令牌

  • 和密码类似
  • 有有效时长
  • 可以被主动撤销
  • 可以设置权限范围 scope

    • 密码是所有权限

角色

  • 客户端
  • 资源所有者

GnuPG ---- GNU Privacy Guard

QEMU notes

创建磁盘

  • qemu-image

    1
    2
    3
    
    qemu-img create ubuntu.img 20G
    
    qemu-img create -f qcow2 ubuntu.qcow2 20G

启动和安装

  • 安装
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
qemu-system-x86_64 \

    # 磁盘路径
    -hda ubuntu.img \

    # 启动顺序
    -boot d \

    # 安装iso文件路径
    -cdrom /path/to/install_iso_file \

    # 内存大小,默认单位MiB
    -m 640
  • -boot: 启动数序