Move WSL to another drive

Here is a nice instruction how to migrate wsl to another drive.

A couple of nuances:

  1. When you export the image there is no need to define the version of WSL. But for the import you should do it (if you use version 2 for example), by using the version parameter, otherwise, you will get a confusing error about an incorrect parameter.
  2. To define the default user you should use the command that may vary depending on the os version. For example, for Ubuntu 20.04 the command looks like ubuntu 2004, not ubuntu.

Github repositories that help you to prepare for the next interview

Here is the list of general/algo/system design questions:

  1. coding-interview-university
  2. build-your-own-x
  3. tech-interview-handbook
  4. how-to-secure-anything
  5. javascript-algorithms
  6. how-web-works
  7. algorithms-javascript
  8. system-design-primer
  9. awesome-interview-questions
  10. olshansk-interview

Golang 11. learngo

Javascript 12. clean-code-javascript 13. javascript-questions

source

Docker error: error getting credentials

Aaaah! Today I faced a strange error message from docker.

 => ERROR [internal] load metadata for docker.io/library/python:3.8-slim-buster                                                 0.6s
------
 > [internal] load metadata for docker.io/library/python:3.8-slim-buster:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-desktop.exe": executable file not found in $PATH, out: ``

Thanks to Bertrand C for the solution.

    In ~/.docker/config.json change credsStore to credStore

Source

Serve dotfiles directly from a git repository

Here is an interesting article which explains another way to store dotfiles.

In a couple of words:

  1. store dotfiles into a git repository
  2. clone your git repository using a bare more and make working directory pointing to ${HOME}
  3. use dotfiles directly from the repository (without symbolic links)

The only disadvantage is that all dotfiles must be inside one repository. It is not scalable approach in that sense that typically configuration files for the different programs are splitted into multiple repositories. Using multiple repositories helps to effective share particular configurations.

How to fix Lenovo X1 Carbon 8th gen sound problem on Windows 10

If you faced with a sound problem (the sound just disappeared), and nothing helps (general troubleshooting, updating drivers, uninstalling audio devices etc, you can try to install Lenovo drivers.

Unfortunately it is not easy to find exactly this drivers. (the link to them is located at the second page of the corresponding topic at Levono forums)

Source (Lenovo forums page) link Drivers page (especially for 8th gen): link