svn: No newline at end of file

If you've used Subversion for any significant length of time, then you've probably run into the following message (or one just like it), near the end of a "svn diff" command.

\ No newline at end of file

Of course, you would have realised that this is because your editor has added a newline character to the end of the file in question, where the original had no such newline character.

Read more Comments

Getting binary LOBs from DB2 via the command line

Sometimes you just want to extract a single BLOB from a DB2 database... you don't want to write any software... you don't want to pull out some scripting language with a true DB2 database driver binding... you just want to get a BLOB from the database, and write it to a file - using nothing but the command line.

Well, there are two ways, that I know of, to do so. The first one, is the officially "correct" method, and should always work. The second method is even easier, but only works for very small BLOBs (which is all you need sometimes).

Read more Comments

Using PyODConverter with non-default ports

I've been using the excellent PyODConverter (aka Python OpenDocument Converter) for quite sometime now. It's a very small Python script that uses OpenOffice's Python-UNO bridge to convert documents between formats. For example, to convert test.doc to a PDF file, you could execute:

python DocumentConverter.py test.doc test.pdf

As a small side note, for the Python-UNO bridge (and thus PyODConverter) to work, you do need to use the python binary that installs with OpenOffice, so you will most likely need to full-qualify the python command like:

/opt/openoffice.org3/program/python DocumentConverter.py test.doc test.pdf

Anyway, PyODConverter always tries to talk to OpenOffice via (the somewhat arbitrary) port 8100. But today I found myself needing to able to tell PyODConverter which port to use via the command line. So, I went about modifying the PyODConverter code - which was very easy, thanks to it being already very well written.

Read more Comments

Finding the local IP address with ifconfig and sed

There are many ways to determine local IP addresses on Linux platforms. They almost always involve piping ifconfig into a number of grep, awk, cat, and/or tr commands.

Well, my new favorite approach is to pipe ifconfig into a single sed command :)

ifconfig | sed -n -e 's/:127\.0\.0\.1 //g' -e 's/ *inet addr:\([0-9.]\+\).*/\1/gp'

Neat, huh?! :)

Read more Comments

Signing S3 HTTP upload policies via the command line

When creating HTTP web forms to allow browser-based uploads to S3 bucket, you need to create and sign upload policies. Now if that statement lost you, then you should read over either of the following introductions to browser-based uploads to S3:

  1. Amazon Simple Storage Service: Browser-Based Uploads using POST Proposal (I'll be referring to this one a few times throughout this post)
  2. Browser Uploads to S3 using HTML POST Forms
Read more Comments

Solid State Media PC build: Part 1

As a mentioned back in this post, I am building a completely solid-state, dual-core, 64-bit media PC. I won't go into any of th "planning" details here (refer back to the original post for that). However, this post will show some of the progress so far (using lots of pics), and give some idea of the project's feasibility:)

Read more Comments

Restoration of DB2 online backups with shipped logs

During the past three years, I've often been amazed at just how difficult it can be to get IBM's DB2 to successfully restore from its own backups. Even in the most simple case (offline backups, with circular logging) you can run into difficulty, but in can be incredibly difficult if the database has been configured to use log shipping, and especially if the backups were taken "online" - that, it seems, can be most difficult DB2 backup / restore scenario. And, of course, DB2's error messages usually offer very little (to the untrained eye) to explain what's going wrong.

Read more Comments

Just what exactly *is* Freeview?

For a little while now, we've been seeing ads on TV for a new soon-to-be-upon-us service called Freeview. Well okay, my interest was raised... mainly because of the promised "15 new free to air channels". Note, the "new" part was my misunderstanding - ie it was implied, but not declared, as we shall soon see.

Read more Comments

Trackback Test

This is a simple test post - used for testing things such as trackbacks. This post is not intended for visitors to view.

This test is using the Drupal Trackback module first announced here.

Read more Comments

Job Bounty Hunter's Amazon Architecure

As mentioned back in this post, I helped to build Job Bounty Hunter. So, I was quite pleased to see one of my own architecture diagrams appear on this Amazon Web Services blog post.

So, since that particular diagram is now publicly available, I might as well present it here - I did create it, after all ;)

Read more Comments