The Perfect Object Storage

Me: Will this stuff be hosted in AWS? $Customer: No, we are going to host on infrastructure of $PopularTLCOperator! $PopularTLCOperator: Yes, come to us! Me: Fine. Do you have an Object Storage? $PopularTLCOperator: Errr... Nope... In this way I started my review of existing solutions for DIY files storage and management. And of course I began looking for something interoperable with AWS S3 API, the de-facto standard for that kind of activities, supported by the Flysystem abstraction layer included in Laravel. First option: Swift, the object storage included in OpenStack.…

Keep reading

Creative

Given that I'm now an autonomous and independent freelance, I had to choose a logo for myself. I'm not a designer for sure, but I like to try and above all play with Inkscape. Following the many iterations through I worked on, with advices by my wise girlfriend. .............. and the final result.............. As you see, the hammer has been included almost from the beginning: I liked the idea of using a symbol so uncommon in my field of interest (ICT, of course), yet so common in my routine language: "hammering…

Keep reading

WKT to SVG, the Hard Way

I needed an SVG with boundaries of "circoscrizioni" (administrative sub-municipal areas) in Turin (the city in which I live). The only thing I found was a CSV with the coordinates, in WKT format. "No problem, for sure a geo-hacker published some tool to convert the data!", I thought. I was wrong. A lot. The only hint I found, aside installing dedicated geo-applications and import and modify and correct and export random stuffs, was about crunching the informations with a JS library to convert them in GeoJSON, then use another JS…

Keep reading

CryptoLocker vs Photorec

A very short note about a very hot topic: ransomware viruses spreading across the Internet. Some day ago a man bring to me a USB disk infected by one of those malicous applications, asking to recover the many family photos collected there (of course, stored in single copy). I had no way to decrypt encoded files, and little experience with that kind of issues (you know: I use Linux...), the only idea I had has been to pass the disk with photorec, popular and powerful recovery application able to scan…

Keep reading

Cookies from the Dark Side

I spent some hour trying to get Laravel and Varnish live together peacefully, and mixing various sources from the web I obtained some result. The base issue is that Laravel drops a session cookie for every users, even when not authenticated, and this fools any evaluation about pass/hash contents in Varnish. The secondary issue (more related to my own deployment) is that authentication happens via OAuth through another instance, so I cannot just relay on pass'ing POST login requests and replying a doors-opening cookie. Mashing up many ideas and…

Keep reading

ReloadOrRestartUnit

Given that I just spent two hours to write three lines of code, I share here my initial problem and the final solution for those looking for the same thing in the future (including myself). The problem is: in a graphical Python application running as a normal user, obtain authorization to restart a system service. The quick and dirty solution involves the execution of a command starting with gksu, but this method has been discouraged in favor of PolicyKit. So I started looking for PolicyKit documentation. Which lacks any viable…

Keep reading

Hard Style Sleeping

Those who know me, know that I have a big problem with sleeping. That's not I sleep too much (7/8 hours at a time, as most other people) but that's I shift my bedtime at innatural hours. Usually I go to bed at 4:00/500AM, and it is not rare to do it at dawn. Of course, it means to wake up when the people in my nominal timezone finish to lunch. To force me to leave sooner, and unshift the time I get asleep, I recently provided…

Keep reading

Scaffolding GTK+

Aside the usual web-based applications I hack on (mostly for work), a thing I like to do (or at least try to do) is desktop programming with GTK+ framework. For that kind of stuffs I recently switched to Python, in order to be more productive than C (and thanks to the GObject Introspection effort, which provides direct binding to newer features introduced in the Glib stack). But that's not enough to speed up enough development, in particular at startup phase: even in Python, starting a GTK+ application from scratch is…

Keep reading

Implementing OAuth2

I had to implement an OAuth2 server on my application. Easy, with the great oauth-server-laravel module. But on Laravel 5.2 I had some issue in correctly routing the requests. Or, to be more precise, on routing as desired. Required behaviour: use the auth-code flow (already implemented on the client part), but do not display the addictional screen to require confirmation for the access of the client application (as long it is a trusted client, and the only one to have a valid id/secret). More difficult: the routing suggested…

Keep reading

Faster when Switched Off

Due a real-time communication requirement in a project, yesterday I began to dive into "websockets" (more precisely, with Ratchet). And I had the same impression that NoSQL-mania previously gave to me: those "blazing fast new tool!" promises are completely false. Yes, that kind of tool itself is faster for sure. But just as long as they handle a minor level of complexity, lefting you (and your own code) to care about stuffs previously delegated to affordable commodity middleware. Look at NoSQL data bases: impressive speed in writing and reading when…

Keep reading