LibreOffice – Dialogue boxes showing blanks

I have been using LibreOffice on and off for a few years now and generally I think it is a great alternative to the MS Office offering. It does the tasks that are required and the improvements over different versions have been steady and useful

I had however a very strange experience in which dialogue boxes and other windows such as alerts and messages just showed blank text. It was obvious that there was some important information in them, but it was not possible to read them. In some cases it was ok… I mean I knew here the “OK” button was expected to appear, or where “Cancel” should be placed. However, it was an annoying (at best) and limiting (at worst) exoperience.

After digging in a bit I realised what the problem was. The fonts that were supposed to be showing were at fault. The culprits were as follows:

  • DINRegular.ttf, and
  • DINRegularAlternate.ttf

After removing these two fonts from ~/Library/Fonts/ everything went back to normal. I hope this helps in case you are having a similar issue.

Persistent “Previous Recipients” in Mac Mail

Hello everyone! I am very pleased to take a question from John who got in touch with Quantum Tunnel using the form here. John’s favourite scientist is Einstein and his question is as follows:

In Mac mail I cannot delete unwanted email addresses. I have done the routine of deleting all addresses from the previous receiptant list, but when starting a new email unwanted addresses appear.. Any help is appreciated. Thanks, John

John is referring to the solution I provided in this earlier post. Sadly, the list of his lucky friends/colleagues/family (delete as appropriate) he has email recently persists even after clearing the “Previous Recipients” as explained in the post before.

There may be a way to force the clearing of these persistent email address:

  • Quit Mail and Address Book (in case the latter is open)
  • Open a terminal and type the following command:
    • `rm ~/Library/Application Support/AddressBook/MailRecents-v4.abcdmr`
  • Log out and back in again
  • Start Mail
  • You may have to clear the “Previous Recipients” list as per the post mentioned above

You should now be able to clear the list. And… In case you were wondering, the file we deleted should be created afresh to start accumulating new “recent recipients” (yay!)

Et voilà!

iPad keyboard – Caps Lock key changes language

I have been experiencing this issue for some time now… I have an external keyboard for my iPad and every time that I hit the Caps Lock key, instead of locking the capital letters in the keyboard, the iPad changes language… This is particularly annoying as I use several languages, from Spanish to Japanese. I decided that enough is enough and I have now managed to find a way to avoid this:

  1. Go to Settings, General
  2. Open Keyboard
  3. Select Hardware Keyboard 
  4. Switch off the Caps Lock switch to/from Latin

Et voilà!



Anaconda – Guarenteed Python packages via Conda and Conda-Forge

During the weekend I got a member of the team getting in touch because he was unable to get a Python package working for him . He had just installed Python in his machine, but things were not quite right… For example pip was not working and he had a bit of a bother setting some environment variables… I recommended to him having a look at installing Python via the Anaconda distribution. Today he was up and running with his app.

Given that outcome, I thought it was a great coincidence that the latest episode of Talk Python To Me that started playing on my way back home happened to be about Conda and Conda-Forge. I highly recommend listening to it. Take a loook:

Talk Python To Me – Python conversations for passionate developers – #94 Guarenteed packages via Conda and Conda-Forge

Have you ever had trouble installing a package you wanted to use in your Python app? Likely it contained some odd dependency, required a compilation step, maybe even using an uncommon compiler like Fortran. Did you try it on Windows? How many times have you seen “Cannot find vcvarsall.bat” before you had to take a walk?

If this sounds familiar, you might want to check conda the package manager, Anaconda, the distribution, conda forge, and conda build. They dramatically lower the bar for installing packages on all the platforms.

This week you’ll meet Phil Elson, Kale Franz, and Michael Sarahan who all work on various parts of this ecosystem.

Links from the show:

Anaconda distribution:

Phil Elson on Twitter: @pypelson
Kale Franz: @kalefranz
Michael Sarahan:

Installing Spark 1.6.1 on a Mac with Scala 2.11

I have recently gone through the process of installing Spark in my mac for testing and development purposes. I also wanted to make sure I could use the installation not only with Scala, but also with PySpark through a Jupyter notebook.

If you are interested in doing the same, here are the steps I followed. First of all, here are the packages you will need:

  • Python 2.7 or higher
  • Java SE Development Kit
  • Scala and Scala Build Tool
  • Spark 1.6.1 (at the time of writing)
  • Jupyter Notebook


You can chose the best python distribution that suits your needs. I find Anaconda to be fine for my purposes. You can obtain a graphical installer from I am using Python 2.7 at the time of writing.

Java SE Development Kit

You will need to download Oracle Java SE Development Kit 7 or 8 at Oracle JDK downloads page. In my case, at the time of writing I am using 1.7.0_80. You can check the version you have by opening a terminal and typing

java -version

You also have to make sure that the appropriate environment variable is set up. In your


  add the following lines:

export JAVA_HOME=$(/usr/libexec/java_home)

Scala and Scala Build Tool

In this case, I found it much easier to use Homebrew to install and manage the Scala language. I f you have never used Homebrew, I recommend that you take a look. To install it you have to type the following in your terminal:

ruby -e "$(curl -fsSL"

Once you have Hombrew you can install Scala and the Scala Build Tool as follows:

> brew install scala
> brew install bst

You may want to create appropriate environments in your 



export SCALA_HOME=/usr/local/bin/scala

Spark 1.6.1

Obtain Spark from

Note that for building Spark with Scala 2.11 you will need to download the Spark source code and build it appropriately.


Once you have downloaded the tgz file, unzip it into an appropriate location (your home directory for example) and navigate to the unzipped folder (for example



To build Spark with Scala 2.11 you need to type the following commands:

> ./dev/
> build/sbt clean assembly

This may take a while, so sit tight! When finished, you can check that everything is working by launching either the Scala shell:

> ./bin/spark-shell

or the Python shell:

> ./bin/pyspark

Once again there are some environment variables that are recommended:

export SPARK_PATH=~/spark-1.6.1
export PYSPARK_DRIVER_PYTHON="jupyter" 
alias sparknb='$SPARK_PATH/bin/pyspark --master local[2]'

The last line is an alias that will enable us to launch a Jupyter notebook with PySpark. Totally optional!

Jupyter Notebook

If all is working well you are ready to go. Source your


  and  launch a Jupyter notebook:

> sparknb

Et voilà!

Opening old Keynote/Pages files in new versions

Greetings readers! I hope you are all enjoying the break and getting ready for 2016.

This time I wanted to bring to your attention some information that you may find to be very useful. Particularly if, like me, you happen to have need some old slides, presentations or talks you have in Keynote but forgot (or rather did not need) to update to a newer version of the software. You may have thought that there would be some backward compatibility for this sort of thing, and you may be surprised that there is not an obvious click-and-update type solution. Nonetheless, not all is lost and you would not have to trash your presentations, unless of course they were not the slides you were looking for… This trick also works with Pages by the way.

You may find that when opening your old slide decks, Keynotes complains with:

This document can't be opened because it's too old. To open it, save it with Keynote '09 first.

Keynote Compatibility Issue

and Pages with:

This document can't be opened because it's too old. To open it, save it with Pages '09 first.

Of course, if you have both versions installed this should not be a problem, but why would you do that? So, if you cannot open the old file in the first place, here is what you need to do (please make sure that you have a backup copy of your file… you never know…):

  1. Open the Terminal and navigate to the directory where the old file is saved. So if your file is called

    and it is saved in your Desktop just type 

    > cd Desktop
  2. Rename the file with a .zip extension:
    > mv my_presentation.keynote
  3. Unzip the file: 
    > unzip -d my_presentation
  4. Type the following command:
    gunzip --stdout index.apxl.gz | sed 's-:version="72007061400"-:version="92008102400"-g' > index.apxl

    and hit return. If you do not get any errors you are good to go.

  5. Remove the 
  6. Re-compress the folder and change the extension to the original one.

Try opening your file, it may still complain but at least you will be able to open it. Et voilà!

Using curl to download a shortened URL – Dropbox,

English: A download symbol.

I was in the middle of an introductory workshop for Data Science at General Assembly and I was talking about using command line instructions to facilitate the manipulation of files and folders. We covered some of the usual ones such as ls, mv, mkdir, cat, more, less, etc. I was then going to demonstrate how easy it was to download a file from the command line using curl and I had prepared a small file uploaded to Dropbox and shortened its URL with

“So far so good” – I thought – and then proceeded with the demonstration… Only to find out that the command I was using was indeed downloading a file, but it was the only downloading the wrapper html created by for the re-directioning…  I should have known better than that! Of course all this happening while various pairs of gazing eyes were upon me… I tried again using a different flag and… nothing! and again… nothing… Pressure mounting, I decided to cut the embarrassment short and apologised. Got them to download the file in the less glamorous way by using the browser…

So, if you are ever in that predicament, here is the solution, use the -L flag with curl:

$ curl -L -o newname.ext http://your.shortened.url

The -L deals with the redirectioning of the shortened URL and make sure that you use the -o flag to assign a new name to your file.

E voilà!

Apple Notes and Gmail Notes


I accidentally ended up creating some notes in the Gmail Notes inside my iDevice only to be completely confounded by the fact I could not see them in my desktop. I tried to find some resolution by looking at the instructions for the Apple notes, but got frustrated with the lack of information.

So, here it is how I solved my issue:

It seems that as an Apple Notes user, one can select to have the Notes saved “On my iPhone/iPad/Mac” or synced to any email account of one’s choice. If you chose the first option, then no issues there, but the “fun” part comes with the latter. In that case the application will send notes from the device via Gmail to the Gmail servers, or for that matter to the email account you designated under IMAP. This means that your notes are therefore treated as normal email and labelled as “Notes”. Not only that, they are automatically archived on arrival. The initial transfer is one-way only and this implies that the notes can’t be restored from Gmail to the device. In order to find your Notes in Gmail you have to search for the “Notes” label!

If you call up your note on your device, the application access it from Gmail and displays it. But if you deleted it, as many of us do, then the app gets confused as it does not know where they are… If they are deleted from the device removes the label in Gmail and thus they cannot be accessed by the device and they get zombiefied in Gmail! They will still be present in All Mail, but without label.

How to fix this… well it depends. If the Notes have been deleted from the Gmail account from the web interface they will still be there in the Trash for 30 days. You can “restore” then during that time and will be showing in the Notes App on the device.

If the Notes folder was deleted using the Mail App on the device, the notes will (probably) still be there under “All Mail” but without a label. You can search for them and re-apply the label!

My advice would be not to use the synching at all… it has caused more pains than it should be. Let me know if this helps.

An alternative way to reduce the size of PDF in a mac

I am sure you, like me, have had the need to reduce the file size of a PDF. Take for example the occasional need of sending a PDF by email just to find out that the size is such that the message is rejected. I have used Adobe Acrobat Pro to help, but recently I came across an alternative way of achieving this: Use Colorsync Utility in a mac. Here is how:

  1. Right click the PDF that needs reducing and select “Open with…”
  2. Select Colorsync Utility and wait for the application to open the file
  3. At the bottom of the status bar in the application, you can now select one of the quartz filters available
  4. Press “Apply”
  5. and voilà

ColorSync (Photo credit: Wikipedia)

Enhanced by Zemanta

Command Line: a few tips

Terminal icon in OS X

In various posts in the past, I have given some tips using the Terminal and some comments have arrived about how complicated they may seem. Nonetheless, I still think that the flexibility offered by the tools provided are what make the UNIX/Mac environment so good. So in this post I would like to share some useful tips to use the terminal. Let me know what you think!

1. Download a File from the Web & Watch Progress

If you know the URL of a file that you need to download from the web you can use curl with the -O command to start downloading it:

$ curl -O url

Be sure to use the full URL. Also, remember to use the upper case ‘O’ and not the lowercase ‘o’ to keep the same file name on your local machine.

2. List Directory Contents by Modification Date

You can indeed take a look at the graphical interface, but if all you want is a quick list of the files in a directory showing permissions, users, file size, and modification date, with the most recently modified files and folders appearing from the bottom up then simply type the following:

$ ls -thor

3. Search Spotlight with Live Results from the Command Line

To do that you can use the mdfind command:

$ mdfind -time findme

This can go awfully quick depending on the specificity of the searched terms, but if you see a match hit Control+C to stop looking.

4. Kill Processes Using Wildcards

Simply use the pkill command. For example, if you want to get rid of all the processes that start with “Sam” just type:

$ pkill Sam*

5. Re-Run the Last Command as Root

The bang is you friend (!) In order to re-run the last command typed but as root type the following:

$ sudo !!

6. Get the Last Occurrence of a Command Without Executing It

Once again, the bang is your friend. Use the following command, where “searchterm” must be substituted by the command you are looking for:

$ !searchterm:p

For example, to find the last full command that used the prefix “sudo” you would use:

$ !sudo:p

7. Instantly Create a Blank File or Multiple Files

All you have to do is “touch” the file…

$ touch filename

You can list out multiple names to create multiple files too.

Do you have any favourite commands or tips to use the command line? Let me know.