Python’s built-in HTTP server handy one

While building my own Flask application for learning purposes. I was not sure how it was being served on the web. I did not install Apache of any other web server, but it is running on my Digital Ocean test server. The I found out about Python’s built-in HTTP server. This final purpose of this …

Common HTTP response status codes to Understand

Hola! While having a great cup of Caturra coffee from Panama I decided to put together the most common HTTP response status codes in a simple list. HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes: Informational responses (100–199), Successful responses (200–299), Redirects (300–399), Client errors …

Could not set the file size of ./ibtmp1. Probably out of disk space

While having my daily specialty coffee from Latin America I got this error for one of my docker containers running MySQL. ERROR: ‘Could not set the file size of ./ibtmp1’. Suddenly the container failed to start and I could not understand why! I reviewed the logs for my container: docker logs <my_container_name> Something strange ‘Could …

How to display time in Python

I have been using Flask to teach myself some coding and develop a web application for people with high blood pressure to track their daily blood pressure readings. I wanted to find a way to automatically display the time when a user takes a blood pressure reading. It was quite simple. Use strftime() to display …

How to optimize images for the web using GIMP

Optimizing images for the Web means reducing its file size which in turn will make it load faster on websites. Grab some specialty coffee and follow these simple instructions. Reducing the image size with GIMP To reduce the image size: Open image in GIMP. Click on Image in the toolbar, then select Scale Image. In the image size, …

How to restart a service running in docker compose

I’m playing with docker-compose for a test Flask app. My docker-compose.yml looks like this: I noticed any change I made in my files within my templates folder did not take effect when I reloaded the browser locally at localhost:5000 So, I found that I can just restart the ‘www’ service defined on my docker-compose.yml file …

Using .gitignore examples

A .gitignore file is a plain text file where each line contains a pattern for files/directories to ignore. Normally, this is placed in the root directory of your repository. This is the recommended way. The patterns in the .gitignore file are relative to the location of the file. File names Easiest pattern is a literal …

API requests types brief explanation

API is an Application Programming Interface which is a way that allows communication between two applications using a set of rules. While having a great coffee from Bolivia I found the following API requests types. The main Web Service APIs are: SOAP (Simple Object Access Protocol) uses XML to transfer sets of information in the …