Latest Posts

Go to line number in a file using vim

You want to see line 3842 of file called my_super_long_file.py and you can only access that file using vim. You open the file and to your dismay, by default, vim doesn’t display line numbers. Here are your options:

TIL: docker commit

When I need to create a new custom Docker image, I usually start with a base image (alpine, debian, python, etc, depending on the project), running it in the interactive mode and install the tools and dependencies I will need. Once I get my container the way I want, I create a Dockerfile with all the commands I ran inside my container. It works, but I just learned that this might be unnecessary extra work.

TIL: How to move a line in Vim

For a text like the following:

This is the line I want to move.
This line should be the first line.

In order to move the first line down, in normal mode* (not edit or insert mode), follow these steps:

Remove a commit from history in Git – local and remote

I recently committed an API key to a repository and even worse, I pushed to GitHub before I realized my mistake… 🙁 Removing the key from the code base wouldn’t completely solve my problem since a commit diff would still display my secret key. The solution was to remove that commit from history.

Newer Posts