Latest Posts

Map a string in Python with enumerate

Problem: create a map of the letters and indices in a string.

My first approach was to loop over the string using range(len(s)), and checking if the letter exists in the map before adding it:

Docker: most used Docker commands

Docker has been around for a few years but it sounded too complicated and I never knew exactly what problem it was solving. Only recently I learned about it and started using Docker both at work and on my personal projects.

Git: most used git commands

Here’s a list of the git commands I use most often:

git status

when to use it: to know what is the status of the files in your branch. It will show what files have been modified, added, removed, committed, etc. A snapshot of your branch’s current situation. It’s super safe because it doesn’t change anything. It just give you… the status. I git status everything, every time.

Send long terminal output to a log file

There are times when a command line output is too long and it’s hard to scroll through all the lines to see the beginning of the stack trace. This usually happens when you get errors and the best way to fix errors is to read the very first few lines to understand what error message you got and where the error is coming from.

Newer Posts