Viktor Klymentiev
@yondertype
A software developer, formerly startups co-founder & CTO
6 posts

In JS, how to remove all cookies and disable them?

For situations, like, for example, a user withdraws their consent to use cookies, you can delete all existing cookies:

In console, how to stop or remove all Docker containers?

One-liner to stop or remove all of Docker containers:

In Git, how to squash commits?

First, let's find out how many commits need to be squashed into one. This command will show you what commits you have added compared to the master branch:

In Git, how to change the default editor?

As you know, for many specific operations git opens a text editor. On macOS and Linux, this is Vim by default. Not the most beginner-friendly editor I'd say. To make you comfortable, set your favorite editor as the git editor with just one command:

In Elixir, is there a way to determine if a module exists?

You can use Code.ensure_compiled?/1, but there is a side effect: it will also attempt to load the module if it is not already, which may not be desired (depending on the use-case).

Okay, Houston, we've had a problem here

Today I decided to create my own blog to share with you folks some expert advices, tips and tricks I face at my work projects. It wasn't easy. Actually, this is the third attempt to create a blog today. 🤦‍♂️ Something went wrong during previous two tries – my newly created blog has disappeared. Like I never created it before. Hope it doesn't happen again. :)