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 […]

Connect to a remote MySQL database using Linux terminal

This is simple. After you setup a user with proper access rights run the below commands. # mysql -u yourUser -p -h <yourHostname or IP> A little explanation: -u tells mysql what your username -p tells mysql you have a password and will prompt you to enter it after you press enter -h tells mysql […]

How to run Ansible when Python not installed on Ubuntu EC2

I started an Ubuntu EC2 the other day hoping to run Ansible on it and was surprised that Python was not installed. A requirement for Ansible to run on target machines is to have a modern version of Python. You can just run sudo apt install python but this is not ideal if you need […]

Breaking Up Long Lines in Your Dockerfile

I try to limit my line characters to 79-80 per line. For example check this 122 character multi-command line: RUN wget -O afile.tar.gz && tar -xvf afile.tar.gz -C /usr/src/myapp && rm afile.tar.gz You will need to scroll horizontally using your text editor to see the super long crazy line. This is not efficient and […]