How to generate a random int in Golang

  • 27 September 2019
  • ADM

In Golang there a are two libraries for generating random integers, one is a pseudo-random number generator (package math/rand) and the second one is cryptographically secure random number generator (package crypto/rand)


How to trim whitespace from string in Golang

  • 25 September 2019
  • ADM

How to trim (remove) leading and trailing whitespace from string in Golang using the TrimSpace, Trim, TrimLeft, TrimRight methods from strings package.


How to delete the Windows.old folder from Windows 10

  • 30 July 2020
  • ADM

If you recently update your OS to Windows 10, you might notice that you are running out of space. If this is happening it might be because the old version of the Windows is not yet deleted from the disk, it is stored into "Windows.old" folder. And depending on the size of that version, it could be taking a lot of precious space.


How to change DNS settings from command line

  • 18 June 2019
  • ADM

The command line tool used to change the DNS settings is netsh which allows you to configure just about any aspect of your network connections in Windows. In order to use the tool the command line needs to be started as Administrator.


How to change computer's IP address from command line

  • 17 June 2019
  • ADM

The command line tool used to change the IP address is netsh which allows you to configure just about any aspect of your network connections in Windows. In order to use the tool the command line needs to be started as Administrator


How to split a string into slice in Golang

  • 15 May 2019
  • ADM

How to split a string into slice using Golang. For a simple split by a singular character you can use Split() method from strings package. For more complex rules the regexp.Split() method can be used.