Evilham.com

ZFS replication tools

Introduction

Back when I first started using FreeBSD and ZFS, I needed tools with an extremely low barrier of entry, that did their job well.

When it comes to creating and pruning snapshots, the job was first done by sysutils/zfs-periodic.

Over time however, even with minor improvements on my part, it has come short for my current needs.

As inspired by Dan Langille’s wonderful blog (Dan always writes great blog posts, that end up being lovely complementary documentation), I document here my somewhat bumpy road when it comes to ZFS replication tools and why you might want to use something different at each step.

Read more!

Python: yield, generators and Deferreds

Introducció

El company Pedro està aprenent a fer anar Scrapy i em comenta espontàniament:

una cosa meravellosa d’emacs és que està tot molt ben documentat, i de seguida estàs mirant el codi font còmodament (tant sigui emacs lisp que c); hi ha algun equivalent a python? he intentat això:

(ara m’he posat amb el scrapy tutorial)

12345678910[13:49:28] $ ipython3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: help(yield)
  File "<ipython-input-1-b8899ae5635b>", line 1
    help(yield)
         ^
SyntaxError: invalid syntax

El poc que sé de Scrapy és que és una eina molt potent i que paga la pena aprendre (però encara no hi he tingut ocasió!) i, encara més important: que està escrita en Python, fent servir la llibreria Twisted.

Amb aquesta informació i havent après Twisted fa més anys dels que voldria admetre, entenc immediatament que el dubte darrere la pregunta, no va de yield únicament, sinó de com funciona la programació asíncrona en Twisted.

Anem a fer-hi una ullada, amb l’explicació que a mi m’hagués agradat tenir quan ho aprenia i de pas mirem els generadors!

Read more!

Fixing web pitfalls with Greasemonkey

Introducció

A molts webs, particularment els de les administracions és evident que les coses es dissenyen perquè siguin pràctiques per qui les desenvolupa (teòricament més barat) i no pas per qui les utilitza (major utilitat).

Una cosa que no es coneix gaire, és que molt sovint podem afegir les nostres personalitzacions a sobre per arreglar aquestes pífies.

Aquí veurem un exemple del portal de notes de la Generalitat de Catalunya, es diu Esfer@.

Read more!

FreeBSD: IPv6 in a VNET jail

Introduction

Fellow human @LeJax@bsd.network has been trying to setup IPv6-enabled VNET Jails in FreeBSD.

This, turns out, can be a bit frustrating, because all the tools are there, but the tricks are not widely documented.

In an attempt to fix that, I am going to document all the tricks and sources I have found (and remember) that were necessary until I got a working and reproducible setup. Hopefully this will not only help LeJax, but also it will review my notes and allow them (or someone else) to prepare a nice general-use write up on this topic that might be useful to others.

I use cdist and iocage extensively, but the general tricks should be valid without any or either of those.

Read more!

Rainer Maria Rilke's letter to Friedrich Westhoff

Introduction

Putting this here because of its overall quality, significance and for easy future access.

Read more!