From 95a804e0dadcf3753c5c0bd8ccdeddfddacf5929 Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Mon, 26 Sep 2022 18:29:43 +0800 Subject: [PATCH] vault backup: 2022-09-26 18:29:43 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Affected files: .obsidian/workspace 01. 個人/02. 專注Study/20150803 - Android/Android programming.md 01. 個人/02. 專注Study/20220601 - C++/C++17 1.md 03. 資料收集/01. 架站/01. Nginx Layer4 Reverse Proxy.md 03. 資料收集/Android operating.md 03. 資料收集/DB/MySQL.md 03. 資料收集/DB/sqlite.md 03. 資料收集/NextDNS.md 03. 資料收集/SLAM.md 03. 資料收集/V2Ray.md 03. 資料收集/__templates/blogHeader.md 03. 資料收集/__templates/date.md 03. 資料收集/__templates/front matter.md 03. 資料收集/__templates/note.md 03. 資料收集/__templates/table.md 03. 資料收集/__templates/thisWeek.md 03. 資料收集/__templates/日記.md 03. 資料收集/__templates/讀書筆記.md 03. 資料收集/frp.md 03. 資料收集/youtube-dl.md 03. 資料收集/架站/02. SWAG Reverse proxy.md 03. 資料收集/架站/03. Trojan.md 03. 資料收集/架站/04. Gitea.md 03. 資料收集/架站/Nginx/Reverse Proxy(Layer4).md 03. 資料收集/模型/Traxxas Sledge.md 03. 資料收集/模型/舊化作例.md 03. 資料收集/財經.md 03. 資料收集/軍武/虎式.md 03. 資料收集/面試準備/技术面试最后反问面试官的话.md --- .obsidian/workspace | 24 +-- .../20150803 - Android}/Android programming.md | 0 .../02. 專注Study/20220601 - C++/C++17 1.md | 39 ---- .../01. 架站/01. Nginx Layer4 Reverse Proxy.md | 190 ------------------ 03. 資料收集/Android operating.md | 1 - 03. 資料收集/{ => DB}/MySQL.md | 0 03. 資料收集/{ => DB}/sqlite.md | 0 03. 資料收集/NextDNS.md | 2 - 03. 資料收集/SLAM.md | 1 - 03. 資料收集/V2Ray.md | 1 - .../{99. templates => __templates}/blogHeader.md | 0 .../{99. templates => __templates}/date.md | 0 .../front matter.md | 0 .../{99. templates => __templates}/note.md | 0 .../{99. templates => __templates}/table.md | 0 .../{99. templates => __templates}/thisWeek.md | 0 .../{99. templates => __templates}/日記.md | 0 .../{99. templates => __templates}/讀書筆記.md | 0 03. 資料收集/frp.md | 4 - 03. 資料收集/{Scripts.md => youtube-dl.md} | 0 .../{01. 架站 => 架站}/02. SWAG Reverse proxy.md | 0 03. 資料收集/{01. 架站 => 架站}/03. Trojan.md | 0 03. 資料收集/{01. 架站 => 架站}/04. Gitea.md | 0 .../Nginx/Reverse Proxy(Layer4).md} | 2 +- .../{51. 模型 => 模型}/Traxxas Sledge.md | 0 03. 資料收集/{51. 模型 => 模型}/舊化作例.md | 0 03. 資料收集/財經.md | 3 - 03. 資料收集/{50. 軍武 => 軍武}/虎式.md | 0 .../技术面试最后反问面试官的话.md} | 0 29 files changed, 13 insertions(+), 254 deletions(-) rename {03. 資料收集 => 01. 個人/02. 專注Study/20150803 - Android}/Android programming.md (100%) delete mode 100644 01. 個人/02. 專注Study/20220601 - C++/C++17 1.md delete mode 100644 03. 資料收集/01. 架站/01. Nginx Layer4 Reverse Proxy.md delete mode 100644 03. 資料收集/Android operating.md rename 03. 資料收集/{ => DB}/MySQL.md (100%) rename 03. 資料收集/{ => DB}/sqlite.md (100%) delete mode 100644 03. 資料收集/NextDNS.md delete mode 100644 03. 資料收集/SLAM.md delete mode 100644 03. 資料收集/V2Ray.md rename 03. 資料收集/{99. templates => __templates}/blogHeader.md (100%) rename 03. 資料收集/{99. templates => __templates}/date.md (100%) rename 03. 資料收集/{99. templates => __templates}/front matter.md (100%) rename 03. 資料收集/{99. templates => __templates}/note.md (100%) rename 03. 資料收集/{99. templates => __templates}/table.md (100%) rename 03. 資料收集/{99. templates => __templates}/thisWeek.md (100%) rename 03. 資料收集/{99. templates => __templates}/日記.md (100%) rename 03. 資料收集/{99. templates => __templates}/讀書筆記.md (100%) delete mode 100644 03. 資料收集/frp.md rename 03. 資料收集/{Scripts.md => youtube-dl.md} (100%) rename 03. 資料收集/{01. 架站 => 架站}/02. SWAG Reverse proxy.md (100%) rename 03. 資料收集/{01. 架站 => 架站}/03. Trojan.md (100%) rename 03. 資料收集/{01. 架站 => 架站}/04. Gitea.md (100%) rename 03. 資料收集/{Nginx.md => 架站/Nginx/Reverse Proxy(Layer4).md} (97%) rename 03. 資料收集/{51. 模型 => 模型}/Traxxas Sledge.md (100%) rename 03. 資料收集/{51. 模型 => 模型}/舊化作例.md (100%) delete mode 100644 03. 資料收集/財經.md rename 03. 資料收集/{50. 軍武 => 軍武}/虎式.md (100%) rename 03. 資料收集/{__其他.md => 面試準備/技术面试最后反问面试官的话.md} (100%) diff --git a/.obsidian/workspace b/.obsidian/workspace index 54606a9..8eb39b1 100644 --- a/.obsidian/workspace +++ b/.obsidian/workspace @@ -9,7 +9,7 @@ "state": { "type": "markdown", "state": { - "file": "01. 個人/02. 專注Study/20220601 - C++/C++17 1.md", + "file": "03. 資料收集/面試準備/技术面试最后反问面试官的话.md", "mode": "source", "source": true } @@ -69,7 +69,7 @@ "state": { "type": "backlink", "state": { - "file": "01. 個人/02. 專注Study/20220601 - C++/C++17 1.md", + "file": "03. 資料收集/面試準備/技术面试最后反问面试官的话.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -86,7 +86,7 @@ "state": { "type": "outline", "state": { - "file": "01. 個人/02. 專注Study/20220601 - C++/C++17 1.md" + "file": "03. 資料收集/面試準備/技术面试最后反问面试官的话.md" } } } @@ -116,15 +116,15 @@ }, "active": "f69acad103e7f817", "lastOpenFiles": [ - "03. 資料收集/Scripts.md", + "03. 資料收集/軍武/虎式.md", + "03. 資料收集/架站/02. SWAG Reverse proxy.md", + "03. 資料收集/01. 架站/Nginx/Layer4 Reverse Proxy.md", + "03. 資料收集/架站/Nginx/Reverse Proxy(Layer4).md", + "03. 資料收集/架站/04. Gitea.md", "03. 資料收集/Qt.md", - "03. 資料收集/OpenCV.md", - "03. 資料收集/Obsidian.md", - "03. 資料收集/NextDNS.md", - "03. 資料收集/Tool Setup/vim.md", - "03. 資料收集/vim.md", - "03. 資料收集/WEB Programming.md", - "03. 資料收集/RC.md", - "03. 資料收集/Pelican blog.md" + "03. 資料收集/SLAM.md", + "03. 資料收集/DB/sqlite.md", + "03. 資料收集/Storj.md", + "03. 資料收集/Trojan.md" ] } \ No newline at end of file diff --git a/03. 資料收集/Android programming.md b/01. 個人/02. 專注Study/20150803 - Android/Android programming.md similarity index 100% rename from 03. 資料收集/Android programming.md rename to 01. 個人/02. 專注Study/20150803 - Android/Android programming.md diff --git a/01. 個人/02. 專注Study/20220601 - C++/C++17 1.md b/01. 個人/02. 專注Study/20220601 - C++/C++17 1.md deleted file mode 100644 index 164a4e0..0000000 --- a/01. 個人/02. 專注Study/20220601 - C++/C++17 1.md +++ /dev/null @@ -1,39 +0,0 @@ -- 變數宣告的方式變了 - - Old: `int a = 3;` - - New: `int a {3};` - -- `if`裡面可以宣告變數 - ```cpp - if (auto a {3}; a > b) { - // Do something - } - ``` - -- `unique_ptr`: 無法複製的指標 - - 傳統方法: - ```cpp - unique_ptr buffer = new uint8_t[256]; - ``` - - 新方法: - ```cpp - auto buffer = std::make_unique(256); - ``` -- `share_ptr`: 可以複製,但要避免循環參考問題 - -- 透過refernce傳遞array參數 - - 考慮一個帶有長度的陣列要傳到function裡面,但是又希望在function面可以指定陣列長度 - ```cpp - double value[] { 1.0, 2.0, 3.0 }; // Error! - double value[] { 1.0, 2.0, 3.0, 4.0, 5.0 }; // Pass! - - double average(const double (&array)[5]) { - ... - } - ``` - -- 用 `std::string_view` 代替 `const std::string&`。 - -## Multi-Thread -### 使用`std::async` -- [C++ 使用 Async 非同步函數開發平行化計算程式教學](https://blog.gtwang.org/programming/cpp-11-async-function-parallel-computing-tutorial/) -- [std::atomic](https://en.cppreference.com/w/cpp/atomic/atomic) \ No newline at end of file diff --git a/03. 資料收集/01. 架站/01. Nginx Layer4 Reverse Proxy.md b/03. 資料收集/01. 架站/01. Nginx Layer4 Reverse Proxy.md deleted file mode 100644 index 3bddbc4..0000000 --- a/03. 資料收集/01. 架站/01. Nginx Layer4 Reverse Proxy.md +++ /dev/null @@ -1,190 +0,0 @@ -## docker-compose.yml -```yaml -version: '3' -services: - nginx_reverseproxy_l4: - container_name: nginx - restart: always - image: nginx - ports: - - "80:80" - - "443:443" - volumes: - - ./data:/etc/nginx -``` - -## 準備 -目錄架構如下: -``` -. -├── data -│   ├── mime.types -│   └── nginx.conf -└── docker-compose.yaml -``` - -### nginx.conf -其中`nginx.conf`的內容如下: -``` - -user nginx; -worker_processes 1; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - - -events { - worker_connections 1024; -} - -stream { - map $ssl_preread_server_name $backend_name { - tjn.awin.one trojan; - storj.awin.one swag; - blog.awin.one swag; - gitea.awin.one swag; - } - - # trojan - upstream trojan { - server 192.168.1.31:443; - } - - # swag - upstream swag { - server 192.168.1.20:44320; - } - - - # 监听 443 并开启 ssl_preread - server { - listen 80 reuseport; - listen 443 reuseport; - listen [::]:443 reuseport; - proxy_pass $backend_name; - ssl_preread on; - } -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - #tcp_nopush on; - - keepalive_timeout 65; - - #gzip on; - - include /etc/nginx/conf.d/*.conf; -} -``` - -### mime.types -其中`mime.types`的內容如下: -``` -types { - text/html html htm shtml; - text/css css; - text/xml xml; - image/gif gif; - image/jpeg jpeg jpg; - application/javascript js; - application/atom+xml atom; - application/rss+xml rss; - - text/mathml mml; - text/plain txt; - text/vnd.sun.j2me.app-descriptor jad; - text/vnd.wap.wml wml; - text/x-component htc; - - image/png png; - image/svg+xml svg svgz; - image/tiff tif tiff; - image/vnd.wap.wbmp wbmp; - image/webp webp; - image/x-icon ico; - image/x-jng jng; - image/x-ms-bmp bmp; - - font/woff woff; - font/woff2 woff2; - - application/java-archive jar war ear; - application/json json; - application/mac-binhex40 hqx; - application/msword doc; - application/pdf pdf; - application/postscript ps eps ai; - application/rtf rtf; - application/vnd.apple.mpegurl m3u8; - application/vnd.google-earth.kml+xml kml; - application/vnd.google-earth.kmz kmz; - application/vnd.ms-excel xls; - application/vnd.ms-fontobject eot; - application/vnd.ms-powerpoint ppt; - application/vnd.oasis.opendocument.graphics odg; - application/vnd.oasis.opendocument.presentation odp; - application/vnd.oasis.opendocument.spreadsheet ods; - application/vnd.oasis.opendocument.text odt; - application/vnd.openxmlformats-officedocument.presentationml.presentation - pptx; - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - xlsx; - application/vnd.openxmlformats-officedocument.wordprocessingml.document - docx; - application/vnd.wap.wmlc wmlc; - application/x-7z-compressed 7z; - application/x-cocoa cco; - application/x-java-archive-diff jardiff; - application/x-java-jnlp-file jnlp; - application/x-makeself run; - application/x-perl pl pm; - application/x-pilot prc pdb; - application/x-rar-compressed rar; - application/x-redhat-package-manager rpm; - application/x-sea sea; - application/x-shockwave-flash swf; - application/x-stuffit sit; - application/x-tcl tcl tk; - application/x-x509-ca-cert der pem crt; - application/x-xpinstall xpi; - application/xhtml+xml xhtml; - application/xspf+xml xspf; - application/zip zip; - - application/octet-stream bin exe dll; - application/octet-stream deb; - application/octet-stream dmg; - application/octet-stream iso img; - application/octet-stream msi msp msm; - - audio/midi mid midi kar; - audio/mpeg mp3; - audio/ogg ogg; - audio/x-m4a m4a; - audio/x-realaudio ra; - - video/3gpp 3gpp 3gp; - video/mp2t ts; - video/mp4 mp4; - video/mpeg mpeg mpg; - video/quicktime mov; - video/webm webm; - video/x-flv flv; - video/x-m4v m4v; - video/x-mng mng; - video/x-ms-asf asx asf; - video/x-ms-wmv wmv; - video/x-msvideo avi; -} -``` \ No newline at end of file diff --git a/03. 資料收集/Android operating.md b/03. 資料收集/Android operating.md deleted file mode 100644 index baa313a..0000000 --- a/03. 資料收集/Android operating.md +++ /dev/null @@ -1 +0,0 @@ -- [如何透過 adb command line 指令啟動 Android App](https://kkboxsqa.wordpress.com/2014/08/20/%E5%A6%82%E4%BD%95%E9%80%8F%E9%81%8E-adb-command-line-%E6%8C%87%E4%BB%A4%E5%95%9F%E5%8B%95-android-app/) \ No newline at end of file diff --git a/03. 資料收集/MySQL.md b/03. 資料收集/DB/MySQL.md similarity index 100% rename from 03. 資料收集/MySQL.md rename to 03. 資料收集/DB/MySQL.md diff --git a/03. 資料收集/sqlite.md b/03. 資料收集/DB/sqlite.md similarity index 100% rename from 03. 資料收集/sqlite.md rename to 03. 資料收集/DB/sqlite.md diff --git a/03. 資料收集/NextDNS.md b/03. 資料收集/NextDNS.md deleted file mode 100644 index 0bd9125..0000000 --- a/03. 資料收集/NextDNS.md +++ /dev/null @@ -1,2 +0,0 @@ -DNS服務公司,用途如下: -- [量身打造、100% 客製化抗廣告的 NextDNS - jkgtw's blog](https://www.jkg.tw/p3382/) \ No newline at end of file diff --git a/03. 資料收集/SLAM.md b/03. 資料收集/SLAM.md deleted file mode 100644 index 3deaf50..0000000 --- a/03. 資料收集/SLAM.md +++ /dev/null @@ -1 +0,0 @@ -* [gaoxiang12/slambook](https://github.com/gaoxiang12/slambook) \ No newline at end of file diff --git a/03. 資料收集/V2Ray.md b/03. 資料收集/V2Ray.md deleted file mode 100644 index 279e20f..0000000 --- a/03. 資料收集/V2Ray.md +++ /dev/null @@ -1 +0,0 @@ -- [自建最強科學上網5+:V2Ray + Caddy + Tls + HTTP/2 - 美博園](https://allinfa.com/v2ray-caddy-tls-http2-plus.html) \ No newline at end of file diff --git a/03. 資料收集/99. templates/blogHeader.md b/03. 資料收集/__templates/blogHeader.md similarity index 100% rename from 03. 資料收集/99. templates/blogHeader.md rename to 03. 資料收集/__templates/blogHeader.md diff --git a/03. 資料收集/99. templates/date.md b/03. 資料收集/__templates/date.md similarity index 100% rename from 03. 資料收集/99. templates/date.md rename to 03. 資料收集/__templates/date.md diff --git a/03. 資料收集/99. templates/front matter.md b/03. 資料收集/__templates/front matter.md similarity index 100% rename from 03. 資料收集/99. templates/front matter.md rename to 03. 資料收集/__templates/front matter.md diff --git a/03. 資料收集/99. templates/note.md b/03. 資料收集/__templates/note.md similarity index 100% rename from 03. 資料收集/99. templates/note.md rename to 03. 資料收集/__templates/note.md diff --git a/03. 資料收集/99. templates/table.md b/03. 資料收集/__templates/table.md similarity index 100% rename from 03. 資料收集/99. templates/table.md rename to 03. 資料收集/__templates/table.md diff --git a/03. 資料收集/99. templates/thisWeek.md b/03. 資料收集/__templates/thisWeek.md similarity index 100% rename from 03. 資料收集/99. templates/thisWeek.md rename to 03. 資料收集/__templates/thisWeek.md diff --git a/03. 資料收集/99. templates/日記.md b/03. 資料收集/__templates/日記.md similarity index 100% rename from 03. 資料收集/99. templates/日記.md rename to 03. 資料收集/__templates/日記.md diff --git a/03. 資料收集/99. templates/讀書筆記.md b/03. 資料收集/__templates/讀書筆記.md similarity index 100% rename from 03. 資料收集/99. templates/讀書筆記.md rename to 03. 資料收集/__templates/讀書筆記.md diff --git a/03. 資料收集/frp.md b/03. 資料收集/frp.md deleted file mode 100644 index e14b894..0000000 --- a/03. 資料收集/frp.md +++ /dev/null @@ -1,4 +0,0 @@ -frp是一個可用於內網穿透的高性能的反向代理應用,可以作為兩個內網機器通過公網IP進行橋接的橋樑。通過其支持各種服務和傳輸協議,我們就可以實現一系列遠程控制操作。(frp的 Github 主頁上也用結構圖解釋了具體的工作原理,感興趣的話可以前往了解。) - -- [用开源免费的内网穿透工具 frp,实现远程桌面和文件传输 - 少数派](https://sspai.com/post/60852) - diff --git a/03. 資料收集/Scripts.md b/03. 資料收集/youtube-dl.md similarity index 100% rename from 03. 資料收集/Scripts.md rename to 03. 資料收集/youtube-dl.md diff --git a/03. 資料收集/01. 架站/02. SWAG Reverse proxy.md b/03. 資料收集/架站/02. SWAG Reverse proxy.md similarity index 100% rename from 03. 資料收集/01. 架站/02. SWAG Reverse proxy.md rename to 03. 資料收集/架站/02. SWAG Reverse proxy.md diff --git a/03. 資料收集/01. 架站/03. Trojan.md b/03. 資料收集/架站/03. Trojan.md similarity index 100% rename from 03. 資料收集/01. 架站/03. Trojan.md rename to 03. 資料收集/架站/03. Trojan.md diff --git a/03. 資料收集/01. 架站/04. Gitea.md b/03. 資料收集/架站/04. Gitea.md similarity index 100% rename from 03. 資料收集/01. 架站/04. Gitea.md rename to 03. 資料收集/架站/04. Gitea.md diff --git a/03. 資料收集/Nginx.md b/03. 資料收集/架站/Nginx/Reverse Proxy(Layer4).md similarity index 97% rename from 03. 資料收集/Nginx.md rename to 03. 資料收集/架站/Nginx/Reverse Proxy(Layer4).md index e078169..25d1cf3 100644 --- a/03. 資料收集/Nginx.md +++ b/03. 資料收集/架站/Nginx/Reverse Proxy(Layer4).md @@ -1,5 +1,5 @@ ## Reverse Proxy(Layer4) -[[03. 資料收集/Nginx#Reverse Proxy]]所用的方法雖然可以反向代理多個網站,但是對於像是Trojan這種TLS不行被中斷的服務來說,會導致handshake失敗,所以需要用Nginx的stream來做Layer 4的轉發。 +[[Reverse Proxy(Layer4)#Reverse Proxy]]所用的方法雖然可以反向代理多個網站,但是對於像是Trojan這種TLS不行被中斷的服務來說,會導致handshake失敗,所以需要用Nginx的stream來做Layer 4的轉發。 ### docker-compose.yaml 需要先把`nginx.conf`與`mime.types`給copy到data目錄下。 diff --git a/03. 資料收集/51. 模型/Traxxas Sledge.md b/03. 資料收集/模型/Traxxas Sledge.md similarity index 100% rename from 03. 資料收集/51. 模型/Traxxas Sledge.md rename to 03. 資料收集/模型/Traxxas Sledge.md diff --git a/03. 資料收集/51. 模型/舊化作例.md b/03. 資料收集/模型/舊化作例.md similarity index 100% rename from 03. 資料收集/51. 模型/舊化作例.md rename to 03. 資料收集/模型/舊化作例.md diff --git a/03. 資料收集/財經.md b/03. 資料收集/財經.md deleted file mode 100644 index 4e37f76..0000000 --- a/03. 資料收集/財經.md +++ /dev/null @@ -1,3 +0,0 @@ -- [學財報有用嗎?](https://statementdog.com/blog/archives/85) -- [買雞排懂財務報表](https://statementdog.com/blog/archives/164?utm_source=user_mailer&utm_medium=email&utm_campaign=send_edm) -- [買雞排懂毛利率](https://statementdog.com/blog/archives/268?utm_source=user_mailer&utm_medium=email&utm_campaign=send_edm) \ No newline at end of file diff --git a/03. 資料收集/50. 軍武/虎式.md b/03. 資料收集/軍武/虎式.md similarity index 100% rename from 03. 資料收集/50. 軍武/虎式.md rename to 03. 資料收集/軍武/虎式.md diff --git a/03. 資料收集/__其他.md b/03. 資料收集/面試準備/技术面试最后反问面试官的话.md similarity index 100% rename from 03. 資料收集/__其他.md rename to 03. 資料收集/面試準備/技术面试最后反问面试官的话.md