Lorenzo's Blog About me

Latest blog posts about How To

How to prevent your Mac from sleeping in a Makefile

On: 2022-08-12 - Reading Time: 2 Minutes

Often I find myself using third-party software like Caffeine or Amphetamine to keep my Mac awake while running some specific commands. Sometimes it is because I am running backups. Sometimes it is because I am compiling something. I found out that macOS comes pre-installed with caffeinete command… this post is about how to integrate it in your Makefile so that running any command there will prevent your Mac from sleeping!

Continue reading...

My Hugo blog now is fast and light

On: 2022-01-31 - Reading Time: 7 Minutes

This blog post is about what I have changed in my blog and website to make it faster. Recently, I have traveled with a bad airplane company that delayed my luggage. In the hope of getting my belongings back with me, I tried to use their website and support pages, and I was frustrated every time. The primary source of frustration was the website speed. So I decided to spend most of the time without my luggage (around five days), trying to use best practices to improve my website and blog, making my Hugo blog faster and way lighter than before.

Continue reading...

Go tests, multistage docker builds, pipeline

On: 2018-01-06 - Reading Time: 4 Minutes

During the last year I have learned how important it is to build, test and deploy using always the same docker container as well as reducing its size. As I have not found anything online, I want to remember and share it: I am testing my go packages with a multistage docker build inside my pipeline on GitLab. The odd way of testing go docker containers Especially when implementing CI best practices, I have seen projects running tests in different ways:

Continue reading...

Please do not EVER stop learning how to code!

On: 2016-05-14 - Reading Time: 2 Minutes

I remember when I was 10 and my mother was worried about me staying too much in front of the computer, writing lines of weird text on a black and white screen; I used to be one of these boys that were not supported by friends and family, because it was hard to understand computers… πŸ€” but now things have changed, and writing code is cool. I consider myself a 75% self-taught developer, meaning that I have been learning how to write code by myself, a little in school and by working.

Continue reading...

I am running ZeroNet in background on my Mac

On: 2015-10-03 - Reading Time: 2 Minutes

Since when I was little, I always loved peer-to-peer technologies… I even tried to create a GNU/Linux distribution based on that. .. but recently I have discovered a brilliant project that is combining the power of asynchronous cryptography, using Bitcoin private and public keys, with BitTorrent technology. This project is called ZeroNet and it is a new and interesting way to provide websites and real-time services in a p2p network.

Continue reading...

Docker + aliases: I don't install tools on my Mac

On: 2015-04-03 - Reading Time: 2 Minutes

I really care about keeping the OS clean and untouched. Sometimes, when I have to develop using specific softwares and tools, I have to modify core and important sections of the system on my Mac or PC, and this can create some problems with package managers (like homebrew for Mac OS X; or like APT, pacman or yum for GNU/Linux)… For example, few months ago I installed node.js on my Mac using the official package.

Continue reading...

How to use Cache Headers to speed up your website with Django and CloudFlare

On: 2015-02-02 - Reading Time: 3 Minutes

Since I started working at bigger startups, like MinbilDinbil, I had to face the problem of providing pages to a larger amount of users every day. For this reason, it is really important to use a CDN service like CloudFlare, in order to provide a good user experience on our website: we don’t want our clients wait too much to load the homepage! How do we do that? The author of GNU grep once said:

Continue reading...