xterm forgets configuration

Date Tags xterm

While trying out xterm, I noticed that it forgets its config between reboots. As pointed out on AskUbuntu, the solution is to link .Xresources to .Xdefaults-HOSTNAME

cd ~; ln -s .Xresources .Xdefaults-$(hostname)

Goodbye source/VENV/bin/activate

TL;DR: run pip install --user vex and vex --path venv* $SHELL

I have used python virtual environments for years without caring about its details. I recently had to because of heavy changes to my terminal setup, including the change of shell from the boring bash to fish shell, which ...


Thank you, big screen

Thank you, big 27 inches monitor, for the following:

  1. allowing me to place two PDF documents side by side without having my brain start to interpolate pixels
  2. making Netflix worthwhile
  3. letting me see enemies in videogames from a distance
  4. making me comfortable when using IDEs
  5. making photos look better than ...

Yaml fixture with ManyToManyField in Django

The official docs explain how to set up “natural keys” for easier writing of fixtures.

The things to remember are basically two:

  • setup a models.Manager (write the class with an appropriate get_by_natural_key method and instantiate it in the managed class)
  • the fields used for a natural key must be ...

notes on developing with Cmake projects

Date Tags C++ / cmake


The library provided by your distribution is old and you want to link your program to a more recent version.

Furthermore, I assume both the library you need and your program employ CMake as a build tool.

As an example, I’ll use openbabel for the library, while the ...


PKGBUILD for Avogadro local testing

Since I’m writing some extensions to Avogadro, I find useful having a PKGBUILD for creating a package on Arch Linux.

Here it is

pkgver=$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
arch=('i686' 'x86_64')

prepare() {
  cd "${startdir}"  
  rm -fr pkgbuild ...

Best way to install pathogen bundles

Since I’ve put .vim in a git repo, the best way to install pathogen bundles from github is to add a submodule to the repo; therefore, instead of running

cd ~/.vim/bundle
git clone https://cool-vim-plugin.git

I should run

cd ~/.vim
git submodule add https://cool-vim-plugin.git bundle ...

A messy BTRFS recovery

I wanted to recover a btrfs snapshot. I eventually made it but I encountered a few hiccups.

First of all, given the subvolume scheme I chose, I shouldn’t rely on snapper rollback, explanation here.

Instead, I have to boot from the Arch live USB

loadkeys it
cryptsetup open /dev ...