Archive for April, 2013

Easily Rotating Images

When grabbing photos from my iPhone I often find that it has a funny idea of where “up” actually is and while the EXIF data always allows you to correct the problem I’d rather my image was simply the correct way up to start with and an EXIF rotate tag of 0 degrees rather than upside down with an EXIF rotate tag of 180 degrees!

Luckily I discovered a little utility that can be plugged in to the nautilus file/folder browser on the gnome desktop which lets you simply Ctrl-click the errant photos and then right click and hit rotate, later entering the amount you wish to compensate the images by and away it goes and batch rotates the images for you.

To install on Ubuntu (or any other Debian based system) just run the following

sudo apt-get install nautilus-image-converter

Enjoy your properly orientated photos!

Comments (2)    

Hide SQLPlus Password String

Google is somewhat sketchy on what you have to do if you wish to hide the password string passed to SQLPlus on the command line from ps aux to enhance the security of automated processes on servers that may be accessible in part to others.

The answer actually turns out to be quite simple but it is best explained with a snippet of code, the below to be placed in a BASH script.

sqlplus -L /nolog <<EOF >> test.log
CONN user/password@tnsname
@test.sql
EOF

To explain the components then.

  • -L tells SQLPlus to only attempt a login once. This means that if access is denied, the account you’re trying to access won’t get locked after 3 attempts.
  • /nolog on the command line forces a prompt without a connection to a server. This allows you to specify a connection string as part of your script instead of on the command line which would then be visible to ps aux.
  • <<EOF indicates that the input to SQLPlus will be a stream of lines, to be read until an EOF is sent on a line.
  • >> test.log logs the output of the activities of SQLPlus to a named file, in this case test.log
  • CONN user/password@tnsname passes your credentials to SQLPlus and causes it to establish a connection with the server sitting behind the TNS name. Being passed this way the credentials will appear neither on ps aux or in test.log
  • @test.sql tells SQLPlus that it should read in and execute the file test.sql
  • EOF terminates the feed in of lines and causes everything fed in thus far to be executed

I hope this ends up saving some head scratching

Comments off    

Maggie Thatcher’s Funeral

Maggie Thatcher's Funeral

Maggie Thatcher's Funeral

As my office is just round the corner from Fleet Street I nipped out to see the funeral procession file past and Shweta grabbed a few photosLast update: 08 November 2015

Comments off    

Maggie Thatcher’s Funeral

Maggie Thatcher's Funeral

As my office is just round the corner from Fleet Street I nipped out to see the funeral procession file past and Shweta grabbed a few photos

Comments off