Henrik Husted Jensen

ABOUT ME

Embedded software specialist & project manager. Likes to tinker with odd projects, fails to update this page on a regular basis.



RANDOM STUFF
These things are clickable. Or touchable if you're into that sort of thing.

PROJECTS

Remove location information from pictures

For the most part it's a nice feature that your smartphone stores the GPS position of each picture. Sometimes it's not. Here's one way to remove all such information from your photos.

Taking pictures with a camera phone such as the iPhone or Android phone is convenient since you’re likely to always have the phone on you. One thing you should know that embedded in the pictures are meta data with all kinds of information about the photos. These data is called EXIF.

One of the saved meta data is the GPS position which you might not be interested to share on the Internet, i.e. if you’re taking photos of valuable items. Yes, it can be turned off entirely for all photos but then Places in iPhoto will stop working. So how do you remove the GPS coordinates from your photos?

There are tools available that will do this for you but I like to use the Service menu already in place in OS-X.

  • Download and install ExifTool
  • Download this Automator script, unzip and copy it to ~/Library/Services/
  • Now select some photos in Finder and run “Remove EXIF” from the Finder|Services menu. A Growl message will show up once all photos have been cleaned.

That’s it. Please note that this will overwrite the existing files with a new file where all EXIF information is removed. If something goes wrong in ExifTool then there’s a risk that the original photo will be corrupted. If this is a concern then ExifTool can keep a backup of the original photo. Just open the Automator script and remove the “-overwrite_original” parameter from the script.

SourceInsight bookmarks

There's a lot source code editors available for Windows. The best I've ever used is SourceInsight. Unfortunately it seems to lack bookmarks. Until now.

I like my bookmarks the way VisualStudio 6 did it. So here's a couple of macros that will enable bookmarks, all thats left is to assign them to keys of your choice. Enjoy.

  /* VC++ style bookmarks for Source Insight                           */
  /* by Henrik Husted (henrik@enumize.com)                             */
  /*                                                                   */
  /* How to use:                                                       */
  /* 1) Add this file to current project                               */
  /* 2) Map each macro to a key in Source Insight, ie                  */
  /*    CTRL+F2  : HH_InsertBookmark( )                                */
  /*    F2       : HH_NextBookmark( )                                  */
  /*    SHIFT+F2 : HH_PrevBookmark( )                                  */
  /*                                                                   */
  /*    and Source Insight will do bookmarks like Visual Studio        */

  /* Insert new bookmark at cursor */
  /* If a bookmark already exits at the cursor position it will be deleted */
  macro HH_InsertBookmark( )
  {
    hbuf = GetCurrentBuf()
    if( hbuf != hNil ) {
      file = GetBufName( hbuf )
      line = GetBufLnCur( hbuf )
      text = GetBufLine( hbuf, line )

      bookmark = BookmarksLookupLine( file, line )

      if( bookmark == nil ) {
        /* No bookmark on line, create new one */
        BookmarksAdd( text, file, line, 0 );  
      }
      else {
        /* There already is a bookmark, delete it */
        BookmarksDelete( bookmark.Name )
      }
    } 
  }

  /* Goto next bookmark */
  macro HH_NextBookmark( )
  {
    hbuf = GetCurrentBuf()
    if( hbuf != hNil ) {
      file = GetBufName( hbuf )
      cur_line = GetBufLnCur( hbuf )
      max_line = GetBufLineCount( hbuf )
      found = False
      line = cur_line + 1

      while( !found ) {
        if( BookmarksLookupLine( file, line ) != nil ) {
          found = true;
          SetBufIns( hbuf, line, 0 ) 
        }
        else {
          line = line + 1
          if( line >= max_line ) {
            /* wrap to beginning of file */
            line = 0;
          }
          else if( line == cur_line ) {
            /* Searched all file, stop */
            found = True;
          }
        }
      }
    }
  }

  /* Goto previous bookmark */
  macro HH_PrevBookmark( )
  {
    hbuf = GetCurrentBuf()
    if( hbuf != hNil ) {
      file = GetBufName( hbuf )
      cur_line = GetBufLnCur( hbuf )
      max_line = GetBufLineCount( hbuf )
      found = False
      line = cur_line - 1

      while( !found ) {
        if( BookmarksLookupLine( file, line ) != nil ) {
          found = true;
          SetBufIns( hbuf, line, 0 ) 
        }
        else {
          line = line - 1
          if( line == 0 ) {
            /* wrap to end of file */
            line = max_line;
          }
          else if( line == cur_line ) {
            /* Searched all file, stop */
            found = True;
          }
        }
      }
    }
  }

FastFind for Windows

Windows already contains an indexing service but it doesn't have the features I need. FastFind indexes the drives you select once, create a database of all the files which you then can search in. Fast.

I don't want an indexing service to run all the time as the content of my servers doesn't really change that often. There is however a lot of files and having a tool to quickly locate them is extremely helpful. By chance I found Tim Browse who had already made the majority of the features I need. All I did was to add a few options to select multiple servers, integrations with Total Commander and a grep function.

Download the executable (and source) and get started indexing your servers.


CONTACT

Email

LINKS