Converting PNG to TIFF

May 7, 2013

I had a directory full of PNG files that I wanted to convert to TIFF. This can be done using image magick:

$ convert file1.png file1.tiff

This becomes a bit tedious on a directory full of files. You can do the entire directory at once using the following at ...

Sorting ArrayControllers in Ember

May 3, 2013

I have an ArrayController in Ember (1.0.0.rc-3) and I want it to always be sorted.

The object in the ArrayController is this one, and I want to sort by points:

App.SeedResult = Ember.Object.extend({
    band_id: null,
    band_name: null,
    points: null
});

It is possible to have the ...

Using Servlet Mapping with Struts 2

April 22, 2013

I had a struts 2 web application, and I wanted to call some code that was implemented as a pure java servlet. Struts 2 uses a servlet filter:

<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

and I wanted to setup a new servlet that matched by url:

<servlet-mapping>
   <servlet-name>cardInterface ...

Converting ogv to mp4 on Linux

April 12, 2013

I have some video files in ogv format that I need in mp4 so I can use them in Adobe Premiere Elements.

I did this with the following command:

$ ffmpeg -i input.ogv -aq 80 -vcodec libx264 -preset slow -crf 5 -threads 0 output.mp4

input.ogv is the input ...

GPS Tagging Photos

April 5, 2013

This post documents my approach to tagging my photos with GPS co-ordinates.

I use:

You must also ensure:

  • The date, time and timezone on your camera are correct.

Logger

The Holux logger is a small box, small enough to keep in a pocket or camera bag ...