We are going to secure our Go Microservice with JWT (JSON Web Tokens). We start with a fairly simple Go file, located in pkg/auth/authenticate.go, importing a couple of packages. The most important one is, of course, jwt, because it’ll help us implementing the authentication. Authenticating the user First we need to generate the token, of… Continue reading How to deploy a Go app on AWS Fargate – part 2
How to deploy a Go app on AWS Fargate – part 1
I had this problem. Well, I still have it: one of my clients has a very old app that we are replacing because upgrading it is plain impossible. So we are strangling it as fast as possible. This legacy app is not exposing any API to the outside world, and we don’t want it to:… Continue reading How to deploy a Go app on AWS Fargate – part 1
Should I write tests? Two real life examples
I will have this problem, and you will too. At some point a project will not be your project anymore, but someone else’s. This person will look at your code and say a lot of bad things about you. And it’s very likely that this person will be you in the future. So yes, you… Continue reading Should I write tests? Two real life examples
How to set user and group in Docker Compose
I have this problem: a client’s DevOps is a Mac user, meaning that their Docker works differently on my Linux machine¹. In this case we talk about user and group. When I create a file using Docker (or, in my case, Docker Compose, the logic is the same in general), the file is created with… Continue reading How to set user and group in Docker Compose
How to “Go run” without Go with Docker
I had this quite trivial problem: the version of Go I installed on my pc was quite old. I started learning Go in February 2020 because the CTO of a client firm was thinking of using it to rebuild the app with a language other than PHP. He changed his mind after understanding Go has… Continue reading How to “Go run” without Go with Docker
How to use WordPress as a headless CMS (no frontend)
A client of mine had this problem: they had a very, very old CMS, built in quasi-pure PHP, and quasi-abandoned. Also, part of its codebase was encrypted. It was just garbage. The client asked me to make it more reliable and possibly use it to expand the business’ operations with new services for new customers.… Continue reading How to use WordPress as a headless CMS (no frontend)
How to fix Raspberry Pi: ImportError: Missing required dependencies [‘numpy’]
If pandas fails to import with this error: ImportError: Missing required dependencies [‘numpy’] launch Python Interactive Shell and try: import numpy If you get this error: libf77blas.so.3: cannot open shared object file exit Python Interactive Shell and try: sudo apt-get install libatlas-base-dev It should work now. Else, try uninstall and reinstall numpy and pandas.
Come non far litigare Apache e Node.js
Appunto qui due cose, visto che derivano da vari posti sull’interwebz e magari può servire a qualcun altro (tipo me nel futuro… e anche perché mi dava un connection refused, che ho risolto non sono sicuro come). Ho appena cominciato con Node.js e non vorrei sbattere più volte contro gli stessi muri. Devo creare un… Continue reading Come non far litigare Apache e Node.js
Vedere le dirette RAI in smooth streaming e no direttamente dal portale Rai.tv senza Silverlight
Sperando che questo possa essere l’ultimo articolo della serie, segnalo velocemente questa estensione per Firefox che permette di leggere i canali presenti sul portale Rai.tv sia con la tecnologia Smooth Streaming (ovvero i canali Uno, Due e Tre) che tutti gli altri. Dopo l’installazione, in ogni pagina del portale Rai.tv apparirà, come si vede nell’immagine,… Continue reading Vedere le dirette RAI in smooth streaming e no direttamente dal portale Rai.tv senza Silverlight
Firefox mostra pagine strane, con caratteri cinesi? Facile problema di codifica
Casomai, visitando un sito internet da Firefox, vi capiti di vedere una pagina come quella mostrata (cliccatela per ingrandire), non c’è da preoccuparsi: basta andare nel menu Visualizza, poi in Codifica caratteri → Riconoscimento automatico e selezionare Universale. Il problema dovrebbe risolversi. Spero solo che questa pagina non sia fra quelle che si vedono in… Continue reading Firefox mostra pagine strane, con caratteri cinesi? Facile problema di codifica