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 …

automatically activate python virtualenv in pycharm

I slightly modified an answer from stackoverflow to make it work on linux

nano ~/.pycharmrc
if [ -r ".pycharm/term-activate" ]; then
   source ~/.bash_profile
   source ".pycharm/term-activate"
   source $PYCHARM_VENV/bin/activate

On your project folder, assuming you have a virtual environment called venv35,

mkdir .pycharm
nano .pycharm/term-activate

With the content …


CodeBlocks doesn’t start and uses CPU on Manjaro Linux

If I start codeblocks from the terminal, I get the following

[davide@localhost ~]$ codeblocks 
Starting Code::Blocks Release 16.01  rev 10692 Feb  1 2016, 10:34:12 - wx2.8.12 (Linux, unicode) - 64 bit
(codeblocks:6789): Gtk-WARNING **: Theme directory  of theme oxygen has no size field
Initialize EditColourSet .....
Initialize …

eudev rule for yubikey neo

I’m trying to replace systemd/udev with eudev and openrc. One of the problems I’ve found so far is that I can’t use my yubikey for u2f in Google Chrome. I had to modify /etc/udev/rules.d/70-u2f.rules like this

ACTION!="add|change", GOTO="u2f_end …