longwsl@DESKTOP-3NGNNKU:~$ sudo apt-get install p7zip-full
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package p7zip-full is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'p7zip-full' has no installation candidate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function CleanCode(Rng As Range) | |
| Dim strTemp As String | |
| Dim n As Long | |
| For n = 1 To Len(Rng) | |
| Select Case Asc(Mid(UCase(Rng), n, 1)) | |
| Case 48 To 57, 65 To 90 | |
| strTemp = strTemp & Mid(UCase(Rng), n, 1) | |
| End Select | |
| Next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal enableextensions disabledelayedexpansion | |
| (for %%a in (%*) do if exist "%%~a" ( | |
| pushd "%%~dpa" && ( copy /b "%%~nxa"+,, & popd ) | |
| ) else ( | |
| type nul > "%%~fa" | |
| )) >nul 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var WshShell = new ActiveXObject("WScript.Shell"); | |
| WshShell.CurrentDirectory = ".."; | |
| WshShell.RegWrite("HKCU\\Software\\Classes\\Directory\\shell\\open-wsl\\", "Open wsl-terminal Here", "REG_SZ"); | |
| WshShell.RegWrite("HKCU\\Software\\Classes\\Directory\\shell\\open-wsl\\Icon", "\"" + WshShell.CurrentDirectory + "\\open-wsl.exe\"", "REG_SZ"); | |
| WshShell.RegWrite("HKCU\\Software\\Classes\\Directory\\shell\\open-wsl\\command\\" | |
| , "\"" + WshShell.CurrentDirectory + "\\open-wsl.exe\" -W \"%V\"", "REG_SZ"); | |
| WshShell.RegWrite("HKCU\\Software\\Classes\\Directory\\Background\\shell\\open-wsl\\", "Open wsl-terminal Here", "REG_SZ"); | |
| WshShell.RegWrite("HKCU\\Software\\Classes\\Directory\\Background\\shell\\open-wsl\\Icon", "\"" + WshShell.CurrentDirectory + "\\open-wsl.exe\"", "REG_SZ"); | |
| WshShell.RegWrite("HKCU\\Software\\Classes\\Directory\\Background\\shell\\open-wsl\\command\\" |
Bên đội dev web bằng PHP (Wordpress) các thứ thì thường dùng FTP (FTPS/SFTP) để deploy web, asp.net web cũng có thể deploy bằng FTP được, tuy nhiên, với truyền thống eat your own s* của mình, các bạn Microsoft vẫn chế cho Visual Studio 1 phương thức "chính thống" để deploy web đó là Web Deploy, ngoài việc deploy bằng cách "chép file" như các trình deploy trên nền FTP, WebDeploy còn hỗ trợ deploy trực tiếp lên SQL Server trong 1 click, tham khảo link này để biết thêm chi tiết.
Trong bài này mình sẽ hướng dẫn cách deploy cái web đơn giản không có SQL Server trước,
- Dev environment:
- Visual studio 2017
- Code của 1 cái asp.net website đã chạy được :)
- Nếu bạn làm việc ở công ty thì cần: Quyền remote, kết nối được qua port 80, 443, và remote (3389) đến server, nếu làm ở web server cá nhân (thường mở full port) thì không cần care.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Client log | |
| -------------------------------------------------------------------------------- | |
| Status: Connecting to 10.89.252.76:990... | |
| Status: Connection established, initializing TLS... | |
| Status: Verifying certificate... | |
| Status: TLS connection established, waiting for welcome message... | |
| Status: Logged in | |
| Status: Retrieving directory listing... | |
| Status: Disconnected from server | |
| Command: PWD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static object CloneObject(object o) | |
| { | |
| Type t = o.GetType(); | |
| PropertyInfo[] properties = t.GetProperties(); | |
| Object p = t.InvokeMember("", System.Reflection.BindingFlags.CreateInstance, | |
| null, o, null); | |
| foreach (PropertyInfo pi in properties) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| robocopy <SOURCE> <DESTINATION> /E /ZB /Sec:all /dcopy:T /W:3 /R:5 /LOG:c:\robocopy.log /TEE /V | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| robocopy \\SourceServer\Share \\DestinationServer\Share /MIR /FFT /Z /XA:H /W:5 | |