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
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
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
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
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)
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.
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
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
Pare che da quando ha implementato lo smooth streaming per i suoi primi tre canali, la RAI abbia vinto un importante battaglia con gli hacker che cercano di neutralizzare lo schifosissimo Microsoft Silverlight (e la sua implementazione open source e altrettanto schifosissima Novell Moonlight). Io da un po’ di tempo ho il televisore rotto e,… Continue reading Tv sul pc con il decoder USB Afatech AF9015
English abstract: Your webcam works with many programs (aMSN, Camorama…), but Skype? Try to load it with “LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype” (no quotes); your webcam shows dark, wrong, “redshifting” colors? In a terminal enter “sudo apt-get install v4l2ucp” then “v4l2ucp” (no quotes): adjust brightness, contrast, etc. until webcam’s stream “matches” the real world. Dopo l’aggiornamento a Maverick… Continue reading Problemi con Skype e la webcam?