william

Keep Calm and Markdown.

docker 安装 gitbook

docker-compose

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
version: "3"
services:
  gitbook:
    hostname: gitbook
    container_name: gitbook
    image: fellah/gitbook
    pull_policy: always
    restart: always
    privileged: true
    tty: true
    volumes:
      - /data/gitbook:/srv/gitbook
      - /etc/localtime:/etc/localtime
    ports:
      - 4000:4000
    command:
      - /bin/bash
      - -c
      - |
        /bin/bash

setfacl 更精准控制文件权限

1
2
3
4
5
setfacl -R -m o::---  /home/ops/shared/
setfacl -m u:spd:x /home/ops
setfacl -m u:spd:x /home/ops/shared
setfacl -m u:spd:x /home/ops/shared/trading
setfacl -R -m u:spd:rx /home/ops/shared/trading/{PublicInfo,lib,Snail,Spider}

c++ copy elision

C++ 提供了小对象的 RVO(返回值优化),实现了在函数返回中调用构造函数的功能。

0%