A few months ago I got a new computer and I have been very intentional about deciding what I install on it. From past experience I know that computers that are used as a development environment tend to get messy in no time since one might install all kinds of libraries, frameworks, dependencies, you name … Continue reading Developing inside a Docker container
A few years back when I got serious about learning to program to become a software developer, I remember hearing about version control and getting really confused about git and GitHub (one can add GitLab to this list also!). Are they the same thing? Eventually I figured it out but this past week in a … Continue reading Git, GitHub and GitLab. Are they all the same thing?
When I first heard about git bisect I thought it sounded scary and complicated, so I never looked for an opportunity to learn more about it and use it. That's until last week when I ran into a bug in our master branch. I knew that the bug was not there two days before so … Continue reading Find the commit that introduced a bug in your code: how to use git bisect in 7 steps
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 … Continue reading TIL: docker commit
In a large web application, the backend logs can get quite verbose: requests created, sent, processed, received, etc. The list can grow large very quickly depending on how logs are implemented. You can check the logs from a Docker container using docker logs, no need to exec into the container: docker logs <container_id> You can … Continue reading Sending docker container logs to a separate file
I normally don't use many shortcuts because it's easier to just use my arrows and mouse to navigate than to memorize shortcuts but I am slowly realizing that the time spent on learning a new shortcut pays off. However, my memory is not that great and if I try to memorize multiple things at once, … Continue reading Command line shortcuts
NOTE: the steps below assumes you have a Bash shell. If you are using a Unix machine (Mac or Linux) and are not sure what type oh shell you have, it's probably Bash. In most systems, by default, the prompt in the terminal (or command window) displays the hostname and the working directory but this … Continue reading Customize your terminal prompt with colors
Recently I needed to repeat a series of long~ish commands in the command line but I never quite memorized them so I ended up resourcing to arrow-up-arrow-up-arrow-up </ad nauseum> until I found the command I was looking for. But there is a better and super simple way: history Typing history in the command line will … Continue reading Check which commands you typed in the command line and don’t repeat yourself!
I wrote a very simple right-to-the-point Docker introduction post if you're new to Docker. If you want to see your code changes applied right away to a running Docker container, you need to make sure to run the container using the share volumes tag: -v (or --volume). The -v tag expects as a parameter the … Continue reading Docker for development: make local files visible to a container with volume mapping
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. I started writing a post explaining some few basic stuff about Docker but it … Continue reading Docker: most used Docker commands