Plotting a blank graph

On some occasions I need to plot a blank graph, print it, and then fill the point manually. Of course, I’d like to have values on the x-axis, and those are usually dates.

Setting up zsh completions for tools installed via home-manager

A couple of months ago I switched to using home-manager for managing my home folder. Previously, I had a handmade setup, then switched to chezmoi, explored other dotfile managers, but none of them felt right. Except for home-manager, which is simply a great tool. Anyways, recently I found out how I can source all completion functions for the tools managed by the home-manager. First, why is this a problem? Well, when tools are installed via home-manager’s home.

Fixing dreaded "Userland and kernel are not in sync" error

It happened to me several times to encounter the error when jail userland version differs from the kernel version. I thought I was correctly upgrading my jails, yet I was missing something. After the last time, I decided to dig a bit further and finally got a working solution.

Updating SSH storage locations' paths in Arq backup when app doesn't let you

A month or two ago I started using Arq 7 to backup my Mac to my (also recently created) rsync.net account. It was all running smoothly until a couple of days ago when I started seeing error messages about missing files.

Make Outlook the default handler for mailto links on macOS

On many corporate Macs one is forced to use Microsoft Outlook. That in itself is not that bad, but what annoys me is that Outlook doesn’t register itself as a handler for mailto: links. There is simply no option in its preferences to enable it. The official documentation from Microsoft says I should do it via Mail.app. However, the problem is that new Mail.app asks for account creation if there is none.

Getting dovecot to run on Mojave

I’m using great dovecot as a local email server. By local, I mean it runs on my laptop and binds to 127.0.0.1. This way, I have a nice IMAP server hosting most of my emails (my main account is elsewhere) and acting as an archive, which I can access with any email client. In no way I’m left locked into a particular email client or provider. However, little did I notice (since dovecot is mostly for archiving) that my email clients actually don’t connect to it, after one of the upgrades.

Nix and the nix-shell for easily redistributable scripts

In the discussion at lobsters and the article linked in there, I made a comment how one could use Nix and the nix-shell in order to have easily redistributable scripts. This post expands on it.

This site now sports HTTPS

I finally decided it’s the high time to serve the content using HTTPS, otherwise who knows what will be injected in the page as it crosses various nefarious networks. To that end, I decided to move the hosting away from Bluehost and to Hetzner. There were two main reasons to do the switch: Bluehost is based in the US, and I don’t (or want to) have connections with US Bluehost doesn’t offer Let’s Encrypt SSL certificates for the basic hosting – Hetzner does.

Linking JIRA issues back from GitHub

If you’re using JIRA and GitHub, you probably also use GitHub plugin for JIRA, which allows you to link GitHub PRs from JIRA tickets. However, there is nothing that establishes linking in the other direction. Until now, that is…

FreeBSD jails: the bare hands way

Many things have changed since my previous post about FreeBSD jails. Warden seems not that much used, and it’s alternative iocage is deprecated. Hence, based on ideas from this post I ventured on a rewarding way of setting jails manually. Setup exec.start += "/bin/sh /etc/rc"; exec.stop += "/bin/sh /etc/rc.shutdown"; exec.clean; mount.devfs; mount.fdescfs; mount.procfs; allow.raw_sockets = 1; allow.mount; allow.mount.zfs; enforce_statfs = 1; devfs_ruleset = 4; path = "/usr/jails/$name"; # snip torrente { host.

Power of Enums in Java

It comes sporadically that one has to implement a state machine for a project. Be it a benchmarking tool, or an authentication backend, or a Markov chain generator, it boils down to having a variable in one state, moving to another on certain action. In some of the cases, it might be quite useful to probabilisticaly move among states. There are many ways to implement such behaviour, but I found one really elegant, using Enum in Java.

xelatex in Org-mode 8+

Since I’ve switched to spacemacs I started moving more and more of my workflows in Emacs, org-mode specifically. One of my big items (kept in org-mode) is actually moving this blog from markdown to .org format, but that is not the topic of this post. The topic is how to use xelatex from Org-mode’s export, or even more precise, how to be able to switch between different processors per file basis.

Using Warden to setup jails in FreeBSD

This is a guide on installing jails on FreeBSD using Warden. Warden is a new system for managing jails, originating from the PC-BSD project. I switched to Warden after using ezjail for some time. The reason for switch was that ezjail started showing some errors on FreeBSD 10.1, and Warden seems more streamlined.

Protip: Notes in your zsh prompt

I tend to follow good practices. For example, commit certain things in a particular git branch, that should be re-based of another branch that tracks the upstream. However, sometimes I just forget that, especially after not working on that particular code base for a long time, and do a commit in a wrong branch. Git is forgiving, but I wanted more, I wanted to avoid making that mistake in the first place.