Linux

Installing Prophet on CentOS

How to install the Prophet package for R on RHEL or CentOS.

Tweaking Linux for Pernickety Projectors

Linux has really come a long way. I used to arrive at the podium and hook up my (Linux) laptop with the resigned expectation that there would be some tweaking involved to get it to speak to the projector. However the support for video hardware has evolved massive and nowadays I don’t ever think about this: it just works. Until it doesn’t. This week I was speaking at a conference where the video setup was extremely pernickety.

Using Shared Memory with OSRM

If you have multiple applications accessing OSRM data then it does not make sense for each of those to have a separate copy of the data resident in memory. This is especially true if you’re using a relatively large map, in which case memory consumed by multiple processes might be enormous. An alternative is to store the map data in shared memory, allowing multiple processes to access a single copy of the data.

Citrix Receiver on Ubuntu 18.04

There’s a Debian package available for Citrix Receiver, so in principle this task should be trivial. It’s not. Simply installing the package leaves you with a SSL error whenever you try to connect to a Citrix resource. You need to jump through a couple of extra hoops to get it actually working. Installing the Package Download the package from here (scroll down to the “Debian Packages” section). Install it.

Extending DataGrip Evaluation

DataGrip is a great tool for accessing a wide range of databases. You can get a free 30 day evaluation license. But perhaps you want to evaluate for a tiny bit longer?

Installing DataGrip on Ubuntu

Download the DataGrip archive. Unpack the archive. $ tar -zxvf datagrip-2018.1.4.tar.gz Rename the folder. $ mv DataGrip-2018.1.4/ datagrip Change the owner to root. $ chown -R root.root datagrip Move to /opt. $ sudo mv datagrip /opt/ Link it into PATH. $ sudo ln -s /opt/datagrip/bin/datagrip.sh /usr/local/bin/datagrip Start it from the terminal. $ datagrip

SQL Server from Ubuntu

Setting up the requisites to access a SQL Server database from Ubuntu.

Installing rJava on Ubuntu

Installing the rJava package on Ubuntu is not quite as simple as most other R packages. Some quick notes on how to do it.

Linux VM on Azure

A quick tutorial on how to create a Linux VM on Azure.

Moving a Running Process to screen

I am not sure how many times this has happened to me, but it’s not infrequent. I’m working on a remote session and I start a long running job. Then some time later I want to disconnect from the session but realise that if I do then the job will be killed. I should have started job in screen or tmux! So, is it possible to transfer the running process to screen? (Or, equally, to tmux?) Well it turns out that it is using the reptyr utility. I discovered this thanks to a LinkedIn post by Bruce Werdschinski. A slightly refinement of his process is documented below.

Installing NVIDIA Graphics Driver on Ubuntu

Recipe for installing the NVIDIA binary drivers on Ubuntu.

Quick Wordpress Install with Docker

I’ve just put together a Wordpress site for my older daughter. It’s hosted on DigitalOcean and all of the infrastructure is handled with Docker. This post describes the steps in the (easy) install process.

Diagnosing Killed Jobs on EC2

I’ve got a long running optimisation problem on a EC2 instance. Yesterday it was mysteriously killed. I shrugged it off as an anomaly and restarted the job. However, this morning it was killed again. Definitely not a coincidence! So I investigated. This is what I found and how I am resolving the problem.

Installing Docker on Ubuntu

This procedure works on both my laptop and a fresh EC2 instance.

Adding Users to an EC2 Ubuntu Instance

By default an EC2 instance has only a single user other than root. For example, on a Ubuntu instance, that user is ubuntu. If there will be multiple people accessing the instance then it’s generally necessary for each of them to have their own account. Setting this up is pretty simple, it just requires sorting out some authentication details.

Installing Hadoop on Ubuntu

This is what I did to set up Hadoop on my Ubuntu machine.

Installing Spark on Ubuntu

I’m busy experimenting with Spark. This is what I did to set up a local cluster on my Ubuntu machine. Before you embark on this you should first set up Hadoop.

Setting up ExpressVPN on Ubuntu

I’ve been meaning to set up a VPN and this morning seemed like a good time to tick it off the bucket list. This is a quick outline of my experience, which included one minor hiccup.

Setting up Jupyter with Python 3 on Ubuntu

A short note on how to set up Jupyter Notebooks with Python 3 on Ubuntu. The instructions are specific to Xenial Xerus (16.04) but are likely to be helpful elsewhere too.

Installing Neo4j on Ubuntu 16.04

Some instructions for installing Neo4j on Ubuntu 16.04. More for my own benefit than anything else. Installing Java Neo4j is implemented in Java, so you’ll need to have the Java Runtime Environment (JRE) installed. If you already have this up and running, go ahead and skip this step. sudo apt install default-jre default-jre-headless Check whether you can now run the java executable. java If that works for you, great! It didn’t immediately work on one of my machines.

Garmin ANT on Ubuntu

I finally got tired of booting up Windows to download data from my Garmin 910XT. I tried to get my old Ubuntu 15.04 system to recognise my ANT stick but failed. Now that I have a stable Ubuntu 16.04 system the time seems ripe. openant Install openant, a Python library for downloading and uploading files from ANT-FS compliant devices. Download the zip file from https://github.com/Tigge/openant. Unpack the archive and install using $ sudo python setup.

Streaming from zip to bz2

I’ve got a massive bunch of zip archives, each of which contains only a single file. And the name of the enclosed file varies. Dealing with these data is painful. It’d be a lot more convenient if the files were compressed with gzip or bzip2 and had a consistent naming convention. How would you go about making that conversion without actually unpacking the zip archive, finding the name of the enclosed file and then recompressing?

Upgrading Ubuntu 16.04 to Linux Kernel 4.4.12

I’ve had a few minor hardware issues with the default kernel in Ubuntu 16.04. For example, hibernate does not work on my laptop. So, in an effort to resolve these problems, I upgraded from the 4.4.0 version of the kernel to 4.4.12. Nothing tricky involved, but here’s the process. Grab the headers and image. $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.12-xenial/linux-headers-4.4.12-040412-generic_4.4.12-040412.201606011712_amd64.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.12-xenial/linux-headers-4.4.12-040412_4.4.12-040412.201606011712_all.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.12-xenial/linux-image-4.4.12-040412-generic_4.4.12-040412.201606011712_amd64.deb Then, become root and install the kernel.

The Mind Behind Linux

Setting up ODBC for SQLite on Ubuntu

First install the SQLiteODBC and unixODBC packages. Have a quick look at the documentation for unixODBC and SQLiteODBC.

Mounting a sshfs volume via the crontab

I need to mount a directory from my laptop on my desktop machine using sshfs. At first I was not making the mount terribly regularly, so I did it manually each time that I needed it. However, the frequency increased over time and I was eventually mounting it every day (or multiple times during the course of a day!). This was a perfect opportunity to employ some automation.