Skip to content

Commit a94677e

Browse files
committed
update: new github page && lots of docs
1 parent 0d48ed4 commit a94677e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+880
-149
lines changed

.github/workflows/jekyll-gh-pages.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["master"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: true
21+
22+
jobs:
23+
# Build job
24+
build:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v3
32+
33+
- name: Build with Jekyll
34+
uses: actions/jekyll-build-pages@v1
35+
with:
36+
source: ./
37+
destination: ./_site
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v1
41+
42+
# Deployment job
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v1

.github/workflows/local.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build Github Pages in local
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-local:
8+
runs-on: macos-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
13+
- name: Build with Jekyll
14+
uses: actions/jekyll-build-pages@v1
15+
with:
16+
source: ./
17+
destination: ./_site

.jekyll/assets/favicon.ico

28 KB
Binary file not shown.

.jekyll/includes/title.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% if site.logo %}
2+
<div class="site-logo"></div>
3+
<div class="site-logo-title">{{ site.title }}</div>
4+
{% else %}
5+
{{ site.title }}
6+
{% endif %}

.jekyll/sass/custom/custom.scss

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.site-logo {
2+
max-width: 40px;
3+
margin-right: 10px;
4+
}
5+
6+
.site-logo-title {
7+
font-size: 0.6em;
8+
max-width: 60%;
9+
line-height: 1.2;
10+
}
11+
12+
.search-result-highlight {
13+
color: #fa2c2c;
14+
text-decoration: underline;
15+
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016-2022 ADoyle
1+
Copyright (c) 2016-2023 ADoyle ([email protected])
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: Home
3+
nav_order: 1
4+
---
5+
6+
17
# 今天我学了什么 (Today I Learned)
28

39
> 博观而约取,厚积而薄发。
@@ -29,7 +35,7 @@ ADoyle 的碎片化知识笔记。
2935

3036
## 版权声明
3137

32-
Copyright (c) 2016-2022 ADoyle ([email protected]). The project is licensed under the **BSD 3-clause License**.
38+
Copyright (c) 2016-2023 ADoyle ([email protected]). The project is licensed under the **BSD 3-clause License**.
3339

3440
See the [LICENSE][] file for the specific language governing permissions and limitations under the License.
3541

@@ -140,12 +146,15 @@ See the [LICENSE][] file for the specific language governing permissions and lim
140146
- [ContainerD OverlayFS](docker/containerd-overlayfs.md)
141147
- [Containerd](docker/containerd.md)
142148
- [容器里的 Core Dump](docker/core-dump-in-container.md)
149+
- [容器里的 CPU 信息](docker/cpu-in-container.md)
143150
- [device or resource busy](docker/device-or-resource-busy.md)
144151
- [docker-compose 启动容器顺序](docker/docker-compose-startup-order.md)
145152
- [Docker 容器与 Cgroup](docker/docker-container-and-cgroup.md)
146153
- [进入 docker for mac 的虚拟机](docker/docker-for-mac-tty.md)
154+
- [docker for mac](docker/docker-for-mac.md)
147155
- [学习 Docker](docker/docker-learning.md)
148156
- [Docker OverlayFS](docker/docker-overlayfs.md)
157+
- [Docker 的坑](docker/docker-pitfalls.md)
149158
- [Docker Run With Namespace](docker/docker-run-with-namespace.md)
150159
- [Docker Tag/Id/Digest](docker/docker-tag-id-digests.md)
151160
- [docker 小技巧](docker/docker-tricks.md)
@@ -154,6 +163,8 @@ See the [LICENSE][] file for the specific language governing permissions and lim
154163
- [修正 alpine 镜像的时区问题](docker/fix-timezone-in-alpine-image.md)
155164
- [修正 Docker for mac 时区问题](docker/fix-timezone-in-docker-for-mac.md)
156165
- [Docker for Mac 中磁盘文件占用过大](docker/large-disk-space-usage-in-docker-for-mac.md)
166+
- [构建多架构镜像](docker/multi-arch-build.md)
167+
- [docker 多阶段构建 (Multi-Stage Build)](docker/multi-stage-build.md)
157168
- [nerdctl 容器](docker/nerdctl-container.md)
158169
- [nerdctl 网络](docker/nerdctl-network.md)
159170
- [nerdctl](docker/nerdctl.md)
@@ -234,8 +245,11 @@ See the [LICENSE][] file for the specific language governing permissions and lim
234245
- [git 小技巧](git/git-tricks.md)
235246
- [git credentials](git/gitcredentials.md)
236247
- [gitignore 与 gitkeep](git/gitignore-with-gitkeep.md)
248+
- [grafted commit](git/grafted-commit.md)
237249
- [忽略 Git submodule](git/ignore-git-submodule.md)
238250
- [--ours vs --theirs](git/ours-vs-theirs.md)
251+
- [git proxy](git/proxy.md)
252+
- [Git sign-off](git/sign-off.md)
239253

240254
## Go
241255

@@ -252,6 +266,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
252266

253267
- [固件 (Firmware)](hardware/firmware.md)
254268
- [网件 R6900 刷梅林固件](hardware/netgear-R6900-asuswrt-merlin.md)
269+
- [网络交换机](hardware/network-switch.md)
255270
- [USB](hardware/usb.md)
256271

257272
## Javascript
@@ -270,6 +285,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
270285

271286
## K8S
272287

288+
- [OCI、CNI](k8s/OCI-spec.md)
273289
- [Cilium](k8s/cilium.md)
274290
- [调试 CrashLoopBackOff 状态的 Pod](k8s/debug-CrashLoopBackOff-pod.md)
275291
- [Helm](k8s/helm.md)
@@ -293,9 +309,13 @@ See the [LICENSE][] file for the specific language governing permissions and lim
293309

294310
记录编程语言的内部设计与思想
295311

312+
- [CFLAGS](language/CFLAGS.md)
296313
- [Actor 并发模型](language/actor.md)
314+
- [编译器](language/compiler.md)
297315
- [协程 (Coroutine)](language/coroutine.md)
298316
- [CSP 并发模型](language/csp.md)
317+
- [Debuger](language/debuger.md)
318+
- [栈帧](language/stack-frame.md)
299319

300320
## Linux
301321

@@ -306,6 +326,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
306326
- [ABI](linux/abi.md)
307327
- [用户线程,内核线程,CPU 超线程技术](linux/about-multi-thread.md)
308328
- [用户增加用户组](linux/add-group-to-user.md)
329+
- [ag 和 rg](linux/ag-and-rg.md)
309330
- [Alfred 找不到文件](linux/alfred-cannot-find-files.md)
310331
- [anon_inode](linux/anon_inode.md)
311332
- [ansible 部署到 centos7 时,不能找到 service](linux/ansible-deploy-fault-with-centos7-and-service.md)
@@ -477,6 +498,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
477498
记录网络相关知识
478499

479500
- [ARP](network/arp.md)
501+
- [自治系统 (Autonomous System)](network/autonomous-system.md)
480502
- [组播地址](network/boardcast-ip.md)
481503
- [网桥 (Bridge)](network/bridge.md)
482504
- [DHCP](network/dhcp.md)
@@ -487,6 +509,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
487509
- [NAT](network/nat.md)
488510
- [pfctl](network/pfctl.md)
489511
- [Samba](network/samba.md)
512+
- [SDN](network/sdn.md)
490513
- [TCP Buffer 大小](network/tcp-buffer-size.md)
491514
- [vxlan](network/vxlan.md)
492515

@@ -542,10 +565,12 @@ See the [LICENSE][] file for the specific language governing permissions and lim
542565
- [永久链接](others/archive-webpage.md)
543566
- [脱字符 (caret)](others/caret.md)
544567
- [Chrome 小技巧](others/chrome-tricks.md)
568+
- [复制粘贴好过手写](others/copy-paste-better-than-handwriting.md)
545569
- [Mac 文件系统的剪切快捷键](others/cut-in-mac-file-system.md)
546570
- [YAML 中的 Date 类型陷阱](others/date-trap-in-yaml.md)
547571
- [文件命名,下划线还是中划线?](others/file-naming-with-underscores-and-dashes.md)
548572
- [github 中 markdown 折叠文本](others/fold-text-in-github.md)
573+
- [fzf](others/fzf.md)
549574
- [从微信公众号提取原图](others/get-raw-image-from-weixin.md)
550575
- [Github Template (模板)](others/github-template.md)
551576
- [gRPC](others/grpc.md)
@@ -555,6 +580,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
555580
- [如何在 github 项目里搜索代码](others/how-to-use-github-to-browse-codes.md)
556581
- [Hyper.js 中文问题](others/hyper-js-chinese-problems.md)
557582
- [无法在 Tmux 显示图片](others/imgcat-not-work-in-tmux.md)
583+
- [Jekyll](others/jekyll.md)
558584
- [Jinja2](others/jinja2.md)
559585
- [Language Server Protocol](others/language-server-protocol.md)
560586
- [箴言](others/maxim.md)
@@ -627,13 +653,20 @@ See the [LICENSE][] file for the specific language governing permissions and lim
627653

628654
## Shell
629655

656+
- [多行字符串赋值给变量](shell/assign-multi-lines-string-to-variable.md)
657+
- [bash completion](shell/bash-completion.md)
630658
- [Bash 镜像有 bug](shell/bash-docker-image-has-bug.md)
631659
- [bash error exit](shell/bash-error-exit.md)
632660
- [bash history](shell/bash-history.md)
633661
- [bash 开启 vi 模式](shell/bash-in-vi-mode.md)
634662
- [学习 Bash](shell/bash-learning.md)
635663
- [Bash 的坑](shell/bash-pitfalls.md)
636664
- [Bash 小技巧](shell/bash-tricks.md)
665+
- [`printf '%s\n' $@` 为何可以打印多行?](shell/printf-array.md)
666+
- [Readline](shell/readline.md)
667+
- [学习 Shell](shell/shell-learning.md)
668+
- [Bash 的 subshell 与子进程](shell/subshell-and-child-process.md)
669+
- [Bash xtrace](shell/xtrace.md)
637670

638671
## Startup
639672

@@ -667,6 +700,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
667700
记录我的碎片式思考
668701

669702
- [CLD 图](thinking/causal-loop-diagram.md)
703+
- [声明式配置 vs 编程式配置](thinking/declarable-vs-programmable.md)
670704
- [项目代码如何组织](thinking/how-to-make-code-organization.md)
671705
- [如何编程](thinking/how-to-programming.md)
672706
- [不完整的函数](thinking/non-total-function.md)
@@ -681,6 +715,7 @@ See the [LICENSE][] file for the specific language governing permissions and lim
681715

682716
## Vim
683717

718+
- [<C-I> 在 nvim 里等同于 <Tab>](vim/ctrl-i-in-neovim.md)
684719
- [学习 Neovim](vim/neovim-learning.md)
685720
- [在 vim 中执行 shell 命令,同时将结果输出到 buffer](vim/pipe-shell-output-to-buffer.md)
686721
- [vim 插件教程](vim/plugins-tutorial.md)

_config.yml

+59-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,59 @@
1-
theme: jekyll-theme-cayman
1+
includes_dir: .jekyll/includes
2+
sass:
3+
sass_dir: .jekyll/sass
4+
5+
plugins:
6+
- jekyll-remote-theme
7+
- jekyll-include-cache
8+
- jekyll-sitemap
9+
- jekyll-feed
10+
11+
include: []
12+
13+
exclude:
14+
- README.md
15+
- .github
16+
17+
remote_theme: just-the-docs/just-the-docs
18+
19+
# Default config: https://github.com/just-the-docs/just-the-docs/blob/main/_config.yml
20+
url: https://adoyle.me
21+
baseurl: /Today-I-Learned/
22+
title: 今天我学了什么
23+
description: 博观而约取,厚积而薄发。ADoyle 的碎片化知识笔记。
24+
logo: https://media.githubusercontent.com/media/adoyle-h/_imgs/master/assets/logo.png
25+
favicon_ico: ./.jekyll/assets/favicon.ico
26+
permalink: none
27+
footer_content:
28+
Copyright 2016-2023 ADoyle ([email protected]). The project is licensed under <b>BSD 3-clause License</b>.<br>
29+
Source code at <a href="https://github.com/adoyle-h/my-development-tools">https://github.com/adoyle-h/Today-I-Learned</a>
30+
31+
last_edit_timestamp: true
32+
color_scheme: dark
33+
back_to_top: true
34+
back_to_top_text: "Back to Top"
35+
36+
search_enabled: true
37+
search:
38+
# Split pages into sections that can be searched individually
39+
# Supports 1 - 6, default: 2
40+
heading_level: 2
41+
# Maximum amount of previews per search result
42+
# Default: 3
43+
previews: 3
44+
# Maximum amount of words to display before a matched word in the preview
45+
# Default: 5
46+
preview_words_before: 5
47+
# Maximum amount of words to display after a matched word in the preview
48+
# Default: 10
49+
preview_words_after: 10
50+
# Set the search token separator
51+
# Default: /[\s\-/]+/
52+
# Example: enable support for hyphenated search words
53+
tokenizer_separator: /[\s/]+/
54+
# Display the relative url in search results
55+
# Supports true (default) or false
56+
rel_url: true
57+
# Enable or disable the search button that appears in the bottom right corner of every page
58+
# Supports true or false (default)
59+
button: false

_docs/license.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 版权声明
22

3-
Copyright (c) 2016-2022 ADoyle ([email protected]). The project is licensed under the **BSD 3-clause License**.
3+
Copyright (c) 2016-2023 ADoyle ([email protected]). The project is licensed under the **BSD 3-clause License**.
44

55
See the [LICENSE][] file for the specific language governing permissions and limitations under the License.
66

_docs/meta.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Home
3+
nav_order: 1
4+
---

build

+2-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ ${tocStr}
134134

135135
async function getTitle(path) {
136136
const content = await readFile(path, {encoding: 'utf8'});
137-
const matched = content.match(/^##? ?(.+)/);
137+
const matched = content.match(/##? (.+)/);
138138
if (!matched) return '';
139139

140140
let title = matched[1];
@@ -220,6 +220,7 @@ async function build() {
220220

221221

222222
const structure = [
223+
{md: absPath('_docs/meta.md')},
223224
{h1: '今天我学了什么 (Today I Learned)'},
224225
{blockquote: pkg.description},
225226
{md: absPath('_docs/intro.md')},

design/color-space.md

+6
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@
1717
RGB 每个颜色单位的范围是 0~255,也就是说只能表达 256 种颜色的组合,这显然是太少了。
1818
HSL、HSB 的颜色精度比 RGB 还低,能表达的颜色更少。
1919
当前的硬件不断升级,可能已经超过了理论能表达颜色范围和精度。
20+
21+
### 如果你使用 Sketch
22+
23+
Sketch 会显示`该文档目前使用的是 sRGB 颜色配置。可以通过以下路径进行更改:...`
24+
25+
https://www.sketch.com/docs/designing/color-profiles/

docker/cpu-in-container.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 容器里的 CPU 信息
2+
3+
containerd 支

docker/docker-for-mac.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# docker for mac
2+
3+
> 在 2021 年 4 月时,Docker for Mac(Docker Desktop)发布了对 Apple Silicon 的实验性支持,它会使用 QEMU 运行一个 ARM 架构的 Linux 虚拟机,默认运行 ARM 架构的镜像,但也支持运行 x86 的镜像。
4+
5+
[为什么在 Apple Silicon 上装 Docker 这么难](https://juejin.cn/post/7068481074736660494)
6+
7+
## 修改配置导致 docker 无法启动
8+
9+
docker for mac 的配置在 `~/Library/Group\ Containers/group.com.docker/settings.json`,修复配置即可。

docker/docker-pitfalls.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Docker 的坑
2+
3+
### COPY/ADD 的目标路径不能有 ~
4+
5+
`COPY . ~/` 或者 `COPY . ~`,构建不会报错,但是 `~/` 下没有文件。
6+
7+
`COPY . /root/` 或者 `COPY . /root` 才对。
8+
9+
`RUN mkdir -p ~/abc` 却是能创建成功 `~/abc` 的。

0 commit comments

Comments
 (0)