Kiến Thức Khác Good Proxy vs Bad Proxy Good Proxies Search Google: Yes Cloudflare Pass: Yes https://ipfighter.com/ : clean Bad Proxies: Search Google: No Cloudflare Pass: No https://ipfighter.com/ : Low Score Kiếm ở đâu? Forum, Facebook Group, Google Kinh nghiệm: Hàng custom made vẫn ngon hơn hàng công nghiệp. Cách xác nhận trước khi mua thì xem cty / người này làm bao nhiêu năm rồi? mọi người nói thế nào? mua thử test độ ổn định? Recommendation: Webshare ScrapingAnt Webpack không hổ trợ cross typescript và commonjs Một số plugin lâu đời xài require và không thể chạy typescript với webpack.  Đối với nestjs thì nên disable webpack trong compilerOptions.   FancyZones: Tiện ích giúp bạn organize nhiều window qua nhiều màn hình với shortcut https://learn.microsoft.com/en-us/windows/powertoys/fancyzones Tưởng tượng bạn có 3-4 cái màn hình lớn thì việc sắp xếp nhìn cho gọn các windows là điều không thể không thích được. :) Ngoài ra powertoys còn nhiều tiện ích khác để ứng dụng, mình thích cái shortcuts key của nó ví dụ: WIN + SHIFT + / để hiện ra các shortkeys thông dụng mà mình chưa biết, WIN + ⬆ để maximize window nhỏ, WIN + ⬅ để chuyển window từ màn hình A sang B, ... Sửa lỗi Windows 10 Update Error(0x80070643) Mở power shell với run as adminstrator set-executionpolicy remotesigned Tạo 2 folder 1 và 2 , 1 để file 1.ps1, 2 là folder để backup C:\1 C:\2 Download script để sửa lỗi partition bị giới hạn khi update windows Download script này về folder C:\1 Tạo Folder và Mở Powershell window lên Mở Powershell window as Administrator, cd tới C:\1 cd C:\1 Chạy file script đã download về: .\1.ps1 Lỗi thì xài command sau: powershell.exe -executionpolicy bypass -file .\1.ps1 Nhấn Y để chạy script Khi nó hỏi folder backup là gì thì điền C:\2 C:\2 Nhấn enter rồi đợi và sau đó restart Mở Windows update lên là chạy lại được Troubleshoot Trường hợp link script bị deleted thì vào link này https://paste1.com/3773/raw , copy hết nội dung qua notepad và save với filename: 1.ps1 vào folder C:/1 Kết quả Commands sửa lỗi windows corrupted Nếu đánh xong sfc mà hiện lỗi corrupted file log thì restart lại xong đánh lại , lặp lại bước này cho đến khi không hiện lỗi nữa tru7o1c khi đánh command DISM. sfc /scannow DISM /Online /Cleanup-Image /RestoreHealth Repair lại C++ retro của windows ( vào control panel -> Control Panel\Programs\Programs and Features )   Windows 11 Install va UEFI Bios Utilities Update Check for Win 11 Requirements: WhyNotWin11 Enable Secure Boot Enable TPM 2, TPU II Enable PTT, SR-VIO, IOMMU, Firmware TPM Launch CSM enabled, UEFI ONLY Clean Install, no old apps You need to update bios to the latest version in order for TPU II to work on Windows 11. The problem is windows 11 and bios firmware will check the hardware and software security to avoid china hardware and software products to monitor our activities like bed lamp wifi, phone, camera, smart home things... Phần tôi cài đặt sau khi setup windows 11 Phần mềm trên window: steam wsl lightshot lg hub mpc hc vcl pgadmin postman samsung magician telegram cpu z nextcloud snagit xmind evernote teracopy directx java runtime idm Phần mềm trên Ubuntu 20.4 LTS docker node git Setting up DNS for WSL2  sudo rm /etc/resolv.conf sudo vi /etc/resolv.conf nameserver 192.168.1.11 nameserver 127.0.0.53 options edns0 trust-ad search . 192.168.1.11 la pihole dns sudo chattr +i /etc/resolv.conf sudo vi /etc/wsl.conf [network] generateResolvConf = false generateHosts = true networkingMode=NAT Install Docker curl -s https://raw.githubusercontent.com/karaage0703/ubuntu-setup/master/install-docker.sh | /bin/bash #!/bin/bash # Reference sites # https://qiita.com/gen10nal/items/1e7fe8a1b2e9ad1e7919 # https://docs.docker.com/engine/install/ubuntu/ sudo apt-get update sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get -y install docker-ce docker-ce-cli containerd.io sudo apt-get -y install docker-compose-plugin sudo gpasswd -a $USER docker install curl, npm, nvm , node version, yarn, helm #!/bin/bash sudo apt update sudo apt install git git --version sudo apt install -y curl # install npm sudo apt install npm -y curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash nvm install 20.9.0 npm install -g npm@9.6.7 # install yarn npm install --global yarn # install docker curl -s https://raw.githubusercontent.com/karaage0703/ubuntu-setup/master/install-docker.sh | /bin/bash sudo service docker start # install neovim sudo apt install neovim -y sudo apt install python3-neovim # install fonts sudo apt install unzip wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/JetBrainsMono.zip \ && cd ~/.local/share/fonts \ && unzip JetBrainsMono.zip \ && rm JetBrainsMono.zip \ && fc-cache -fv # install helm curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null sudo apt-get install apt-transport-https --yes echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list sudo apt-get update sudo apt-get install helm Backup WSL2 Folder Projects to Windows Drive & Window Task Scheduler Backup Simple Method 2025: Tạo folder ở một ổ đĩa để backup: ví dụ: E:/backup_wsl tạo 2 file bat và vbs: auto-backup.bat @echo off setlocal enabledelayedexpansion :: Get the current date for /f "tokens=2 delims==" %%i in ('"wmic os get localdatetime /value"') do set datetime=%%i :: Extract year and month set year=!datetime:~0,4! set month=!datetime:~4,2! :: Set the backup file name set backupFile=E:\backup_wsl\ubuntu-%year%-%month%.vhdx :: Run the WSL export command wsl --export Ubuntu-22.04 !backupFile! --vhd echo Backup completed: !backupFile! auto-backup.vbs Dim WinScriptHost Set WinScriptHost = CreateObject("WScript.Shell") WinScriptHost.Run Chr(34) & "E:\backup_wsl\auto-backup.bat" & Chr(34), 0 Set WinScriptHost = Nothing Nhấn Start trên keyboard và search Task Scheduler Tạo một task để theo thời gian và option mong muốn trỏ tới action mở file auto-backup.vbs như hình sau khi ok hết thì thử run task xem có chạy backup ko? Done. Simple Method 2024: robocopy /mir \\wsl.localhost\Ubuntu-22.04\home\son\ F:\backups\son\ Window Task Scheduler Method: backup_kyluat.bat net use o: \\wsl.localhost\Ubuntu-22.04 robocopy /mir o:\home\son\kyluat F:\backups\son\kyluat /R:1 /W:5 /NP /V /XD node_modules /XD "mongo" /XD "redis" /XD "postgres" /XD dist net use o: /delete File này để chạy robocopy và copy vào ổ đĩa physical từ network drive backup_kyluat.vbs Dim WinScriptHost Set WinScriptHost = CreateObject("WScript.Shell") WinScriptHost.Run Chr(34) & "F:\backups\backup_kyluat.bat" & Chr(34), 0 Set WinScriptHost = Nothing File này để cho Window Task chạy ngầm,... đỡ phải hiện ra popup window Tạo trigger action trên window task để mở file backup_kyluat.vbs theo thời gian muốn chạy backup. Sữa lỗi SSH onnection closed by authenticating user root 192.168.1.xxx port 55080 [preauth] Lỗi: Jun 01 00:44:48 rack2 sshd[37416]: Connection closed by authenticating user root 192.168.1.12 port 55080 [preauth] Khi: Bạn xài upsnap và bạn muốn shutdown vm thông qua linux ssh command: sshpass -p password ssh -o "StrictHostKeyChecking=no" user@192.168.1.13 "sudo poweroff" Thêm vào 2 dòng sau vào file ssh_config ở path: nano /etc/ssh/ssh_config UserKnownHostsFile=/dev/null StrictHostKeyChecking=no Sửa lỗi DNS resolve, Port 53 is already in use trên ubuntu và docker Lỗi thường thấy: Error starting userland proxy: listen tcp 0.0.0.0:53: bind: address already in use' Tắt SystemD sau khi cài ubuntu 20 lts sudo systemctl stop systemd-resolved sudo systemctl disable systemd-resolved sửa file:  vi /etc/resolv.conf  thêm vào line nameserver: nameserver 127.0.0.53 nameserver 172.19.0.1 127.0,0,53 là dòng mặc định ( by default ) thêm nameserver 172.19.0.1 ( server này là pihole ) hoặc đơn giản hơn thì để dns nameserver của google hay cloudflare vào ( 8.8.8.8 hoặc 1.1.1.1 ) SOLVED: certbot-dns-cloudflare install fails for Nginx Proxy Manager Problem occurred while configuring cloudflare dns on nginx proxy manager: The Error: Error: Command failed: . /opt/certbot/bin/activate && pip install --no-cache-dir certbot-dns-cloudflare==$(certbot --version | grep -Eo '0-9+') cloudflare && deactivate The 'certbot_dns_cloudflare._internal.dns_cloudflare' plugin errored while loading: No module named 'acme.magic_typing'. You may need to remove or update this plugin. The Certbot log will contain the full error details and this should be reported to the plugin developer. Ask for help or search for solutions at https://community.letsencrypt.org 1. See the logfile /tmp/certbot-log-drz10np0/log or re-run Certbot with -v for more details. ERROR: Could not find a version that satisfies the requirement certbot-dns-cloudflare== ERROR: No matching distribution found for certbot-dns-cloudflare== The Fix: docker ps Use the container id to execute into the terminal of that container: docker exec -it 4f9e14a5d713 /bin/bash Try this: apt update pip3 install certbot-dns-cloudflare==2.11.0 replace 2.11.0 with some other versions that meet the latest version nginx proxy manager Note:  If you have network issue, then you must fix your dns resolve first then continue the steps above. Fix Synology Docker x509: certificate has expired or is not yet valid Fix Synology Docker x509: certificate has expired or is not yet valid sudo cp /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.backup wget --no-check-certificate https://curl.se/ca/cacert.pem sudo mv cacert.pem /etc/ssl/certs/ca-certificates.crt sudo synoservice --restart pkgctl-Docker Ref: https://alexnj.com/blog/updating-root-certificates-on-synology/ How to Copy SSH public keys from Windows to Ubuntu 1. EDIT  Download  cmder  or use your favorite console emulator. Move your public key (id_rsa.pub) and your private key (id_rsa) to  C:\Users\yourUserName\.ssh\  create the .ssh folder if needed. 2. On your windows host via cmder: cp C:\Users\yourUserName\.ssh\id_rsa.pub C:\Users\yourUserName\authorized_keys   3.  On your ubuntu host: service ssh status  Start sshd if necessary   mkdir ~/.ssh/    (if it doesn't already exist) 4.  On your Windows host via cmder: cd C:\Users\yourUserName\ scp authorized_keys login-id@ubuntu-Host-Ip:~/.ssh 5.  On your Ubuntu host: chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys 6.  On your Windows host via cmder: Test if you can ssh into your ubuntu host without login/pw auth. If yes:   rm C:\Users\yourUserName\authorized_keys   Copy File từ ssh server sang Unix Type OS hoặc Windows vào sudo vi /etc/ssh/sshd_config kiếm Compression, chuyển nó thành Compression yes, save lại và restart với sudo service ssh restart vào máy unix local / window local , xài command này: scp -p -C -o "Compression yes" -o "IPQoS throughput" -r username@abc.kyluat.com:/path/to/dir/ /mnt/abc/folder/ đối với windows thì thêm chữ p vào đầu dòng:  pscp.exe username@remoteHost:/remote/dir/file.txt d:\ Open Port 2375 for Docker API Create  daemon.json  file in  /etc/docker : {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]} Add  /etc/systemd/system/docker.service.d/override.conf [Service] ExecStart= ExecStart=/usr/bin/dockerd Reload the systemd daemon: systemctl daemon-reload Restart docker: systemctl restart docker.service firewall ufw allow 2375/tcp ufw reload Quy Luật Hai Mặt Trái Ngược và Bù Trừ Luật game của thế giới Trắng Đen / Yang Yin Thế giới phân biệt: Có Trắng tất nhiên sẽ bao gồm Đen Có Đúng tất nhiên sẽ bao gồm Sai Có Chất Lượng tất nhiên sẽ bao gồm Số Lượng Có Tập Trung tất nhiên sẽ bao gồm Phi Tập Trung Có Lên tất nhiên sẽ bao gồm Xuống Có Kỷ Luật tất nhiền sẽ bao gồm sự khó chịu kiên trì rèn luyện Thay vì chia ra đúng sai thì sử dụng tỷ lệ đúng và tỷ lệ sai. Về số lượng, nếu đúng nhiều hơn sai , đúng thắng Về chất lượng, nếu đúng chất hơn sai và số lượng ít hơn sai, đúng thắng. Nếu sai chất hơn đúng, và sai ít hơn đúng, sai thắng. Dimension: x y , Một cột đi lên, một cột đi ngang. Bên trái cột đi lên là Âm, Bên Phải là Dương. Bên trên cột đi ngang là Dương, Bên dưới cột đi ngang là Âm. Khi mix 2 cột với nhau như thế sẽ tạo ra một Area Âm Hoàn Toàn và Âm Dương Mix, Dương Hoàn Toàn, Âm Dương Mix.  Cái ta phải luôn hướng tới tất nhiên là Dương Hoàn Toàn và điều đó cần các điểm hướng lên (+), và điểm hướng ngang (+). Trong cuộc sống để tích cực hóa vùng Dương Hoàn Toàn thì con người đó phải tích cực hóa hai đường để tạo ra vùng Dương Hoàn Toàn. Trường hợp đi ngang là sự kiên trì lặp đi lặp lại (+), đi lên là một hành động tốt ( tập thể dục ).  Nếu mỗi ngày ta đều tập thể dục và kiên trì giữ trong 10,000 ngày thì mỗi ngày hôm đó ta đều có một điểm dương hoàn toàn. Nếu ta biết kiên trì lặp đi lặp lại một số hành động chất lượng, thì chắc chắn mỗi ngày ta đều tích được những điểm trong vùng Dương Hoàn Toàn.  Một số ví dụ của dimension này: Thể Lực, Chạy Bộ, Bơi Lội và Gym Tình Yêu: Mối liên kết giữa người và người, Đắc Nhân Tâm, Đạo Đức Kỷ năng: chất lượng của một kỷ năng top 1% và giá trị nó đóng góp cho giống loài Ăn Uống Ngủ Nghỉ Thiên Nhiên Sau đây là những ý tưởng cho các activities có thể tạo dopamine, chất vui để tạo một số chất (+) cho cơ thể: Hoạt động Rated Diễn Giải / Ví Dụ Cụ Thể Thời Gian Hoàn Thành Dọn dẹp mỗi buổi sáng 1 Lau chùi bàn ghế, sắp xếp lại bàn làm việc. 15-30 phút Giãn cơ sau khi ngủ dậy, nghỉ ngơi 2 Tập vài động tác giãn cơ cơ bản như chạm mũi chân. 5-10 phút Ăn đồ healthy như trái cây, salad 2 Thưởng thức dâu tây, táo hoặc salad trộn với sốt chanh. 10-20 phút Thử món ăn vặt mới 2 Mua kem vị mới, thử bánh mousse trong tiệm nổi tiếng. 15-30 phút Tìm ra một quán cà phê yên tĩnh, đẹp 3 Khám phá quán có không gian chill với nhạc nhẹ. 1-2 giờ Nghe nhạc mình thích 3 Nghe playlist lofi trong lúc làm việc. 15-60 phút Shower: Hot n Cold 3 Tắm nóng rồi xả nước lạnh để tỉnh táo và sảng khoái. 10-15 phút Dậy sau khi ngủ đủ 3 Ngủ 8 tiếng và cảm thấy tươi mới vào sáng hôm sau. 7-9 giờ Cà phê sữa đá 3 Uống ly cà phê sữa đá vào buổi sáng. 15-30 phút Viết nhật ký hoặc ghi lại cảm xúc 3 Ghi lại những điều đã làm bạn vui trong ngày hôm nay. 10-20 phút Hoàn thành đọc một quyển sách 4 Đọc hết một cuốn tiểu thuyết yêu thích trong 2 tuần. 1-2 tuần Phát hiện ra cái mới, học cái mới 4 Khám phá một ứng dụng tiện ích chưa từng biết. 15-60 phút Học hành cái gì đó mới (ví dụ: Udemy) 4 Hoàn thành khóa học thiết kế web trên Udemy. 2-8 tuần Xài massage đầu, được massage 4 Được massage đầu hoặc vai tại spa. 30-60 phút Cưng chó mèo 4 Vuốt ve mèo cưng và chơi đùa với chúng. 10-30 phút Đi dạo công viên hoặc khu phố mới 4 Tản bộ quanh hồ hoặc con phố chưa từng tới. 30-60 phút Thử liệu pháp mùi hương 4 Dùng nến thơm hoặc tinh dầu bạc hà thư giãn. 15-30 phút Chạy xe vòng vòng dưới ánh sáng 5 Lái xe qua các con phố vào buổi tối mát mẻ. 30-60 phút Xem phim tình cảm, drama, hero type 5 Xem Queen of Tears hoặc một bộ phim cảm động. 2-3 giờ Hoài niệm, kỷ niệm tuổi thơ ào tới 5 Nghe lại bài hát yêu thích thời học sinh. 10-30 phút Ăn món mình thích như món cay, món ngon 5 Thưởng thức lẩu cay hoặc mì ramen yêu thích. 30-60 phút Tạo playlist nhạc yêu thích mới 5 Tổng hợp nhạc chill cho mùa thu. 15-30 phút Tham gia buổi hòa nhạc, nhạc sống 5 Đi xem ban nhạc yêu thích biểu diễn trực tiếp. 2-3 giờ Làm bánh hoặc nấu ăn cùng bạn bè, người thân 6 Làm bánh pizza cùng gia đình vào cuối tuần. 1-2 giờ Tham gia buổi hội thảo hoặc câu lạc bộ 6 Tham gia meetup về coding hoặc đọc sách. 2-4 giờ Chơi đùa cùng bạn bè 6 Tụ tập đá bóng hoặc chơi board game. 1-3 giờ Nhảy nhót, dancing 6 Nhảy trong buổi tiệc hoặc tập nhảy Zumba. 1-2 giờ Thư giãn ở nơi không phải nghĩ ngợi gì 6 Ngồi trên bãi biển chỉ nghe sóng vỗ. 1-3 giờ Chạy bộ dưới ánh sáng 6 Chạy bộ buổi sáng quanh công viên gần nhà. 30-60 phút Bơi lội: Lặn 6 Bơi lội ở hồ bơi hoặc lặn biển. 1-2 giờ Vẽ hoặc sáng tạo nghệ thuật 6 Tự vẽ tranh treo tường hoặc nặn đất sét trang trí. 1-3 giờ Học chơi một nhạc cụ mới 6 Bắt đầu học guitar hoặc piano. 2-12 tháng Trang trí phòng hoặc làm mới không gian sống 6 Sắp xếp lại nội thất phòng khách, trang trí cây xanh. 2-4 giờ Nhận được lời khen từ người lạ 7 Được khen gu ăn mặc hoặc cách cư xử khi gặp người lạ. Ngay lập tức Người ta nhìn thấy mình đẹp, giỏi 7 Được khen vì ngoại hình hoặc kết quả công việc tốt. Ngay lập tức Ba mẹ tự hào 7 Được ba mẹ khen ngợi về thành tích trong công việc. Tùy thời điểm Kiếm tiền 7 Nhận hoa hồng hoặc lợi nhuận từ dự án cá nhân. Hàng tuần/tháng Traffic tăng 7 Website hoặc blog cá nhân có nhiều người truy cập hơn. Hàng tuần/tháng Mua một món hàng giá hời 7 Mua đôi giày yêu thích với giá giảm 50%. Ngay lập tức Tình cảm trai gái 8 Nắm tay, ôm, hoặc hẹn hò cùng người yêu. 1-3 giờ Nghe lời yêu thương ("Anh yêu em",...) 8 Nhận được lời tỏ tình hoặc lời khen tình cảm. Ngay lập tức Video games 8 Chơi game yêu thích và đạt thành tích tốt. 1-4 giờ Tập gym 8 Tập luyện và cảm nhận cơ thể săn chắc hơn. 30-90 phút Hoàn thành việc mình đề ra 8 Đạt mục tiêu hoàn thành dự án trong thời hạn. Vài ngày – vài tháng Đi xem phim với ghệ 8 Cùng người yêu xem phim tại rạp vào cuối tuần. 2-3 giờ Giúp người khác 8 Giúp đỡ ai đó trong lúc họ cần, như sửa xe hỏng. 10-60 phút Lái xe đường dài hoặc đi phượt 8 Chạy xe đến Đà Lạt cùng nhóm bạn. 4-8 giờ Trả nợ xong 9 Thanh toán xong khoản vay và không còn nợ. Nhiều tháng/năm Có một video viral 9 Video đăng trên TikTok đạt hàng triệu lượt xem. 1-2 tuần Tiền tăng 9 Lợi nhuận đầu tư tăng mạnh trong tháng. Hàng tháng/quý Hôn 9 Hôn môi người yêu trong khoảnh khắc lãng mạn. Ngay lập tức Có con 10 Chào đón đứa con đầu lòng. 9 tháng + bbq ngoai troi       Những hành động đó có thể tạo ra dopamine. Sau đây là những thói quen nhỏ nhưng lại mang hiệu quả cao: Ý tưởng Category Thời gian bắt đầu lý tưởng Thời gian hoàn thành Tips phối hợp sau khi hoàn thành Lợi ích sau bao nhiêu ngày Uống 2 lít nước mỗi ngày Sức khỏe Sáng và suốt ngày Cả ngày Đi bộ vài phút sau mỗi lần uống nước 7-10 ngày: Da mịn hơn, cải thiện tiêu hóa. Ngủ đủ 7-8 tiếng Sức khỏe 22:00 - 23:00 6-7 giờ Tập thể dục buổi sáng để khởi đầu năng lượng 3-5 ngày: Giảm mệt mỏi, tăng tập trung. Đứng trước gương và tự khích lệ 3 câu tích cực Sự tự tin Sáng hoặc tối 5 phút Kết hợp thiền hoặc bài tập hít thở 7-10 ngày: Tăng niềm tin vào bản thân. Đi bộ ít nhất 10.000 bước Sức khỏe Sáng hoặc chiều 1-2 tiếng Nghe podcast trong lúc đi bộ 14-21 ngày: Cải thiện tim mạch. Tập yoga 10-15 phút Sức khỏe Sáng hoặc trước khi ngủ 10-15 phút Ngồi thiền sau khi tập yoga 7-14 ngày: Giảm căng thẳng, tăng linh hoạt. Thử làm một việc mới mỗi tuần Sự tự tin Cuối tuần 1-2 giờ Ghi lại cảm nhận vào nhật ký 14-21 ngày: Cải thiện sự tự tin. Đọc sách tài chính cá nhân 30 phút/ngày Tiền tài Sáng hoặc trưa 30 phút Áp dụng vào ngân sách cá nhân 14-21 ngày: Cải thiện hiểu biết tài chính. Ghi lại những thành tựu nhỏ mỗi ngày Sự tự tin Cuối ngày 10 phút Đọc lại hàng tuần để tự khích lệ 10-14 ngày: Tăng cảm giác tích cực. Học cách từ chối những việc không cần thiết Sự tự tin Cả ngày Liên tục Luyện tập thiền chánh niệm 7-10 ngày: Cải thiện sự tự tin và cân bằng. Đọc 1 bài báo về chủ đề mới mỗi ngày Kiến thức Sáng hoặc chiều 15-20 phút Chia sẻ kiến thức với bạn bè 30 ngày: Tăng vốn hiểu biết. Ghi lại 3 điều biết ơn mỗi ngày Sự tự tin Trước khi đi ngủ 5-10 phút Ngồi thiền vài phút để chốt lại cảm xúc 10-14 ngày: Cải thiện tâm trạng. Tập cardio 30 phút mỗi ngày Sức khỏe Sáng hoặc chiều 30 phút Uống EAA và giãn cơ sau tập luyện 7-14 ngày: Cải thiện sức bền. Tham gia lớp học online Kiến thức Cuối tuần 1-2 giờ Thực hành ngay sau khi học 14-30 ngày: Nâng cao kỹ năng. Đầu tư nhỏ (quỹ chỉ số, cổ phiếu) Tiền tài Cuối tuần 30 phút - 1 giờ Theo dõi thị trường hàng tuần 6-12 tháng: Tăng tích lũy tài sản. Tắt đèn khi không sử dụng Tiền tài Cả ngày Liên tục Sử dụng đèn LED 30 ngày: Giảm hóa đơn tiền điện. Viết blog chia sẻ kinh nghiệm Danh vọng Cuối tuần 1-2 giờ Đăng trên LinkedIn hoặc website cá nhân 2-3 tháng: Tạo ảnh hưởng chuyên môn. Tham gia sự kiện kết nối chuyên môn Danh vọng Hàng tháng 1-2 giờ mỗi sự kiện Lưu lại danh bạ 3-6 tháng: Tăng cơ hội nghề nghiệp. Viết thiệp hoặc gửi tin nhắn cảm ơn Mối quan hệ Cuối tuần 10 phút Gọi điện hoặc gặp mặt để thăm hỏi thêm 7-14 ngày: Cải thiện sự gắn bó. Tổ chức bữa ăn cùng bạn bè hoặc gia đình Mối quan hệ Cuối tuần 2-3 giờ Chuẩn bị món ăn yêu thích Ngay lập tức: Tăng kết nối. Chơi với thú cưng Mối quan hệ Chiều hoặc tối 20-30 phút Chụp ảnh hoặc quay video làm kỷ niệm Ngay lập tức: Giảm căng thẳng. Lập kế hoạch cho chuyến đi cuối tuần Sự tự tin và Mối quan hệ Giữa tuần 30 phút - 1 giờ Tham khảo bạn bè 1-2 ngày: Cải thiện tinh thần. Ghi chép chi tiêu hàng ngày Tiền tài Cuối ngày 10 phút Kiểm tra ngân sách hàng tuần 7-14 ngày: Giảm lãng phí. Tham gia nhóm học tập hoặc cộng đồng Kiến thức và Mối quan hệ Cuối tuần 1-2 giờ Ghi chú sau mỗi buổi học 14-30 ngày: Tăng kỹ năng và kết nối. Routing / Open Port WSL2 and Host Machine. Cách routing port từ WSL2 sang local machine và public network. Mở window POWER SHELL của windows với ADMINISTRATOR netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=172.27.237.24 Giải thích:  IP: thay đổi ip address 172.27.237.24 thành ip address của wsl2 ubuntu server PORT: 3000 là port open từ wsl2 qua local machine muốn biết WSL2 Address thì cứ vào networking adapters xem phần VEthernet(WSL) Xem thêm video hướng dẫn nếu cần: https://youtu.be/yCK3easuYm4?si=eB-6vNyp6H18daGJ Để xem port nào đã routing forward thì check: netsh interface portproxy show all Để delete: netsh interface portproxy delete v4tov4 listenport=9001 listenaddress=0.0.0.0 netsh interface portproxy delete v4tov4 listenport=9000 listenaddress=0.0.0.0 netsh interface portproxy delete v4tov4 listenport=3000 listenaddress=0.0.0.0   413 request entity too large cloudflare issues don't use cloudflare if you want to upload files > 100 mb. Unable to access raw githubcontent some program you did install changed the etc/hosts on windows and wsl2 , which point the 0.0.0.0 to raw.githubusercontent.com. you need to remove those line in order to access. VSCode SFTP Config cài sftp và tạo file: sftp.json { "name": "portainer", "host": "portainer.AAA.com", "protocol": "sftp", "port": 22, "username": "KingOfTheNorth", "privateKeyPath": "/home/King/.ssh/id_rsa", "password": "theKingOfTheNorth", "remotePath": "/home/King/docker/homepage", "context": "/home/aaa/homepage/config", "uploadOnSave": true } Context: là local folder path Common Problems with Ubuntu WSL2 Sudo Apt Get Problem: W: https://cloud.r-project.org/bin/linux/ubuntu/xenial-cran35/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.30/deb InRelease: The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project W: Failed to fetch https://pkgs.k8s.io/core:/stable:/v1.30/deb/InRelease The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project W: https://cloud.r-project.org/bin/linux/ubuntu/xenial-cran35/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. E: The repository 'http://apt.kubernetes.io kubernetes-xenial Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.30/deb InRelease: The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project Err:10 https://packages.cloud.google.com/apt kubernetes-xenial Release 404 Not Found [IP: 172.217.194.101 443] Solution: sudo apt-get install -y apt-transport-https ca-certificates curl gpg curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.32/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.32/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.32/deb/ / cd /etc/apt sudo cp trusted.gpg trusted.gpg.d sudo apt-get update   Cài đặt Synology trên Proxmox với Arc Loader Xem video hướng dẫn của TB Playground: https://www.youtube.com/watch?v=nRERez1Y9zs Xài Shell trên máy chủ Proxmox muốn cài đặt. ví dụ: Proxmox Admin Web > Rack2 > Shell > https://github.com/AuxXxilium/arc/releases?q=prerelease%3Afalse&expanded=true Download arc image về máy rack2 > wget https://github.com/AuxXxilium/arc/releases/download/1.5.2/arc-1.5.2-evo.img.zip Cài đặt unzip nếu chưa có:  apt-get install unzip Unzip image file: unzip arc-*.zip Tạo VM với thông số sau OS: Do not use any media DISK: Đổi Bus Device thành SATA, Đổi Size thành 50 GB CORE: 2 min ( để càng nhiều thì cài càng lẹ ) MEMORY: 4GB min ( để càng nhiều cài càng lẹ ) NETWORK: Model đổi thành Intel E1000 Đã tạo xong VM ID: 136 Okay, tiếp tục với phần Proxmox Shell, sau khi unzip xong thì ta sẽ có arc.img. Ta import disk với lệnh sau: qm importdisk 136 arc.img local-lvm Lưu ý: 136 chính là VM ID mà bạn đã tạo trước đó. Rồi vào web Proxmox, để tạo ổ cứng trên VM, mở con VM 136 trên Proxmox Web UI > Hardware > Unused Disk > Bus Device chọn Sata > Add Vào Web UI > VM 136 > Options > Chọn Boot Order > Enable sata1 , Kéo sata 1 lên đầu Cách cài đặt Synology trên máy ảo vm proxmox với ARL Loader Cấu hình: Network sau khi cài: Test với với network của node proxmox host của synology tới synology:  Test với network của VM trong cùng host với synology: Test network từ một VM của Node Proxmox khác tới Synology Cấu hình VM: Cách cài đặt: Search google "arpl release" : https://github.com/fbelavenuto/arpl/releases kéo xuống và note lại link download : arpl-********.img.zip ví dụ: https://github.com/fbelavenuto/arpl/releases/download/v1.1-beta2a/arpl-1.1-beta2a.img.zip link này là link image để tạo boot như usb vậy. tí nữa sau khi cài cấu hình vm thì insert boot disk vào vm. vào proxmox và tạo 1 vm với cấu hình sau: OS: Do not use any media DISK: Bus/Device SATA , 50 GiB min CPU: Cores 8 MEMORY: 8192 MiB NETWORK: Model: Intel E1000 Confirm để tạo VM Tiếp tục, SSH vào Node Proxmox ( Host ) Đánh từng lệnh sau để download booter arpl về host: wget https://github.com/fbelavenuto/arpl/releases/download/v1.1-beta2a/arpl-1.1-beta2a.img.zip Link này là link download ở trong https://github.com/fbelavenuto/arpl/releases Sau khi download xong thì Unzip nó ra với lệnh sau: unzip arpl-1.1-beta2a.img.zip Kế tiếp, qua proxmox web ui xem VM ID vừa tạo, ở đây tôi tạo VM với ID là 138 thì ghi lệnh sau: qm importdisk 138 arpl.img Tiếp tục vào Web UI của Proxmox để config VM 138 đó: Chọn Hardware > Bên dưới có Unused Disk thì double click vào, kiểm tra coi có phải đang xài SATA không, nếu mặc định là SATA thì cứ nhấn ADD/OK vào. Chọn Options > Boot Order > Kéo sata1 dưới cùng lên đầu > check vào checkbox để enable > OK Ok, Done. Xong bước này thì nên clone 1 bản VM ra và convert qua Template để khi nào cần cài thì cứ Clone template đó ra mà cài tiếp. Start VM rồi vào Console để xem IP Address Boot Loader tạo: Ví dụ: http://192.168.1.xxx:7681/ Vào website đó trên trình duyệt: choose model > OK > DS3622xs+    Broadwellnk > OK choose a Build Number > 42962 > OK choose a serial number > Generate a random serial number > OK build the loader > OK Đợi xíu cho nó build xong rồi quay trở lại ... Đợi boot loader load xong rồi quay lại nhấn tiếp  Boot the loader > OK Xong rồi đó, mở 1 tab khác, copy cái link của boot loader menu qua rổi đổi port thành 5000: http://192.168.1.247:7681/ -> http://192.168.1.247:5000/ vào trang này để download file pat về: https://www.synology.com/en-global/support/download/DS3622xs+?version=7.1#system chú ý là DSM 7.1.1 và DS3622xs+ https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_DS3622xs%2B_42962.pat?model=DS3622xs%2B&bays=12&dsm_version=7.1.1&build_number=42962 Filename sẽ giống thế này: DSM_DS3622xs+_42962.pat Click next Check vào I Understand ... và Click vào Continue Đi pha cà phê và đợi cho cài đặt xong thôi ... Device name này để hiển thị xung quanh network. ví dụ nếu đặt synology thì access //synology trên window explorer nó sẽ ra trang website synology. Kế tiếp nhấn Skip... Kế tiếp cứ nhấn submit , khỏi agree . Done nhé Nếu sử dụng mạng lan 10GiB thì shutdown VM rồi chỉnh lại phần network trong hardware tab: Model: VirtIO MTU: 9000 OK start lại VM ... Còn muốn cài đặt perf3 để test thì search google how to install iperf3 on synology [Solved] Nginx Proxy Manager Problems with Cannot Load Certificate Problem 1: nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-32/fullchain.pem": BIO_new_file() failed which mean nginx can't find the file existed. Maybe you have delete it on your web ui. This is a problem of nginx proxy manager :) All you have to do is copy similar npm-xx folder into npm-yy ( yy now is 32 ) sudo su cd /home/user_name/docker/nginx_proxy_manager/letsencrypt Let's navigate to where you have your letsencrypt folder by using those command above. Now go to your check your app docker logs:  Filter the logs with letsencrypt and you will see in realtime which npm-yy is missing.  Use the command below to copy from existing npm-xx to npm-yy: cp -r npm-3 npm-16 After you've made all the npm-yy available, you can visit back to your nginx proxy manager web ui. =]] How to use Custom Nginx Configuration in Nginx Proxy Manager - Advanced Edit Proxy Host? You can pass the ip address so your application can see visitor's ip address: location / { proxy_pass $forward_scheme://$server:$port; # Forward the real IP address of the client proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Forward other useful headers proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; } Install Pihole Node Exporter with this shell script   Change Pihole IP address and Password , then run. nano install-node-exporter.sh Copy and paste into the content, CTRL+X , Enter #!/bin/bash # Define variables PIHOLE_IP="10.0.0.4" # Replace with your Pi-hole IP PIHOLE_PASSWORD="xyz" # Replace with your Pi-hole password SERVICE_FILE="/lib/systemd/system/pihole_exporter.service" # Download the latest version of pihole-exporter wget -c https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-linux-amd64 # Create a directory for pihole-exporter sudo mkdir -p /opt/pihole_exporter # Add a user account to run the service sudo useradd -r pihole_exporter # Move the file to the new directory sudo mv pihole_exporter-linux-amd64 /opt/pihole_exporter/ # Change the group permissions to the new pihole user sudo chgrp pihole_exporter /opt/pihole_exporter sudo chgrp pihole_exporter /opt/pihole_exporter/pihole_exporter-linux-amd64 # Make the binary executable sudo chmod +x /opt/pihole_exporter/pihole_exporter-linux-amd64 # Create a service file for pihole-exporter sudo bash -c "cat > $SERVICE_FILE <:61208 Prometheus metrics at http://:9091/metrics This should work smoothly.  Useful commands: Show log path and version glances -V NextCloud Problem Solutions: No Video Thumbnail Nextcloud: Install Preview Generator This installation guide is tested with Nextcloud up to version 16.x and Preview Generator App up to version 2.x. Tested and working file formats avi, doc, bmp, gif, jpg, md, mkv, mp3, mp4, odp, ods, odt, pdf, png, psd, svg, tif, ttf, txt, xls. Update your system apt upgrade && apt -y update Install the Preview Generator App of the Nextcloud app store:  apps.nextcloud.com/apps/previewgenerator Install LibreOffice apt install libreoffice libreoffice-l10n-de libreoffice-help-de Install ffmpeg, ImageMagick and Ghostscript apt install ffmpeg imagemagick ghostscript Add preview providers Append to  /var/www/nextcloud/config/config.php 'preview_libreoffice_path' => '/usr/bin/libreoffice', 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\TXT', 1 => 'OC\\Preview\\MarkDown', 2 => 'OC\\Preview\\OpenDocument', 3 => 'OC\\Preview\\PDF', 4 => 'OC\\Preview\\MSOffice2003', 5 => 'OC\\Preview\\MSOfficeDoc', 6 => 'OC\\Preview\\Image', 7 => 'OC\\Preview\\Photoshop', 8 => 'OC\\Preview\\TIFF', 9 => 'OC\\Preview\\SVG', 10 => 'OC\\Preview\\Font', 11 => 'OC\\Preview\\MP3', 12 => 'OC\\Preview\\Movie', 13 => 'OC\\Preview\\MKV', 14 => 'OC\\Preview\\MP4', 15 => 'OC\\Preview\\AVI', ), Create .cache folder on ISPConfig servers in the  home directory of virtual host  to prevent unable to create directory '/var/www/clients/client1/web1/.cache/dconf': Operation not permitted. dconf will not work properly Only necessary for for office documents like .ods and .odt. Fix PolicyMap for ImageMagick to prevent  ImagickException: not authorized  error. Necessarry for PDF files. First Run sudo -u www-run php /var/www/nextcloud/occ preview:generate-all -vvv Add Cronjob crontab -u www-run -e */10 * * * * php /var/www/nextcloud/occ preview:pre-generate -vvv My Config file: just for debug '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'password' => '', 'port' => 6379, ), 'upgrade.disable-web' => true, 'instanceid' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'passwordsalt' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'secret' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'trusted_domains' => array ( 0 => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 1 => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', ), 'overwriteprotocol' => 'https', 'overwritehost' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'trustedproxies' => array ( 0 => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 1 => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', ), 'datadirectory' => '/var/www/html/data', 'dbtype' => 'mysql', 'version' => '30.0.6.2', 'overwrite.cli.url' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'dbname' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'dbhost' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'oc_son', 'dbpassword' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'installed' => true, 'maintenance_window_start' => 8, 'mail_from_address' => 'son', 'mail_smtpmode' => 'smtp', 'mail_sendmailmode' => 'smtp', 'mail_domain' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'mail_smtphost' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA', 'mail_smtpport' => '8025', 'default_phone_region' => 'VN', 'maintenance' => false, 'enable_previews' => true, 'preview_libreoffice_path' => '/usr/bin/libreoffice', 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\TXT', 1 => 'OC\\Preview\\MarkDown', 2 => 'OC\\Preview\\OpenDocument', 3 => 'OC\\Preview\\PDF', 4 => 'OC\\Preview\\MSOffice2003', 5 => 'OC\\Preview\\MSOfficeDoc', 6 => 'OC\\Preview\\Image', 7 => 'OC\\Preview\\Photoshop', 8 => 'OC\\Preview\\TIFF', 9 => 'OC\\Preview\\SVG', 10 => 'OC\\Preview\\Font', 11 => 'OC\\Preview\\MP3', 12 => 'OC\\Preview\\Movie', 13 => 'OC\\Preview\\MKV', 14 => 'OC\\Preview\\MP4', 15 => 'OC\\Preview\\AVI', ), ); Tips #1: when using docker you need to login as root or www-data in order to fix the issues with nextcloud: www-data root Tips #2: php occ [COMMAND] Docker Compose config stack for portainer: services: nextcloud: image: nextcloud:stable container_name: nextcloud-stable restart: always environment: MYSQL_PASSWORD: XXXXXXXXXXXXXXXXXXXXXXXXXX MYSQL_DATABASE: BBBBBBBBBBBBBBBBBBBBBBBBBB MYSQL_USER: AAAAAAAAAAAAAAAAAAAAAAAAAAAA MYSQL_HOST: CCCCCCCCCCCCCCCCCCCCCCCCCC REDIS_HOST: DDDDDDDDDDDDDDDDDDDDDDDDDD PUID: 1000 PGID: 1000 TZ: Asia/Ho_Chi_Minh ports: - 8180:80 - 8443:443 volumes: - /mnt/portainer/nextcloud/html:/var/www/html - /mnt/portainer/nextcloud/config://var/www/html/config - /mnt/portainer/nextcloud/custom_apps://var/www/html/custom_apps - /mnt/portainer/nextcloud/data:/var/www/html/data - /mnt/portainer/nextcloud/logs:/var/log/apache2 networks: - nginxproxymanager_default networks: nginxproxymanager_default: external: true i mounted to my nfs volume which link to my synology data storage through nfs Some path to take alook: /etc/apache2/ /var/log/apache2/ looks for logs and ask chatgpt to install required apps for apache and os. eg:  apt update && apt install -y iproute2 apt update && apt install -y fuse ImageMagick: Fix PolicyMap How to fix the error message „ImagickException: not authorized“: ImagickException: not authorized `/tmp/magick-............' @ error/constitute.c/ReadImage/412 vi /etc/ImageMagick-6/policy.xml Change  rights="none"  to  rights="read|write"  for PS, EPI, PDF and XPS Restart services service apache2 restart && service php7.2-fpm restart Nextcloud: Install Crontab apt update && apt install -y cron crontab -e crontab -u www-data -e Add additional folder in home directory of a virtual host ISPConfig sets the immutable bit of a vHost’s home directory, which prevents adding/deleting files or folders there. To add a custom folder, the immutable bit must first be reset, which can only be done as the  root  user. In this example, we want to create the additional folder  .cache  within the home directory. chattr -i /var/www/clients/client1/web1 mkdir /var/www/clients/client1/web1/.cache chown web1:client1 /var/www/clients/client1/web1/.cache chattr +i /var/www/clients/client1/web1 If PHP needs to write to the new folder, add the path to PHP  open_basedir as well. See also https://www.allerstorfer.at/nextcloud-install-preview-generator/ Power Outage Problems and Solutions: UPS NUT SERVER SETUP & WEBNUT UI with Docker We have 1 ups so far. root@rack2:~# lsusb lsusb Bus 002 Device 002: ID 8087:8002 Intel Corp. 8 channel internal hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 413c:a001 Dell Computer Corp. Hub Bus 001 Device 005: ID 051d:0003 American Power Conversion UPS Bus 001 Device 002: ID 8087:800a Intel Corp. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub root@rack2:~# sudo apt install nut nut-client nut-server sudo apt install nut nut-client nut-server root@rack2:~# sudo nut-scanner -U sudo nut-scanner -U Scanning USB bus. [nutdev1]         driver = "usbhid-ups"         port = "auto"         vendorid = "051D"         productid = "0003"         product = "Smart-UPS SRT     FW:UPS 05.3 / ID=1010"         serial = "AS1841190039"         vendor = "American Power Conversion"         bus = "001" root@rack2:~# sudo cp /etc/nut/ups.conf /etc/nut/ups.example.conf sudo cp /etc/nut/ups.conf /etc/nut/ups.example.conf root@rack2:~# sudo nano /etc/nut/ups.conf sudo nano /etc/nut/ups.conf pollinterval = 1 maxretry = 3 [apc-ups]   driver = usbhid-ups   port = auto   desc = "APC Smart-UPS"   vendorid = 051D   productid = 0003   serial = AS1841110039 sudo nano /etc/nut/upsmon.conf RUN_AS_USER root MONITOR apc-ups@localhost 1 admin secret master sudo nano /etc/nut/upsd.conf LISTEN 0.0.0.0 3493  sudo nano /etc/nut/nut.conf MODE=netserver sudo nano /etc/nut/upsd.users [monuser] password = secret admin master root@rack2:~# sudo service nut-server restart root@rack2:~# sudo service nut-client restart root@rack2:~# sudo systemctl restart nut-monitor root@rack2:~# sudo upsdrvctl stop root@rack2:~# sudo upsdrvctl start sudo service nut-server restart sudo service nut-client restart sudo systemctl restart nut-monitor sudo upsdrvctl stop sudo upsdrvctl start root@rack2:~# upsc apc-ups@localhost   upsc apc-ups@localhost  upsc apc-ups@localhost battery.charge Now proceed to install client web ui on other machine: here is the docker compose file: services: nut: image: edgd1er/webnut container_name: webnut environment: - UPS_HOST=your-host.local.lan - UPS_PORT=3493 - UPS_USER=admin - UPS_PASSWORD=secret restart: unless-stopped security_opt: - no-new-privileges:true networks: - nginxproxymanager_default ports: - 6543:6543 networks: nginxproxymanager_default: external: true                         Next step is your programming still with nut client api that you are familiar with like nodejs: Copy MultiThread trên windows robocopy "\\wsl.localhost\Ubuntu-22.04\home\son" "D:\WSL-BACKUP-3-7-2025" /E /MT:128 /R:0 /W:0 /XD .cache node_modules .vscode-remote-containers .vscode-server .yarn /TEE /NP /ZB /NFL /NDL 128 threads ignore các folder: .cache node_modules .vscode-remote-containers .vscode-server .yarn Download Streaming Buffer Video với yt-dlp Open PowerShell winget install --id yt-dlp.yt-dlp Download aria2 để có speed x 2 download: winget install --id=aria2.aria2 -e Best Option: sau khi cài yt dlp, ffmpeg và aria2c thì sử dụng command format sau: yt-dlp --external-downloader aria2c --external-downloader-args "-x 16 -s 16 -k 1M" "VIDEO_URL" ví dụ thực tế, download với highspeed 16 concurrent threads yt-dlp --external-downloader aria2c --external-downloader-args "-x 16 -s 16 -k 1M" "https://southeastasia1-mediap.svc.ms/transform/videomanifest?provider=spo&inputFormat=mp4&cs=fFNQTw&correlationId=7a4a8aa1-e0bc-4000-d0f3-6e134e669b49&docid=https%3A%2F%2Fcaskvietnam-my.sharepoint.com%2Fpersonal%2Fstorageadmin_cask_vn%2F_api%2Fv2.0%2Fdrives%2Fb%21MvyyCCTQ4Eutu3r8U9lOLzEJitllXbdGqZ2NatFHNgke3qPStJtIQ6fu_FviFeA1%2Fitems%2F016FAKD5LOEGBE7TBK35AKQ4AT2XBEMWA6%3Ftempauth%3Dv1.eyJzaXRlaWQiOiIwOGIyZmMzMi1kMDI0LTRiZTAtYWRiYi03YWZjNTNkOTRlMmYiLCJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvY2Fza3ZpZXRuYW0tbXkuc2hhcmVwb2ludC5jb21AZWY2YWNkZTItOGZmZS00NDA5LTgzZWMtYzRiMGNjZDIzNjc2IiwiZXhwIjoiMTc0MTk0MDg3OCJ9.CiMKCXNoYXJpbmdpZBIWNlJLUDdhMWFxVTZ3UlVoQkJBL1c2QQoKCgRzbmlkEgIyORILCPil3-C7qvE9EAUaDDExNS43OC4xLjEwNSIUbWljcm9zb2Z0LnNoYXJlcG9pbnQqLFMyNm5vN1lnR05qT3piT0h5Wnp6Zmc2WE5UMEJBblgwandkSzNGSXNYdnc9MMABOAFCEKGKSnq84ABA0PNuE05mm0lKEGhhc2hlZHByb29mdG9rZW5iBHRydWVyYTBoLmZ8bWVtYmVyc2hpcHx1cm4lM2FzcG8lM2Fhbm9uIzg2OTRkNzI1N2VmOGQ3Y2UxZjE4OTQ2MDEwMzQ5MWM3YzQ0NWUwZjJjN2EwZDU3Y2QwZWQwMDEyZjhkYWFlOWN6ATDCAWEwIy5mfG1lbWJlcnNoaXB8dXJuJTNhc3BvJTNhYW5vbiM4Njk0ZDcyNTdlZjhkN2NlMWYxODk0NjAxMDM0OTFjN2M0NDVlMGYyYzdhMGQ1N2NkMGVkMDAxMmY4ZGFhZTljyAEB.IqjI3hF_qXe43mmy5E7HnpnDha64me5NXjJqlbepTIw%26version%3DPublished&psi=2769b4fc-413e-4874-b32b-14ce8412997e&enhanceAudio=true&cTag=%22c%3A%7B4F82216E-2ACC-40DF-A870-13D5C246581E%7D%2C2%22&action=Access&part=index&format=dash" -o test.mp4 Giải thích từng phần : yt-dlp Đây là công cụ dùng để tải video từ nhiều trang web khác nhau (bao gồm YouTube, Facebook, Twitter, v.v.). --external-downloader aria2c Thay vì để yt-dlp tự tải video, nó sẽ sử dụng aria2c (một công cụ tải đa luồng mạnh mẽ) để tăng tốc độ tải. --external-downloader-args "-x 16 -s 16 -k 1M" Đây là các tham số được truyền cho aria2c : -x 16 : Cho phép tối đa 16 kết nối song song để tải xuống. -s 16 : Sử dụng 16 luồng tải (mỗi luồng lấy một phần của tệp). -k 1M : Kích thước khối tải về là 1 MB . Điều này giúp tối ưu hóa tốc độ tải. "VIDEO_URL" Đây là URL của video mà bạn muốn tải về (trong trường hợp này là một file MP4 DASH từ SharePoint). -o test.mp4 Lưu video với tên test.mp4 . Instruction : F12 on Browser CTRL+R on the page, Click on The Play button look for filter: videomanifest?provider Stop The Play Find "index&format=dash" and remove all after that including & https://southeastasia1-mediap.svc.ms/transform/videomanifest?provider=spo&inputFormat=mp4&cs=fFNQTw&correlationId=e9528aa1-d08e-4000-d0f3-66c30839695e&docid=https%3A%2F%2Fcaskvietnam-my.sharepoint.com%2Fpersonal%2Fstorageadmin_cask_vn%2F_api%2Fv2.0%2Fdrives%2Fb%21MvyyCCTQ4Eutu3r8U9lOLzEJitllXbdGqZ2NatFHNgke3qPStJtIQ6fu_FviFeA1%2Fitems%2F016FAKD5LOEGBE7TBK35AKQ4AT2XBEMWA6%3Ftempauth%3Dv1.eyJzaXRlaWQiOiIwOGIyZmMzMi1kMDI0LTRiZTAtYWRiYi03YWZjNTNkOTRlMmYiLCJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvY2Fza3ZpZXRuYW0tbXkuc2hhcmVwb2ludC5jb21AZWY2YWNkZTItOGZmZS00NDA5LTgzZWMtYzRiMGNjZDIzNjc2IiwiZXhwIjoiMTc0MTk0OTcyMCJ9.CiMKCXNoYXJpbmdpZBIWNlJLUDdhMWFxVTZ3UlVoQkJBL1c2QQoKCgRzbmlkEgIyORILCIKN1MnOr_E9EAUaDDExNS43OC4xLjEwNSIUbWljcm9zb2Z0LnNoYXJlcG9pbnQqLFMyNm5vN1lnR05qT3piT0h5Wnp6Zmc2WE5UMEJBblgwandkSzNGSXNYdnc9MMABOAFCEKGKUumO0ABA0PNmwwg5aV5KEGhhc2hlZHByb29mdG9rZW5iBHRydWVyYTBoLmZ8bWVtYmVyc2hpcHx1cm4lM2FzcG8lM2Fhbm9uIzg2OTRkNzI1N2VmOGQ3Y2UxZjE4OTQ2MDEwMzQ5MWM3YzQ0NWUwZjJjN2EwZDU3Y2QwZWQwMDEyZjhkYWFlOWN6ATDCAWEwIy5mfG1lbWJlcnNoaXB8dXJuJTNhc3BvJTNhYW5vbiM4Njk0ZDcyNTdlZjhkN2NlMWYxODk0NjAxMDM0OTFjN2M0NDVlMGYyYzdhMGQ1N2NkMGVkMDAxMmY4ZGFhZTljyAEB._7Xn98uOvn7JBih7kjlMMpiDBbFsA9BrG1V2dD1DJkk%26version%3DPublished&psi=f3663a6b-84f3-40eb-8432-a282e474ad4f&enhanceAudio=true&cTag=%22c%3A%7B4F82216E-2ACC-40DF-A870-13D5C246581E%7D%2C2%22&action=Access&part=index&format=dash https://cloud.kyluat.com/s/d4daw5nQM8KL3Fo   Copy from the beginning of url to the end. Use the best option above Cloudflare Error 521: Proxmox Host and VM with Web Servers Are Down Cloudflare Error 521: web server is down Things to check: Check Error Logs Check All Services is running ( Nginx, PHP-fpm, mysql ) Check Firewall Forwarding Rules Check Cloudflare DNS Records Check Domain Expired My Host infrastructure:  Host Proxmox pve1 pve1 has firewall rules and Route masquerading NAT which port forwarding port 80 , 443 to the VM 100 The host proxmox has VM 100 VM 100 has firewall rules respond back to the host pve1 Problem 1: Proxmox Host Firewall Rules are Gone after Restart The problem here is when we restart the host proxmox pve1 , all firewall rules has been gone. Solution: ip address of VM 100: 192.168.xxx.3 Port Forwarding  Forward Port For HTTP (Port 80) sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.xxx.3:80 sudo iptables -A FORWARD -p tcp -d 192.168.xxx.3 --dport 80 -j ACCEPT Forward Port for HTTPS ( port 443 ) sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 192.168.xxx.3:443 sudo iptables -A FORWARD -p tcp -d 192.168.xxx.3 --dport 443 -j ACCEPT Allow Traffic on Host: sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT Enable IP Forwarding: To make this change persistent across reboots, edit /etc/sysctl.conf and ensure the following line is uncommented: net.ipv4.ip_forward = 1 apply the changes with sudo sysctl -p Verify the Configuration To check if the port forwarding is working, you can: Try accessing the web service on the host IP (e.g., http://public.ip.address or https://your.public.ip.address). Ensure the VM’s web service is running and listening on the correct ports (80 for HTTP and 443 for HTTPS). Save the iptables Rules If everything works as expected, save your iptables rules to ensure they persist across reboots. For most Linux distributions, you can save the rules with: sudo iptables-save > /etc/iptables/rules.v4 Check again, to see ports are being forwarded to the right vm ip addresses List all  iptables rules including NAT (Network Address Translation) sudo iptables -t nat -L -n -v --line-numbers Check Forward Rules sudo iptables -L FORWARD -n -v --line-numbers Save the current iptables rules sudo iptables-save > /etc/iptables/rules.v4 sudo apt install iptables-persistent sudo netfilter-persistent save sudo systemctl enable netfilter-persistent