Hash to Hash

Everyone had to deal at least once with Varnish, knows this: cookies handling may be your nemesis. But I've just found a useful trick, to publish here as future reference. sub vcl_hash { # Common hashing stuffs set req.http.hash = req.url; if (req.http.host) { set req.http.hash = req.http.hash + "#" + req.http.host; } else { set req.http.hash = req.http.hash + "#" + server.ip; } # Stuffing the hash! if (req.http.Cookie ~ "set_or_not_set_cookie_name") { hash_data("set_or_not_set_cookie_name"); } } This is reccomended…

Keep reading

Monthly Report: September 2017

What I've done this month... My Software Projects GASdotto: management application for ethical purchasing groups many fixes on the repository Pioola: accounting tool for feasts and village festivals public release on the repository…

Keep reading

Virtual Billionaire

A few minutes ago I received a mail. I doubled checked for sender and included links looking for a sign of scam, but the message appears to be legit. The mail body (bold is mine): Hello, We periodically audit our metering and billing processes for accuracy. During a recent such audit, we found a rare case where an error condition could cause incomplete processing of a snapshot delete operation. This resulted in ongoing storage charges that were billed to your account. The issue has been resolved and all deletions have…

Keep reading

Reuse: Sounds Good

I like to listen at streaming radios all day long while working and hacking, but I was annoyed by plugging and unplugging the speakers' audio jack from my laptop every time I have to move it. Some time ago I attached speakers to a RaspberryPI, so to obtain an isolated system to play music, but it was inconvenient to interact with it by a SSH connection and I always procrastinated the effort to give RuneAudio a try. Today, inspired by this post on Slashdot, I remembered to have still around…

Keep reading

Monthly Report: August 2017

What I've done this month... My Software Projects GASdotto: management application for ethical purchasing groups many fixes on the repository initial production deploy apress: a simple Twitter scheduler initial release on the repository public instance, freely accessible automail: PHP package for mail autoconfiguration initial release on the repository Composer package My Contents 171 CC-BY photos loaded on my Flickr profile.…

Keep reading

Diving into Laravel Password Reset

Laravel provides out-of-the-box users management, handling authentication, password recovery, authorization and much more. But to work it expects some preconditions, and if you violate those preconditions you have to manually re-wire many things. The precondition I've violated today is that users have not a single associated email address, but many contacts of different types are listed in a different table of the database. This implies that password recovery mechanism has no longer a mail address to which send the reset link, and everything breaks badly. Anyway, hacking around I've been…

Keep reading

Laravel Dynamic Mail Configuration

Use case: from a Laravel application, use a dynamic (database driven) configuration for sending mails. Eventually, different for each user which is actually logged in. Everywhere on the internet you find references to this thread on a forum, raccomanding to load the configuration and create a new Mailer to overwrite the one registered at bootstrap, but it is obsolete: the mentioned share method no longer exists in Laravel 5.4. Probably there is a different way to do the same thing, but I've achieved my goal in easier way: don't…

Keep reading

Semi-Auto Scaling

In those days, I had my first experience with auto-scaling of AWS EC2 instances. And, as everything in AWS, it has been a PITA to give a sense to the many obscure option and possibilities. The main issue with auto-scaling is deploying updates of the software. Due the requirements and the expected flow, and my unwillingness to deal with Ansible, Capistrano or similar devil's tools, I've organized the following setup: a reference instance for each type of server I have to auto-scale the manually inited auto-scaling groups, with related launch…

Keep reading

Next Next Cloud

Recently I've explored options for an "home server", some kind of appliance hosted at home (eventually on a dedicated RaspberryPI) and able to deliver some useful service for daily tasks. Given that the once promising FreedomBox project has become a strongly opinionated selection of random applications, and many other projects have strictly defined use cases (e.g. Kodi and Rune), the most obvious choice is NextCloud. Which indeed is conceived as a cloud application, and lacks some feature for proper home-based usage. So, I've began to implement them by myself…

Keep reading

Social Crawling

Last weekend, having nothing better to do, I'm back on the GNU Social topic and I've implemented and executed a crawler on the network, harvesting some information about users, relationships, and instances. The result is here: a force graph rappresenting the direct connections of the most followed accounts, and a chord of the connections among different instances. The crawler is still running in this moment, and many of the intercepted accounts have to be parsed looking for more connections (and more following accounts, and more connections, and more following accounts.…

Keep reading