Serhat Teker is the software engineer who wrote these articles.
I created this Tech Blog to help me remember the things I’ve learned in the past, so my future-self doesn’t have to re-learn them in the future.
Manage Docker as a non-root user
By default when you install Docker on Linux, you can only access the Docker daemon as the root user, or by using sudo. Since the Docker daemon binds to a Unix socket instead of a TCP port. And by default that Unix socket is owned by the user root.
Yes, typing sudo all the time could be irritating. And sure, there is a solution for this issue but you should be very cautious when using it.
Changing Git Submodule Repository to other URL/Branch
List the details in .gitmodules file $ git config –file=.gitmodules -l This command lists all the submodules present in the current repository with their paths, URL location and the branch which it is mapped in the repository.
Output will be like:
submodule.themes/hugo-coder.path=themes/docker submodule.themes/hugo-coder.url=https://github.com/user/coder.git submodule.themes/hugo-coder.branch=docker Edit the Submodule URL This command will edit the URL of the submodule and will place it with the specified new URL repository.
$ git config –file=.
Git - Adding Submodule
Adding a Submodule to a Git Repository Adding a submodule to your git repository is actually quite simple. For example, if you are in the working directory of the repository, to add a new submodule:
$ git submodule add <git url> git submodule add – This simply tells Git that we are adding a submodule. This syntax will always remain the same. <git url> – This is the external repository that is to be added as a submodule.
How to install virtualenv on Ubuntu 18.04
We may face issues when our Linux distribution only offers certain versions of Python and its packages, when we actually need newer or older versions.
We can install new versions of Python on the server, however this will be more complex because we will have some dependency issues when trying to compile everything we need.
Virtual environments make this very easy to manage and set up, we can have different versions of Python and packages in each environment, and it will be isolated from the main system.