Pandoc

Pandoc 开始 install pandoc install miktext build 中文要选择合适的字体否则无法成功创建 fc-list mac: brew install fontconfig fc-list :lang-zh > fonts.txt fc-list -f “%{family}\n” :lang=zh 参数解释 -o: 输出文件 –from: 输入文件类型 –template: 模版文件 –listings: 列表 –pdf-engine: pdf生成用的引擎 -V: 参数 CJKmainfont: 中文文字字体 pandoc "README.md" -o "document.pdf" --from markdown --template "./template.latex" --listings --pdf-engine "xelatex" -V CJKmainfont="PingFang SC" && open document.pdf data-dir DATADIR macos: ~/.local/share/pandoc windows: C:\Users\USERNAME\AppData\Roaming\pandoc defaults $DATADIR/defaults/docker.yaml,可以为不同的文档设置自己的defaults,避免后面重复操作,仅需使用pandoc --defaults docker即可打包文档 from: markdown # reader: may be used instead of from: to: pdf # writer: may be used instead of to: # leave blank for output to stdout: output-file: docker.pdf # leave blank for input from stdin, use [] for no input: input-files: - 阿里云仓库.md - 管理工具.md - 加速.md - 扩容.md - 清理.md - 容器导出和导入.md - 私有registry.md - debian-docker-install.md - env.md - logs.md - usage.md # or you may use input-file: with a single value # pdf-engine: wkhtmltopdf pdf-engine: xelatex self-contained: false standalone: true metadata: author: - Peter titlepage: true toc-own-page: true toc: true number-sections: true # code block wrap listings: true variables: CJKmainfont: KaiTi template: eisvogel verbosity: ERROR log-file: log.json filters: - mermaid-filter.cmd from: markdown # reader: may be used instead of from: to: pdf # writer: may be used instead of to: # leave blank for output to stdout: output-file: docker.pdf # leave blank for input from stdin, use [] for no input: input-files: - 阿里云仓库.md - 管理工具.md - 加速.md - 扩容.md - 清理.md - 容器导出和导入.md - 私有registry.md - debian-docker-install.md - env.md - logs.md - usage.md # or you may use input-file: with a single value # pdf-engine: wkhtmltopdf pdf-engine: xelatex self-contained: false standalone: true metadata: author: - Peter titlepage: true toc-own-page: true toc: true number-sections: true # code block wrap listings: true variables: CJKmainfont: KaiTi template: eisvogel verbosity: ERROR log-file: log.json filters: - mermaid-filter.cmd template 设置为系统配置,eisvogel.latex,github ...

November 10, 2021 · 2 min · Peter

Podman

README 初次使用 podman root用户和非root用户的images和container是分开的 非root用户使用podman generate systemd命令生成的文件,拷贝到~/.config/systemd/user/下面,使用systemctl --user执行 流程演示 podman pull docker.io/nginx:latest podman create --name nginx -p 8080:80 nginx:latest mkdir -p ~/.config/systemd/user cd ~/.config/systemd/user podman generate systemd --files --name nginx systemctl --user enable container-nginx systemctl --user start container-nginx curl http://127.0.0.1:8080

November 6, 2021 · 1 min · Peter

Upgrade debian main version

Upgrade debian main version update $ apt-get update && apt-get upgrade backup sources.list $ cp /etc/apt/sources.list /etc/apt/sources.list.bak replace `stretch` to `buster` of `/etc/apt/sources.list` $ sed -i 's/stretch/buster/g' /etc/apt/sources.list run upgrade $ apt-get update && apt-get upgrade run dist upgrade $ apt-get dist-upgrade $ reboot $ lsb_release -a clean: $ apt-get autoremove

November 5, 2021 · 1 min · Peter

Gitlab CI/CD

Gitlab CI/CD For the development environment. Install with docker Read the official documentation for how to install docker. I installed docker on the MacOS. gitlab documentation sudo docker run --detach \ --hostname 192.168.8.226 \ --publish 443:443 --publish 80:80 --publish 8022:22 \ --name gitlab \ --restart always \ --volume ~/gitlab/config:/etc/gitlab \ --volume ~/gitlab/logs:/var/log/gitlab \ --volume ~/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest gitlab-runner Order of initialization: install register custom config documentation There is no difficulty to install gitlab and gitlab-runner in docker. ...

April 26, 2021 · 3 min · Peter

Apache Bench Test

Apache Bench Test GET ab -c 10 -n 40 http://127.0.0.1:8000/api/v1/mzitu/tags/ POST, https://blog.csdn.net/chenggong2dm/article/details/51850923 ab -n 1 -c 1 -p f:/postdata.txt -T application/x-www-form-urlencoded “http://127.0.0.1/abpost” ab -n 100 -c 10 -p data.json -T application/json http://127.0.0.1/api // postdata.txt

August 6, 2020 · 1 min · Peter