Théo’s blog
Not groundbreaking stuff here – just practical tech tips and recipes.
-
Power management and Archlinux for the Framework 13 AMD Laptop
The FW13 laptop equipped with a (yet) powerful AMD Ryzen 7 7840U gave me some trouble when running Archlinux. They dropped support for S3 suspend, for some obscure reasons that I won’t debate in this post, and left me only with a broken S2idle consuming over 8W/hour, thus depleting the whole battery in a (long)…
-
Rails 7 and Turbo Streams Subscribed Only to Focused Windows
When using streams to broadcast notifications it happens what it should: notification are broadcasted! Which means all open window that subscribed to the notification channel will get the message. This is most of the time the desired behavior, but not always. In our case, streams are used to notify the user of her last action…
-
Nginx-Ingress Reverse Proxy in Front of an Object Storage for inflexible WebGL and stubborn CORS
Rationale: in an Unity App generating WebGL with remote-assets loading where we have very little control on the generated code, I’m limited to one solution and it’s to comply with CORS: hosting assets in the same domain as the app is running in.In this context it seems indeed impossible to set correctly the crossorigin attribute…
-
Remove VPN/Network from Unify Controller using Command Line
After migrating a site from a self hosted network controller to a new Unify Cloud Key, I found myself in an annoying position: not being able to remove an old VTI VPN (from the previous configuration). The UI just didn’t offer this option like it should and actually does for other networks and VPNs. Searching…
-
A nice nix-shell for Odoo
Since I recently switch to nixos and I’m working with odoo for a project, I had to update my debianesk habits and take what nixos has probably best to offer: an ultra-customized and optimized development environment using nix-shell. This comes at the cost of extra readings and code, but the result offer a great flexibility.…
-
rsnapshot on Qnap with Firmware 4.x
I find that rsync is still the best solution to plan backups of remote hosts (and in general) and rsnapshot is its best companion. This combo enable incremental backups on any sort of device running a decent *nix os. The story with Qnap and community packages is quite long. In a nutshell, the installation of…
-
Thinkpad Carbon X1 1st-3d Gen and Ubuntu 18.04
My dear friend Dirk just bought a second-hand Carbon X1 first generation, just like mine (3448 serie). I thought he might need a quick help to get going with Ubuntu 18.04 and this machine. Note that the content of this tutorial works for the 2nd and 3rd generation (20BS serie) as well. UPDATE(2019-08-18) I just…
-
Rails/Devise authenticating using AWS/Cognito Identity
Background For a while now, I’m developing a sort of IoT controller with Rails 4. Until now, Devise was used to authenticate users locally using the Devise’s provided :database_authenticable module. Things changed recently, and I had to move some features of this IoT controller toward AWS. Authentication against AWS/Cognito Identity is one part of the project. “But Why?” you might…
-
Raspberry Pi 3 and bluetooth speaker setup [command line]
Streaming sound from a Raspberry Pi 3 to a bluetooth speaker was not as easy as it should. Internet is overloaded with outdated information about this issue. So I compiled a small tutorial for the latest Raspbian (at the date of writing). My setup is composed with the following elements: Raspberry Pi 3 (got bluetooth onboard)…
-
Let’s encrypt (il buono), rails (il brutto) and heroku (il cattivo)
This article is just paraphrasing this one with a bit more accuracy, corrections and cynicism. First step: Update your rails code on heroku The route /.well-known/acme-challenge/KEY should be added to your config/routes.rb file like so get ‘/.well-known/acme-challenge/:id’ => ‘CONTROLLER#letsencrypt’ where CONTROLLER is the controller of your choice, in which the method should look like this def letsencrypt…