Entries by

CSV to XML scripts

To generate a valid XML file from a CSV (or Excel on the Mac) isn’t as simple as parsing the file and outputting each field surrounded by the correct tags. Characters need escaping and formats need set. This page is a great summary of the various methods of doing this conversion.

Splitting 2up PDFs back to 1up

Sometimes you’ll get a document scanned in that has 2 pages per scanned ‘page’. It is really nice to have them put back to one page per ‘page’, undoing the 2up process.

Transferring mail from IMAP server to gmail

I use gmail as a mail dump: ‘current’ and important mail is kept on my fastmail.fm account for access from everywhere ‘old’ mail (>~12 months) from Sent and Trash are semi-regularly transferred to gmail where they can be searched etc whilst freeing up space on both my local machine and fastmail.fm This means I have […]

Finding duplicate files

From time to time it is useful to get rid of duplicate files caused by crap website backups or rubbish personal backups. fdupes is a simple tool to compare all your files, firstly by size then at the byte level using MD5 signatures. Run it using fdupes -r DIRECTORY to produce a list of duplicates.

Fortran on Raspbian/Raspberry Pi – compiler options

I’ve just done a quick and nasty comparison of runtimes using GNU Fortran and the recommended compiler flags from here. I used a CFD code mentioned earlier. Compiling as before (gfortran euler.f) gave a runtime (using time) of: CALCULATION CONVERGED IN 3490 ITERATIONS TO A CONVERGENCE LIMIT OF 4.99999987E-06 real 1m6.156s user 1m4.030s sys 0m0.300s […]

Raspberry Pi Mac OSX Desktop Icon

I’ve created a quick and simple Mac OSX icon using Xcode’s Icon Composer and the Raspberry Pi logo located here. Download the icon (copy and pasted onto a zipped text file) or the zipped .icns source here: .icns source: RaspberryPi.icns To use, unzip the file and follow the instructions here. Feel free to share.

Headless Raspbian Installation

Here are the steps I took to get Raspbian working on my Raspberry Pi in a headless fashion. The Rasbian SD card image has just been released and can be downloaded here. Following the instructions here: $ unzip 2012-07-15-wheezy-raspbian.zip Archive:  2012-07-15-wheezy-raspbian.zip   inflating: 2012-07-15-wheezy-raspbian.img   $ df -h $ diskutil unmount /dev/disk2s1 Volume RASPI on […]

Quitting an OSX application remotely via ssh

So I use my laptop as an alarm clock: on waking from its sleep at a predetermined time it runs an applescript (to open Safari and EyeTV with Radio 4 selected) to hopefully wake me from mine. Sometime this script runs, I forget to quit EyeTV, and R4 is playing all day… To resolve this […]

CFD on the Raspberry Pi

I have successfully (and very easily) compiled and run the Cambridge University Engineering Department’s 4th year CFD (computational fluid dynamics) course code. It ran quite nicely. Further tests will follow.