I work as an anthropologist, I play and compose music, I design websites and experiment various things with free software.

On this site you’ll find things about my research, some music I’ve recorded, links to my web projects, and some geeky hacks I’ve found useful.


Latest posts

  • 2020 Affordance to Kill: Sound Agency and Auditory Experiences of a Norwegian Terrorist and American Soldiers in Iraq and Afghanistan

    Transposition. Musique et sciences sociales, Hors-série 2, 2020.  Open access: https://journals.openedition.org/transposition/4065 During the wars in Iraq and Afghanistan, some American soldiers commonly listened to music in order to “motivate” themselves before action. Previous studies have shown that their most frequent choices to this effect pertained to two genres: “gangsta” rap and heavy metal. At another extreme of armed violence, Norwegian terrorist Anders Behring Breivik repo...
  • Properly escape the value of "data-dialog-options" in a Twig template

    Drupal modal dialogs can have various properties set through the data-dialog-options attribute. In fact, this attribute is implemented in the JQuery dialog widget API. One can write for instance <a href="https://my-url" class="edit-button use-ajax" data-dialog-type="dialog" data-dialog-renderer="off_canvas" data-dialog-options="{&quot;width&quot;:400}">Edit</a> This will open mi-url in an off-canvas dialog with a width of 400px. The data-dialog-op...
  • Bash script to open emacsclient with pipe and protocol handlers

    1 The script Based on this script on Emacs Wiki I just added the option tu use as protocol to open urls in the form emacsclient:///path/to/file+linenumber #!/bin/bash args="" nw=false # check if emacsclient is already running if pgrep -U $(id -u) emacsclient > /dev/null; then running=true; fi # check if the user wants TUI mode for arg in "$@"; do if [ "$arg" = "-nw" ] || [ "$arg" = "-t" ] || [ "$arg" = "--tty" ] then nw=true fi done # if called ...