Craic Computing Tech Tips

A collection of computer systems and programming tips that you may find useful.
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Thursday, January 28, 2016

Raspberry Pi - strange icon in top right of screen

I have been working with a mobile Raspberry Pi project powered by a LiPo battery and a Powerboost 1000c charger from Adafruit to handle battery charging.

Several times I have seen a small square icon in the top right of the attached small HDMI screen that has a rainbow of colors. I had absolutely no idea where this came from or what it represented.

But now I do...

The B+ (and presumably later models) has an under-voltage trigger that shows itself as this 'rainbow' square in the top right of the display when the supply voltage drops below 4.65V.

In addition, an over-temperature trigger displays a solid red square in the same location if the temperature goes above 85deg C.

You can disable the warnings in config.txt - see the link for details

I'm glad that the system has these triggers but I don't think the display of a red/rainbow square is a good way to inform the user.

Saturday, November 28, 2015

How I fixed a loose MagSafe connector in a MacBook Air

The MagSafe power connector kept falling out of my wife's MacBook Air. I figured it might be due to just wear and tear on the edge of the plug but when I looked at it I could not see any problem.

Last week I took another look at the plug and socket while I was wearning my magnifying reading glasses - and there was the problem !

The MagSafe socket is magnetic and so any metal dust that gets rubbed off from the plug will stick to the magentic surface. As a result you can see dark dust adhering to that. But in addition, there was a small metal shaving that was stuck there as well - large enough to interfere with the plug being properly seated. It was small but 'chunky' enough to cause the problem. No idea where it came from - not from the plug. I removed that with a pairs of tweezers and cleaned up the adhered dush with the end of a slightly damp Q-tip.

Problem solved !

Monday, October 27, 2014

USPTO Patent data sets are now distributed by Reed Tech, not Google

For the past few years Google has been making US Patent Office datasets available for free on the sites:
and others.

But the sites have not been updated since around Oct 7th 2014 and no information about the delay was posted... I rely on these updates so that was a big problem.

After some poking around I stumbled on the fact that Reed Tech, a division of Lexis Nexis, is now distributing these datasets at no charge.

Fortunately the format of the zip files remains identical, at least for the ones I work with.

You can find the Patent Grant Bibliographic Text at and the Application Bibliographic Text at

At the time of writing these pages are up to date.

This is good news, but it would have been even better if Google had announced the transition a month or so in advance.

Monday, September 22, 2014

Trends in Human Antibody Development - Charts

I operate the TABS Therapeutic Antibody Database which help biotechnology companies working in the field of antibody development. TABS represents the most comprehensive resource in this field.

With all that data available, I have compiled summary statistics that show the growth of this area of biotech over the years. I have made charts of those trands and have made those freely available on the TABS database site. You can find all the charts HERE.

Here is an example showing the number of active projects per year

You can get a free 30 day trial account at TABS.

TV Eye - a way to view YouTube videos without all the clutter

When you view a video on you get not only the video, but a bunch of suggested related videos and often times a lot of comments and other text. All this clutter gets in the way of what you want to do - simply watching the video.

So I wrote TV Eye, a simple service that embeds your desired video in a simple, plain web page, with none of the usual clutter.

To use, go to and find the video that you want to watch. Copy the URL for the video and paste it into the form on TV Eye.

The service is really simple and the code is distributed freely under the temrs of the MIT license. You can get the code at Github at

Friday, September 19, 2014

Installing Ruby in Docker Images

Docker is a great way to package applications with all their dependent libraries etc and then deploy them easily on various hosts. It builds on tools like Vagrant.

I am interested in using it to package Ruby applications built with Sinatra or Rails.

The preferred way to build a Docker Image is to write a Dockerfile that contains instructions that load an operating system, installs system packages, copies user code, etc.

I am building my Images on top of Ubuntu 14.04, the current Ubuntu Linux release. A problem with most of the Linux distributions is that the packages that install Ruby are often one or two releases behind. In this case the packaged Ruby is 1.9.3 and the current release if 2.1.2. In many cases this would not be a problem but if you want the latest version then you have do a bit more work and, specifically, compile Ruby from source.

Once you have the Dockerfile working then this all happens very smoothly but it took me a while to get all the pieces working together. So I wrote up two versions of a minimal Sinatra application along with the Dockerfiles needed to get them to work.

The code is on Github at

The Docker Images are on DockerHub at

The first example installs the packaged Ruby (1.9.3)
The second compiles and installs Ruby 2.1.2 from source.

I hope these examples help you get up to speed with Docker quickly.

Clean up unused Docker Containers and Images

Docker is a great way to package applications with all their dependent libraries etc and then deploy them easily on various hosts. It builds on tools like Vagrant.

In Docker you create Images that contain your code, the OS, libraries, etc and Containers which are the instances of the Image which you actually run.

Docker does not do a good job cleaning up old Images and Containers and when you are doing a lot of developing this can become a problem. Various people have proposed ways to handle the issue. The best of the web posts that I have seen is

Here is a slight restating of those solutions which work for me on MacOSX.

To clean up non-running containers

$ docker ps -a --no-trunc | grep 'Exit' | awk '{print $1}' | xargs docker rm

This removes any containers where the Status contains the string Exit. I have seen containers with no status which perhaps have crashed or hung. You just have to remove these manually.

Once you have removed unused Containers you can then remove unused Images. If you try this the other way round you will get errors that the Images are still in use.

Unused Images look like this in the output of 'docker ps' - they are the ones with <none> as the repository and tag

craic/sinatra_example            v1                  f9d2702eb2f7        2 days ago          481.3 MB
<none>                           <none>              196afed3dded        2 days ago          378.5 MB
<none>                           <none>              56f86f0a985e        2 days ago          378.5 MB

<none>                           <none>              011f588e88db        2 days ago          586.8 MB

To remove them use this command

$ docker images -f dangling=true -q | xargs docker rmi

If you are using Dockerfiles to build your Images (recommended) then you can always rebuild an image should anything get removed accidentally.