Adding a reminder notification in XFCE systray that I should launch a backup script

I’ve started using borg and borgmatic for backups of my machines. I won’t be using a fully automated backup via a crontab for a start. Instead, I’ve added a recurrent reminder system that will appear on my XFCE desktop to tell me it may be time to do backups.

I’m using yad (a zenity on steroids) to add notifications in the desktop via an anacron.

The notification icon, when clicked, will start a shell script that performs the backups, starting borgmatic.

Here are some bits of my setup :

Continue reading “Adding a reminder notification in XFCE systray that I should launch a backup script”

A review of Virtual Labs virtualization solutions for MOOCs

I’ve just uploaded a new memo A review of Virtual Labs virtualization solutions for MOOCs in the form of a page on my blog, before I eventually publish something more elaborated (and valuated by peer review).

The subtitle is “From Virtual Machines running locally or on IaaS, to containers on a PaaS, up to hypothetical ports of tools to WebAssembly for serverless execution in the Web browser

Excerpt from the intro :

In this memo, we try to draw an overview of some benefits and concerns with existing approaches at using virtualization techniques for running Virtual Labs, as distributions of tools made available for distant learners.

We describe 3 main technical architectures: (1) running Virtual Machine images locally on a virtual machine manager, or (2) displaying the remote execution of similar virtual machines on a IaaS cloud, and (3) the potential of connecting to the remote execution of minimized containers on a remote PaaS cloud.

We then elaborate on some perspectives for locally running ports of applications to the WebAssembly virtual machine of the modern Web browsers.

I hope this will be of some interest for some.

Continue reading “A review of Virtual Labs virtualization solutions for MOOCs”

Safely testing my students’ PHP graded labs with docker containers

During the course of Web architecture and applications, our students had to deliver a Silex / Symfony Web app project which I’m grading.

I had initially hacked a Docker container to be able to test that the course’s lab examples and code bases provided would be compatible with PHP 5 even though the nominal environment provided in the lab rooms was PHP 7. As I’m running a recent Debian distro with PHP 7 as the default PHP installation, being able to run PHP 5 in a container is quite handy for me. Yes, PHP 5 is dead, but some students might still have remaining installs of old Ubuntus where PHP5 was the norm. As the course was based on Symfony and Silex and these would run as well on PHP 5 or 7 (provided we configured the right stuff in the composer.json), this was supposed to be perfect.

I’ve used such a container a lot for preparing the labs and it served me well. Most of the time I’ve used it to start the PHP command line interpreter from the current dir to start the embedded Web server with “php -S”, which is the standard way to run programs in dev/tests environment with Silex or Symfony (yes, Symfony requires something like “php -S localthost:8000 -t web/” maybe).

I’ve later discovered an additional benefit of using such a container, when comes the time to grad the work that our students have submitted, and I need to test their code. Of course, it ensures that I may run it even if they used PHP5 and I rely on PHP 7 on my machine. But it also assures that I’m only at risk of trashing stuff in the current directory if sh*t happens. Of course, no student would dare deliver malicious PHP code trying to mess with my files… but better safe than sorry. If the contents of the container is trashed, I’m rather on the safe side.

Of course one may give a grade only by reading the students’ code and not testing, but that would be bad taste. And yes, there are probably ways to escape the container safety net in PHP… but I sould maybe not tempt the smartest students of mine in continuing on this path 😉

If you feel like testing the container, I’ve uploaded the necessary bits to a public repo :

Conférence sur SoftwareHeritage par Roberto Di Cosmo

Nous avons eu le plaisir d’accueillir le 7/11/2017 Roberto Di Cosmo pour présenter le projet Software Heritage à Télécom SudParis, dans le cadre d’un séminaire du laboratoire Samovar.

La conférence de Roberto a été enregistrée. Les transparents sont disponibles en PDF. Voici la vidéo ci-dessous (ou en MP4 depuis l’archive de Software heritage):

Merci encore à Roberto et à toute l’équipe du projet.

Revealing “hidden” section in org-mode doc exported to HTML

Here, I’ll describe how to include a “hidden” section, in a HTML document exported from org-mode which uses org-info.js.

The section isn’t displayed at page load, and only revealed once the ‘n’ letter is pressed (accessing next section).

The trick is to have a section with an empty headline, with no headlines numbering, containing a <div> whose class is for instance myhidden the :

#+options: num:nil
*         <---- this line contains unbreakable space C-x 8 SPC
#+HTML: <div class="myhidden">


#+HTML: </div> <!-- .myhidden -->

The div will be hidden, cause we tell the CSS to hide it :

#+HTML_HEAD_EXTRA: <style> 
#+HTML_HEAD_EXTRA: .myhidden {display: none; visibility:hidden;}
#+HTML_HEAD_EXTRA: </style>

The document uses the org-info.js :

#+INFOJS_OPT: view:showall toc:nil buttons:nil

Then, I’m adding a hook, for handling the next page display, which
will switch the visibility :

#+HTML_HEAD_EXTRA: <script type="text/javascript">
#+HTML_HEAD_EXTRA: function toggle_visibility() {
#+HTML_HEAD_EXTRA:    var elements = document.getElementsByClassName("myhidden"),
#+HTML_HEAD_EXTRA:        n = elements.length;
#+HTML_HEAD_EXTRA:    for (var i = 0; i < n; i++) {
#+HTML_HEAD_EXTRA:      var e = elements[i];
#+HTML_HEAD_EXTRA:      if( == 'block') {
#+HTML_HEAD_EXTRA: = 'none'
#+HTML_HEAD_EXTRA: = 'hidden';
#+HTML_HEAD_EXTRA:      } else {
#+HTML_HEAD_EXTRA: = 'block';
#+HTML_HEAD_EXTRA: = 'visible';
#+HTML_HEAD_EXTRA: orgInfoHooks = {
#+HTML_HEAD_EXTRA: 'onShowSection': [
#+HTML_HEAD_EXTRA:     toggle_visibility,
#+HTML_HEAD_EXTRA: /* ]]> */
#+HTML_HEAD_EXTRA: </script>

Yeah, that’s a hack, but it may work.