Ubuntu server: Easy Samba Share in Ubuntu Server

Reference link: https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20(Command-line%20interface/Linux%20Terminal)%20-%20Uncomplicated,%20Simple%20and%20Brief%20Way! Use samba server installed on your Ubuntu server allow you to easily share a folder from Ubuntu Linux with other network users. 1. Install Samba Server: sudo apt-get update sudo apt-get install samba 2. Set a password for a user in Samba. This is the user name password combination you will use […]

C#: Passing data to BackgroundWorker DoWork Event

Normally, you call the RunWorkerAsync() without an argument to start the background worker. Sometimes you might want to pass some data into the DoWork() function. All you have to do is simply do: RunWorkerAsync(some data) For example, the following code pass an array of string: string[] list = {"one", "two", "three"}; MyBackgroundWorker1.RunWorkerAsync(List); Then you have […]

Windows: Generate file checksum Hash easily

Windows has a build in command line tool called CertUtil, which allows you to generate a file checksum hash. For exmaple: CertUtil -hashfile [FileName] [Hash Algorithm] [Hash Algorithm] could be: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512 An example command would be: CertUtil -hashfile c:\myfile.txt SHA512. This command line will give you an output of […]