Posts

  • For a screenful of code

    Or, let’s write kilosized games!

  • How do you return a raw JSON from a Java REST service with Jackson?

    When I write a REST service in Java the framework I use (Spring, usually, but JEE is no different) will properly handle the serialization of your output for you. Sometimes though you already have the result available in JSON format inside a string and you would like to return it as it is. What can we do in such cases ?

  • How to configure FreeDNS in Ubuntu

    This is a post in a serie on how to configure your personal mail server that I started long time ago.

  • A Little Change

    After failing to keep up with Wordpress security issues, the old machine got owned, so I decided to ditch it for Jekyll. I plan to bring back to life the old posts too, but it will take some time since I need to dig into backups and convert the content to markdown.

  • Antispam configuration for Postfix and Dovecot on Ubuntu 16.04

    Alas, it seems that the backup was not including all the post from the old blog. I should have other means to recover the text though, and I plan to restore the post at a later moment

  • Make your personal mail server part 6: Fetchmail

    Alas, it seems that the backup was not including all the post from the old blog. I should have other means to recover the text though, and I plan to restore the post at a later moment

  • Make your personal mail server part 5: Postfix installation

    Alas, it seems that the backup was not including all the post from the old blog. I should have other means to recover the text though, and I plan to restore the post at a later moment

  • Which files have been deduped by ZFS ?

    I am a fan of the ZFS file system because it has a number of features that are difficult to find in a regular filesystem (i.e. not one for expensive storage solutions).

  • Make your personal mail server part 4: Dovecot installation

    This post is the fourth part of a series of post on setting up a mail server for your personal use.

  • Make your personal mail server part 3: Public certificates with Let’s Encrypt

    Alas, it seems that the backup was not including all the post from the old blog. I should have other means to recover the text though, and I plan to restore the post at a later moment

  • Make your personal mail server part 2: external access

    Alas, it seems that the backup was not including all the post from the old blog. I should have other means to recover the text though, and I plan to restore the post at a later moment

  • How to configure ddclient for FreeDNS Dynamic DNS service

    I lost the content for this post while moving my blog from wordpress to jekyll. I will not rewrite the content since now I use a different approach that I consider to be better.

  • Make your personal mail server, Ubuntu edition

    I am one of those persons that like to download and keep my emails on my own machines. This allows me to easily aggregate the many emails I have around, to change provider without the need to move all my emails if I have to, and to keep my emails for myself.

  • Uglifying Angular 1.x with ngAnnotate (and some extra care)

    Alas, it seems that the backup was not including all the post from the old blog. I should have other means to recover the text though, and I plan to restore the post at a later moment

  • Making requests to REST services with Drakma

    Mostly a memo to self :-)

  • Jackson – Deserialization from json to Java enums

    If you program in Java and use jackson as a serialization library, you may have noticed that enums are a bit tricky. By default they are serialized as the name of enum value, but this in some cases one need to proceed in a different way, for example by serializing the underlying numeric value, or by using the toString() method instead of name(). In fact jackson provides many different methods to do so without recurring to custom serializers. The most complete collection of all these methods can be found in jackson’s own enum serialization unit tests.

  • Should I install my JavaScript command-line tools globally ?

    According to Betteridge’s law, the answer should be NO but this time I will surprise everyone with a nice it depends :).

  • JWT Authentication and file downloads

    For a while I have been using JWT (JSON Web Tokens) to handle authentication information about users of webapps. JWT is quite nice (I won’t go into the details, but there are many nice tutorials and guides around), though it makes handling of file downloads a bit more problematic.

  • Dear Node module developers, do not use caret ranges

    I mean it. Bugs will creep in in the most unexpected ways, and they will bite. An example ? A few days ago we started using gulp-watch in the build process of a project in our company where we already used gulp.

  • Member iteration in D: going recursive

    In my previous entry I showed how to iterate the (heterogeneous) list of the members of a class in D. The natural evolution of this is to recursively traverse the whole tree given by an object: member’s members, arrays etc. This in fact would make the algorithm much more interesting and useful for a number of cases, serialization and debugging just to name a couple. It’s not even too hard to do, so I will show the improved version, and a couple of use cases.

  • Compile time reflection and member variables iteration in D

    I’ve been playing with D’s metaprogramming capabilities lately, in particular code generation. Code generation in D is very simple, because one has to explicitly generate a string with the source code and then use the mixin operator to ask the compiler to insert it at the point of compilation. So for example writing mixin("Foo.bar;"); is exactly like writing Foo.bar; . This has the downside that it gives the programmer very little help in writing code the compiles, but is very flexible and avoid the need to use dark magic like it happens with annotations in Java, or template metaprogramming in C++.

  • A strange boot issue on Linux

    I’ve been trying for some time to install a Linux distribution on my old Dell XPS 8100. Since it is not a recent model (no UEFI, no strange hardware) I expected a boring experience but, to my surprise, while the installation went perfectly fine the PC wouldn’t boot and would hang just after showing

  • Upgrade troubles

    A couple of days ago I upgraded a home machine from FreeBSD 8.3 to FreeBSD 9.1. Unexpectedly the machine would refuse to boot, with the kernel unable to find the root partition. In fact, while the disks where detected, the mirror built on top of them was not. Something new was there instead: entries in /dev/raid which I never saw before; where did they come from ?

  • It may work, but it doesn’t mean it is correct

    I wrote some time ago about a simple software of mine that saves entries from RSS feeds as messages in a IMAP store.

  • Threads and packages in Common Lisp

    The Common Lisp standard doesn’t address threads and other SMP related features. These are provided as custom extensions by several lisp implementation, and while there are libraries that offer a common interface to them, some details are not clearly defined. For example, which package will the reader use in a new thread ? In other words, given the following code snipped

  • Windows, Slime and Quicklisp

    A quick memo to self for the next time I’ll need to setup quicklisp in SBCL under windows.

  • Sending feeds to your email

    For a long time I’ve been an user of google reader. It’s a fine reader, but it lacks any ability to filter the news in a custom way.

  • Display images in Slime from Common Lisp

    Sometimes an image is worth more than a thousand words. This is true also for a text editor like Emacs, and in fact, while it’s graphical capabilities are limited, it is pretty easy to insert images in a buffer, and display them. While such capability is used in several modes (org-mode for example, or auctex), I never saw it used in Slime, so I’ll show how can be done with a simple example.

subscribe via RSS