Files
docs/site/search/search_index.json
T
2026-08-24 02:30:35 +00:00

1 line
6.9 KiB
JSON

{"config":{"lang":["zh","en"],"separator":"[\\s\\u200b\\u3000\\-\u3001\u3002\uff0c\uff0e\uff1f\uff01\uff1b]+","pipeline":["stemmer"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"\u6b22\u8fce\u6765\u5230\u6587\u6863\u7ad9 \ud83d\udc4b","text":"<p>\u57fa\u4e8e MkDocs + Material \u4e3b\u9898\u6784\u5efa\u7684\u4e2a\u4eba\u77e5\u8bc6\u5e93\uff0c\u5185\u5d4c\u4e8e Gitea \u81ea\u52a8\u90e8\u7f72\u3002</p>"},{"location":"#_2","title":"\u7279\u6027","text":"<ul> <li>:material-search: \u5168\u6587\u641c\u7d22 \u2014 \u4e2d\u82f1\u53cc\u8bed\u641c\u7d22\uff0c\u5373\u65f6\u5efa\u8bae</li> <li> \u660e\u6697\u5207\u6362 \u2014 \u8ddf\u968f\u7cfb\u7edf\u6216\u624b\u52a8\u5207\u6362</li> <li> \u4ee3\u7801\u9ad8\u4eae \u2014 \u4e00\u952e\u590d\u5236\uff0c\u884c\u53f7\u6807\u6ce8</li> <li> Markdown \u7f16\u5199 \u2014 docs-as-code\uff0cGit \u7248\u672c\u7ba1\u7406</li> <li> \u81ea\u52a8\u90e8\u7f72 \u2014 Push \u5230 Gitea \u5373\u4e0a\u7ebf</li> </ul>"},{"location":"#_3","title":"\u5feb\u901f\u5f00\u59cb","text":"<ol> <li>\u5728 <code>docs/</code> \u76ee\u5f55\u4e0b\u65b0\u5efa\u6216\u7f16\u8f91 <code>.md</code> \u6587\u4ef6</li> <li>\u5728 <code>mkdocs.yml</code> \u7684 <code>nav</code> \u4e2d\u6dfb\u52a0\u5bfc\u822a\u6761\u76ee</li> <li>Push \u5230 Gitea \u2192 CI \u81ea\u52a8\u6784\u5efa\u90e8\u7f72</li> </ol> <pre><code># \u672c\u5730\u9884\u89c8\nmkdocs serve\n\n# \u672c\u5730\u6784\u5efa\nmkdocs build\n</code></pre>"},{"location":"dev/","title":"\u5f00\u53d1","text":"<p>\u5f00\u53d1\u76f8\u5173\u7b14\u8bb0\u4e0e\u6587\u6863\u3002</p>"},{"location":"dev/docker-notes/","title":"Docker \u7b14\u8bb0","text":""},{"location":"dev/docker-notes/#_1","title":"\u5e38\u7528\u547d\u4ee4","text":"<pre><code># \u6784\u5efa\u955c\u50cf\ndocker build -t myapp:latest .\n\n# \u8fd0\u884c\u5bb9\u5668\ndocker run -d --name myapp -p 8080:80 myapp:latest\n\n# \u67e5\u770b\u65e5\u5fd7\ndocker logs -f myapp\n\n# \u8fdb\u5165\u5bb9\u5668\ndocker exec -it myapp sh\n\n# \u6e05\u7406\ndocker system prune -f\n</code></pre>"},{"location":"dev/docker-notes/#docker-compose","title":"Docker Compose","text":"<pre><code>services:\n web:\n image: nginx:alpine\n ports:\n - \"80:80\"\n volumes:\n - ./html:/usr/share/nginx/html\n restart: unless-stopped\n</code></pre>"},{"location":"dev/docker-notes/#_2","title":"\u5c0f\u6280\u5de7","text":"<ul> <li>\u7528 <code>--cache-from</code> \u52a0\u901f\u91cd\u590d\u6784\u5efa</li> <li><code>.dockerignore</code> \u6392\u9664 <code>.git</code>\u3001<code>node_modules</code> \u7b49</li> <li>\u591a\u9636\u6bb5\u6784\u5efa\u51cf\u5c0f\u955c\u50cf\u4f53\u79ef</li> </ul>"},{"location":"dev/git-workflow/","title":"Git \u5de5\u4f5c\u6d41","text":""},{"location":"dev/git-workflow/#_1","title":"\u5e38\u7528\u547d\u4ee4","text":"\u547d\u4ee4 \u8bf4\u660e <code>git status</code> \u67e5\u770b\u5de5\u4f5c\u533a\u72b6\u6001 <code>git add -A</code> \u6682\u5b58\u6240\u6709\u53d8\u66f4 <code>git commit -m \"msg\"</code> \u63d0\u4ea4 <code>git push origin main</code> \u63a8\u9001\u5230\u8fdc\u7aef <code>git pull --rebase</code> \u62c9\u53d6\u5e76\u53d8\u57fa <code>git stash</code> \u6682\u5b58\u672a\u63d0\u4ea4\u7684\u6539\u52a8"},{"location":"dev/git-workflow/#_2","title":"\u5206\u652f\u7b56\u7565","text":"<pre><code>main \u2500\u2500\u25cf\u2500\u2500\u25cf\u2500\u2500\u25cf\u2500\u2500\u25cf\u2500\u2500\u25cf\u2500\u2500 (\u751f\u4ea7)\n \\ /\nfeature/xxx \u2500\u2500\u25cf\u2500\u2500\u25cf\u2500\u2500\u25cf\u2500\u2500 (\u529f\u80fd\u5206\u652f)\n</code></pre> <ul> <li><code>main</code> \u5206\u652f\u59cb\u7ec8\u53ef\u90e8\u7f72</li> <li>\u529f\u80fd\u5206\u652f\u4ece <code>main</code> \u62c9\u51fa\uff0c\u5b8c\u6210\u540e Merge Request \u5408\u5165</li> <li>\u5408\u5e76\u524d\u81f3\u5c11\u4e00\u4eba Review</li> </ul>"},{"location":"learn/","title":"\u5b66\u4e60","text":"<p>\u5b66\u4e60\u7b14\u8bb0\u4e0e\u77e5\u8bc6\u6574\u7406\u3002</p>"},{"location":"learn/algorithms/","title":"\u7b97\u6cd5\u7b14\u8bb0","text":""},{"location":"learn/algorithms/#_2","title":"\u6392\u5e8f\u7b97\u6cd5\u5bf9\u6bd4","text":"\u7b97\u6cd5 \u5e73\u5747 \u6700\u574f \u7a7a\u95f4 \u7a33\u5b9a \u5192\u6ce1\u6392\u5e8f O(n\u00b2) O(n\u00b2) O(1) \u2705 \u5feb\u901f\u6392\u5e8f O(n log n) O(n\u00b2) O(log n) \u274c \u5f52\u5e76\u6392\u5e8f O(n log n) O(n log n) O(n) \u2705 \u5806\u6392\u5e8f O(n log n) O(n log n) O(1) \u274c"},{"location":"learn/algorithms/#_3","title":"\u5feb\u901f\u6392\u5e8f\u793a\u4f8b","text":"<pre><code>def quicksort(arr):\n if len(arr) &lt;= 1:\n return arr\n pivot = arr[len(arr) // 2]\n left = [x for x in arr if x &lt; pivot]\n mid = [x for x in arr if x == pivot]\n right = [x for x in arr if x &gt; pivot]\n return quicksort(left) + mid + quicksort(right)\n</code></pre>"},{"location":"learn/algorithms/#_4","title":"\u76f8\u5173\u94fe\u63a5","text":"<ul> <li>\u56fe\u89e3\u7b97\u6cd5\u7ad9 \u2014 \u4ea4\u4e92\u5f0f\u7b97\u6cd5\u5b66\u4e60\u9875\u9762</li> <li>LeetCode \u2014 \u5728\u7ebf\u5237\u9898</li> </ul>"},{"location":"ops/","title":"\u8fd0\u7ef4","text":"<p>\u8fd0\u7ef4\u76f8\u5173\u7b14\u8bb0\u4e0e\u6587\u6863\u3002</p>"},{"location":"ops/linux-commands/","title":"Linux \u5e38\u7528\u547d\u4ee4","text":""},{"location":"ops/linux-commands/#_1","title":"\u6587\u4ef6\u64cd\u4f5c","text":"<pre><code># \u67e5\u627e\u6587\u4ef6\nfind / -name \"*.conf\" 2&gt;/dev/null\n\n# \u78c1\u76d8\u4f7f\u7528\ndu -sh /var/log/*\ndf -h\n\n# \u5b9e\u65f6\u67e5\u770b\u65e5\u5fd7\ntail -f /var/log/syslog\n</code></pre>"},{"location":"ops/linux-commands/#_2","title":"\u8fdb\u7a0b\u7ba1\u7406","text":"<pre><code># \u67e5\u770b\u7aef\u53e3\u5360\u7528\nss -tlnp | grep :80\nlsof -i :80\n\n# \u6740\u6b7b\u8fdb\u7a0b\nkill -9 $(lsof -t -i:80)\n\n# \u67e5\u770b\u8d44\u6e90\u5360\u7528\nhtop\n</code></pre>"},{"location":"ops/linux-commands/#_3","title":"\u7f51\u7edc","text":"<pre><code># \u6d4b\u8bd5\u8fde\u901a\u6027\ncurl -I https://example.com\ntraceroute example.com\n\n# \u9632\u706b\u5899 (ufw)\nufw allow 80/tcp\nufw status\n</code></pre>"},{"location":"ops/nginx-config/","title":"Nginx \u914d\u7f6e","text":""},{"location":"ops/nginx-config/#_1","title":"\u57fa\u672c\u6a21\u677f","text":"<pre><code>server {\n listen 80;\n server_name docs.example.com;\n\n root /usr/share/nginx/html;\n index index.html;\n\n # SPA \u8def\u7531\u56de\u9000\n location / {\n try_files $uri $uri/ /index.html;\n }\n\n # \u9759\u6001\u8d44\u6e90\u7f13\u5b58\n location ~* \\.(js|css|png|jpg|svg|woff2)$ {\n expires 30d;\n add_header Cache-Control \"public, immutable\";\n }\n\n # Gzip \u538b\u7f29\n gzip on;\n gzip_types text/plain text/css application/json application/javascript;\n}\n</code></pre>"},{"location":"ops/nginx-config/#_2","title":"\u5e38\u7528\u64cd\u4f5c","text":"<pre><code># \u6d4b\u8bd5\u914d\u7f6e\nnginx -t\n\n# \u91cd\u65b0\u52a0\u8f7d\uff08\u4e0d\u4e2d\u65ad\u670d\u52a1\uff09\nnginx -s reload\n</code></pre>"}]}