Skip to content

Commit 68ab53c

Browse files
committed
refactor: knowledge base for all
1 parent 55c9efc commit 68ab53c

File tree

91 files changed

+23532
-25
lines changed

Some content is hidden

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

91 files changed

+23532
-25
lines changed

.editorconfig

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default settings for all files
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
indent_style = space
13+
indent_size = 2
14+
15+
# Markdown files
16+
[*.{md,markdown}]
17+
trim_trailing_whitespace = false # Trailing whitespace is significant in Markdown
18+
19+
# Python files
20+
[*.py]
21+
indent_size = 4
22+
max_line_length = 88 # Black formatter default
23+
24+
# C# files
25+
[*.cs]
26+
indent_size = 4
27+
csharp_new_line_before_open_brace = all
28+
csharp_space_between_method_declaration_parameter_list_parentheses = false
29+
csharp_space_between_method_call_parameter_list_parentheses = false
30+
csharp_space_after_keywords_in_control_flow_statements = true
31+
csharp_space_between_parentheses = false
32+
33+
# JavaScript/TypeScript files
34+
[*.{js,ts,jsx,tsx}]
35+
quote_type = single
36+
37+
# JSON files
38+
[*.json]
39+
insert_final_newline = false
40+
41+
# YAML files
42+
[*.{yml,yaml}]
43+
indent_size = 2
44+
45+
# Shell scripts
46+
[*.sh]
47+
indent_size = 2
48+
49+
# HTML, CSS, SCSS files
50+
[*.{html,css,scss}]
51+
indent_size = 2
52+
53+
# Java files
54+
[*.java]
55+
indent_size = 4
56+
57+
# Go files
58+
[*.go]
59+
indent_style = tab
60+
indent_size = 4
61+
62+
# Makefiles
63+
[Makefile]
64+
indent_style = tab

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.
28+
29+
**Possible solution**
30+
If you have suggestions on how to fix the issue, please describe them here.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Báo cáo lỗi
3+
about: Tạo một báo cáo lỗi để giúp chúng tôi cải thiện
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Mô tả lỗi**
11+
Mô tả ngắn gọn và rõ ràng về lỗi đang gặp phải.
12+
13+
**Cách để tái tạo lỗi**
14+
Các bước để tái hiện hành vi lỗi:
15+
1. Truy cập vào '...'
16+
2. Nhấn vào '...'
17+
3. Cuộn xuống tới '...'
18+
4. Thấy lỗi
19+
20+
**Hành vi mong đợi**
21+
Mô tả rõ ràng và ngắn gọn về điều bạn mong đợi sẽ xảy ra.
22+
23+
**Ảnh chụp màn hình**
24+
Nếu có, hãy thêm ảnh chụp màn hình để minh họa lỗi.
25+
26+
**Ngữ cảnh bổ sung**
27+
Thêm bất kỳ thông tin bổ sung nào về sự cố ở đây (thiết bị, trình duyệt, môi trường...).
28+
29+
**Giải pháp khả thi**
30+
Nếu bạn có gợi ý về cách khắc phục lỗi, vui lòng mô tả tại đây.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
21+
22+
**Target topics/areas**
23+
Which topics or sections of the repository would be affected by this feature?
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Yêu cầu tính năng
3+
about: Đề xuất một ý tưởng hoặc tính năng cho dự án
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Yêu cầu tính năng này có liên quan đến vấn đề nào không? Hãy mô tả.**
11+
Mô tả rõ ràng và ngắn gọn về vấn đề. Ví dụ: Tôi thường cảm thấy khó chịu khi [...]
12+
13+
**Mô tả giải pháp bạn muốn có**
14+
Mô tả rõ ràng và ngắn gọn về điều bạn muốn xảy ra.
15+
16+
**Mô tả các giải pháp thay thế bạn đã xem xét**
17+
Mô tả rõ ràng và ngắn gọn về bất kỳ giải pháp thay thế hoặc tính năng khác mà bạn đã cân nhắc.
18+
19+
**Ngữ cảnh bổ sung**
20+
Thêm bất kỳ thông tin, bối cảnh hoặc ảnh chụp màn hình nào liên quan đến yêu cầu tính năng ở đây.
21+
22+
**Các chủ đề/khu vực bị ảnh hưởng**
23+
Những chủ đề hoặc phần nào trong repository sẽ bị ảnh hưởng bởi tính năng này?

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Markdown CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
markdown-lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 16
19+
20+
- name: Install markdownlint-cli
21+
run: npm install -g markdownlint-cli
22+
23+
- name: Run markdownlint
24+
run: markdownlint '**/*.md' --ignore node_modules
25+
26+
check-links:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: '16'
35+
36+
- name: Install dependencies
37+
run: npm install -g markdown-link-check
38+
39+
- name: Check links
40+
run: ./tools/check_links.sh
41+
42+
- name: Generate TOC
43+
run: |
44+
python3 ./tools/generate_summary.py
45+
git diff --exit-code SUMMARY.md || (echo "SUMMARY.md is out of date. Please run ./tools/generate_summary.py and commit the changes" && exit 1)

.gitignore

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,34 @@ node_modules/
33

44
# Python
55
__pycache__/
6-
*.pyc
7-
*.pyo
8-
*.pyd
9-
.env
10-
.venv/
6+
*.py[cod]
7+
*$py.class
8+
*.so
9+
.Python
10+
env/
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
*.egg-info/
23+
.installed.cfg
24+
*.egg
25+
26+
# C#
27+
bin/
28+
obj/
29+
*.user
30+
*.suo
31+
*.userprefs
32+
*.sln.docstates
33+
.vs/
1134

1235
# VSCode settings
1336
.vscode/
@@ -42,6 +65,8 @@ coverage.xml
4265
# dotenv environment files
4366
.env.local
4467
.env.*
68+
.env
69+
!.env.example
4570

4671
# Ignore generated files and backups
4772
*.orig

.markdownlint.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Markdown linting rules for Tech Notes Hub
2+
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for details
3+
4+
# Default state for all rules
5+
default: true
6+
7+
# MD001 header-increment - Headers should increment by one level at a time
8+
MD001: true
9+
10+
# MD003 header-style - Header style
11+
MD003:
12+
style: "atx" # Use # style headers
13+
14+
# MD004 ul-style - Unordered list style
15+
MD004:
16+
style: "consistent"
17+
18+
# MD007 ul-indent - Unordered list indentation
19+
MD007:
20+
indent: 2 # Use 2 spaces for indentation
21+
22+
# MD009 no-trailing-spaces - No trailing spaces
23+
MD009: true
24+
25+
# MD010 no-hard-tabs - No hard tabs
26+
MD010: true
27+
28+
# MD012 no-multiple-blanks - Multiple consecutive blank lines
29+
MD012:
30+
maximum: 1 # Allow at most 1 blank line
31+
32+
# MD013 line-length - Line length
33+
MD013:
34+
line_length: 120 # Allow longer lines for code blocks
35+
code_blocks: false
36+
tables: false
37+
38+
# MD022 blanks-around-headers - Headers should be surrounded by blank lines
39+
MD022: true
40+
41+
# MD024 no-duplicate-header - Multiple headers with the same content
42+
MD024:
43+
siblings_only: true # Allow same title in different nesting
44+
45+
# MD025 single-title/single-h1 - Only one top-level header
46+
MD025: true
47+
48+
# MD026 no-trailing-punctuation - No trailing punctuation in header
49+
MD026:
50+
punctuation: ".,;:!。,;:!"
51+
52+
# MD029 ol-prefix - Ordered list item prefix
53+
MD029:
54+
style: "one_or_ordered" # Use 1. or ordered numbers
55+
56+
# MD031 blanks-around-fences - Fenced code blocks should be surrounded by blank lines
57+
MD031: true
58+
59+
# MD032 blanks-around-lists - Lists should be surrounded by blank lines
60+
MD032: true
61+
62+
# MD033 no-inline-html - No inline HTML
63+
MD033:
64+
allowed_elements: ["br", "img", "a", "details", "summary"]
65+
66+
# MD034 no-bare-urls - No bare URLs
67+
MD034: true
68+
69+
# MD036 no-emphasis-as-header - No emphasis as header
70+
MD036: true
71+
72+
# MD037 no-space-in-emphasis - No spaces inside emphasis markers
73+
MD037: true
74+
75+
# MD038 no-space-in-code - No spaces inside code span markers
76+
MD038: true
77+
78+
# MD040 fenced-code-language - Fenced code blocks should have a language specified
79+
MD040: true
80+
81+
# MD041 first-line-heading - First line should be a top-level header
82+
MD041: true
83+
84+
# MD046 code-block-style - Code block style
85+
MD046:
86+
style: "fenced" # Use ```code``` style

CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to Tech Notes Hub
22

3-
First of all, thank you for taking the time to contribute! 🎉
3+
First of all, thank you for taking the time to contribute! 🎉
44
Your contributions help make this project more valuable for the developer community.
55

66
## 🚀 Ways to Contribute
@@ -74,14 +74,15 @@ Write clear, meaningful, and understandable commit messages. Suggested structure
7474
- `feature: add notes on HTTP Status Codes`
7575
- `fix: correct typos in design-patterns.md`
7676
- `update: improve binary search examples`
77+
- `refactor: reorganize folder structure`
7778
- `remove: delete duplicate notes in aws folder`
7879
- `docs: add instructions for creating pull requests`
7980

8081
#### 🧠 Additional Tips:
8182

8283
- You can only write in **English**
8384
- **Avoid vague commits** like: `update 1`, `fix bug`, `test`
84-
- If related to an issue, add the number at the end:
85+
- If related to an issue, add the number at the end:
8586
👉 `fix: typo in aws-note #12`
8687

8788
### 5. Commit & Push
@@ -111,9 +112,9 @@ Before submitting, ensure:
111112

112113
## 📁 File & Folder Naming Conventions
113114

114-
* Use lowercase and hyphens for file and folder names: `graph-traversal.md`
115-
* For translations, add language suffix: `graph-traversal_vi.md`
116-
* Notes should be grouped by topic folders (e.g., `algorithms/`, `aws/`, `design-patterns/`)
115+
* Use lowercase and hyphens for file and folder names: `graph_traversal.md` (except for code files like C# using PascalCase such as `GraphTraversal.cs`, or Java using CamelCase like `GraphTraversal.java`)
116+
* For translations, add language suffix: `graph_traversal_vi.md`
117+
* Notes should be grouped by docs folders (e.g., `docs/algorithms/`, `docs/aws/`, `docs/design-patterns/`)
117118

118119
## 🤝 Code of Conduct
119120

0 commit comments

Comments
 (0)