Category Archives: tools

Customize Windows 10 File Type Icons

I just realized, that recent Windows version make it very hard to customize some aspects of your desktop.

As I am using Sumatra PDF as my default PDF viewer, I do not have the typical Adobe icon on my desktop. While having these icons on my Mac as well as on my work PC, this is rather confusing.

I came along File Types Manager which actually takes away the registry fiddling.

File Tymes Manager Main Window

It works with Windows XP, 7/8 and Windows 10. if you have any .ico files available it is pretty easy to change an icon for a particular file type just by assigning it.

Changed PDF file type icon

Also there are tons of other features, I haven’t used yet.

tl;dr

If you want to change file type icons on a Windows 10 system, you ca use File Type Manager to do so easily.

Simplifying Shortcuts using Windows Snipping Tool

At my current company laptop, I am very limited when it comes to installing additional tools to improve my productivity. From a company view understandable, it is very frustrating to me. One of the tasks I do several times a day, is creating a screenshot. Unfortunately, I am not able to install tool such as my beloved SnagIt.

I use Windows Snipping Tool instead a lot. However, pressing Ctrl + Esc, typing Snip and then pressing New gets annoying over time. So I decided to create an Instant Snip instead when.

So head to the Snipping Tool and right click it to navigate to its location on the disc.

Snipping Tool Context Menu in the Windows Start Menu

Copy the shortcut in this folder and rename it. In my case, I copied the shortcut to a Prg folder in my Home directory where I save programs, batch files and shortcuts.

Copying the Windows Snipping Tool Shortcut from its original location to another folder

Now right click the shortcut and do the following small changes:

  1. Add the parameter /clip to the command line in the shortcut
  2. Optional: Add a keyboard shortcut in case you are not happy with the Windows default (in my case Windows+Shift+I)

Properties of the Snipping Tool Properties UI

At the very end, I have put this shortcut to my taskbar to create instant clips with a single mouse click.

That way you can use the shortcut to create a clip directly. Using the /clip patemter you can use Snipping Tool in semi-automated processes but also the keyboard shortcut you have just defined.

In case you are only looking for the default keyboard shortcut you can use Windows+Shift+S to start the clip mode of Snipping Tool.

One point to bear in mind is the fact, when using the /clip mode, the clip is directly saved to the Windows clipboard and the Snipping Tool UI cannot be accessed right after the screenshot is made.

tl;dr

Windows Snipping Tool has a parameter /clip to create a instant clip from the command line without starting the UI dialog but also can be started using Windows+Shift+S to create such a clip.

Blogging again with MarsEdit

Since WordPress cam up with the new editor, actually, writing does not spark fun anymore. Actually, I do not know why I do not like the new editor. Therefore, I recalled MarsEdit, which I used quite some time ago.

MarsEdit 4

I am still not disappointed by the editor. Connection the WorPress installation worked like a charm. Looks like I can start writing blog articles again in a “traditional” manner. 

MarsEdit 4 Editor

Said that, this is going to be the first article written with MarsEdit for a long time.

The McGyver GIT Survival Guide

Working with version control system is one of the elementary skills for each and every software engineer. Over the years, I worked with CVS, Subversion, SourceSafe, Perforce as well as Mercurial. Within Microsoft, I worked a lot with Source Deport and Microsoft Team Foundation Server. At home I run my dedicated SVN repository. In fact, I don’t feel comfortable when not being able to check in source code at all.

For my personal projects, Git especially Github works quite well, however, since the openHAB project moved from Google Code (Mercurial) to GitHub, I deal with quite a lot of issues within Git over and over. Currently we have more than 50 60 forks and more than frequent pull requests. Therefore, keeping your local branch permanently in sync is quite inevitable.

Abstraction None
The worst thing about Git is the fact, the user interface and console commands seem to reflect the Git implementation bit by bit. Personally, I have the feeling there is zero abstraction for the user. Even worse, when used to non distributed systems like SVN or TFS doing simple syncs and commits, the concepts behind Git might drive one mad.

Small Steps
This seems obvious, however, try to make only small commits to the repository. The more collaborators you have, the more challenging it might become to merge. At the same time, the less experienced you are with Git, the smaller your checkins should be. Commit single files, minor changes as isolated as possible. This will make you life just so much easier.

Daily Routine Conflicts
As daily routine, fetching and merging the local branch should be done via

git fetch upstream
git merge upstream/master

Usually, this should work quite well unless there are changes on local files that should not be merged at all or you have done changes not to be merged yet.

Updating e21a751..349468b
error: Your local changes to the following files would be overwritten by merge:
        foo/bar/buzz.ext
Please, commit your changes or stash them before you can merge.
Aborting

To just avoid the merge stash the changes via

git stash

Do the merge, and than pull the stash.

git stash pop

Again, usually this should work fine unless the merge results in a conflict which cannot be resolved automatically.

Auto-merging foo/bar/buzz.ext
CONFLICT (content): Merge conflict in foo/bar/buzz.ext

Simply run

git mergetool

to solve the issues and try to pull the stash again.

Delete from Repository only
To remove a file from the repository whilst keeping it locally just performa a

git rm --cached myfile.c

Bear in kind, this git will realise this file immediately as a new. rm works on folders as well, though. Anyway, this will become very handy once you accidentally check in files that are not intended to be checked in.

Backup early – Backup often
Just in case you don’t know what’s going to happen e.g. due to a larger refactoring – move the current state into a new brach as backup right after a commit

git branch my-backup-work

Reset to Remote
Ok, this one gave me quite a hard time, as I had changes checked in my forks but needed to reset particular files to the current revision of the original repository (not your local branch and neither your fork).

To do so, reset your working copy to the upstream master:

git remote update
git reset --hard upstream/master

Afterwards push this new branch-head to your origin repository, ignoring the fact that it won’t be a fast-forward:

git push origin +master

you might have something like

Fetching origin
Fetching upstream
remote: Counting objects: 685, done.
remote: Compressing objects: 100% (336/336), done.
remote: Total 507 (delta 249), reused 321 (delta 87)
Receiving objects: 100% (507/507), 6.57 MiB | 146.00 KiB/s, done.
Resolving deltas: 100% (249/249), completed with 64 local objects.
From https://github.com/aheil/example
   f55f8b0..e060456  master     -> upstream/master
macbook-pro:example andreas$

Reverting to a specific Revision
This one is easy, you simply need to tell git the hash of the revision you want to check out. This works quite well, however, you always need to consider the visibility of the branch you want to check out. To understand the reachability in git, you might want to read this article.

git checkout e095 -- somefolder/somefile

Conclusion
In my very personal opinion, Git is s**t if you are used to centralised repositories. If you worked a lot with Mercurial, Git is simply to complex. Git is not abstract enough. When working on code, I want spend 99% on the code and 1% on the revisioning system, not the other way around. When working on the open source projects, I currently waste a major part of my time on Git.

I probably will never setup and run a personal git server (I do run a SVN server and did run CVS before) and I probably will not maintain any Git servers (I did at work maintain Microsoft TFS, SVN and CVS servers, though).

Git is great when it comes to some kind of mass collaboration (but I haven’t found anything so far Mercurial won’t offer for the same purpose). While everybody plays nicely together, it works just great.

As there is much more to learn about Git, you eventually want to pick Pro Git to get some insights.

Where is my Space

Using Bootcamp, running a Mac OS X and a Windows installation in parallel, space is slowly but constantly running low on my MacBook Pro. Before upgrading my HDD, I was looking for a better way than using du or df -h to check where I might free up some space on my disk.

Disk Inventory X is a free tool available using cushion tree maps to visualise the disk usage. A similar tool was developed at the Technical University of Eindhoven named SequoiaView. While SequiaView was developed for Windows, Disk Inventory X is designed for Mac OS, working fine with version 10.8.3.

Disk Invetory X

After selecting the disk, it’s possible to browse through the directory structure analysing where your storage when to.

Disk Invetory X Cushion Tree

Both, SequoiaView for Windows and Disk Inventory X for Mac are quite useful programs that should be definitely part of ones toolset.

Ditto Clipboard Manager

One of the most annoying limitations using any version of Windows, is the clipboard and its limited capacity of one entry. Even Microsoft’s DOS supported sort of a clipboard striking the F7 key to choose from the last ten commands.

Command Prompt Clipboard

However, using Windows only one single item can be placed into the clipboard. Using multiple tools, documents over time one would speed up work significantly if it would be possible to keep many things in the clipboard at once.

Quite a while ago, Microsoft introduced the Clipboard Ring for Visual Studio to cycle through the most recent copied code snippets as especially developers often need different fragments of code over and over again (said that kids, please remember, copied code is never good at all).

Anyway, how great would be the experience using Windows if one could access such a clipboard ring or similar outside of Visual Studio? Ditto Clipboard Manager is a small open source project, providing especially this functionality:

“Ditto is an extension to the standard windows clipboard. It saves each item placed on the clipboard allowing you access to any of those items at a later time. Ditto allows you to save any type of information that can be put on the clipboard, text, images, html, custom formats, …..”

It does keep anything in your clipboard, is easy accessible and does even provide a preview for many things copied during your work day.

Ditto

There is a whole bunch of shortcuts and  if you don’t like its appearance go ahead and theme it differently. I haven’t tried all the options Ditto does provide, however, I am already using it on all my machines at work as well as home. So go and give it a try.

Pixeur Color Picker

For quite a time, Pixeur became one of the tools I almost can’t work without anymore. It is a lightweight and free color picker provided by Veign.

First of all, it’s easy to pick a color from the standard color palette. A great feature is the automated calculation of HSB, RGB and CMYK and Hex (the numbers used in HTML code) values. Which value you ever need, Pixeur does calculate the corresponding color codes. 

Pixeur Color Picker 

The ultimate uber feature is the screen picker tool. You simply drag and drop the pointer to the pixel on your screen you want to know the color code from.

Screen Color Picker

Drag and drop the target icon to whatever pixel on your screen to get the exact color value. In addition a zoomed area of the hovered are is shown in the corner of your screen which makes it quite easy to pin down a single pixel even on some kind of retina like displays.

Picking a single pixel with Pixeur

It’s very simple to use and so far I haven’t had any issues with the tool. Amazingly, the tool worked since ever on various Windows versions I used so far including Vista and windows 7 without the need of updating.

Pro:

  • easy to use
  • low footprint (~2MB)
  • provides color values in various formats
  • screen wide color picker
  • zoom of the hovered area when picking a color
  • free (i.e. no money, cash, PayPal or diamonds needed)

Contra:

  • Hard to find on the web

The tool is so great, I usually forget about it until I need to get a color code or pick some pixel’s color from the screen. It’s one of the first tools I install after setting up a new machine, and there’s the problem – if you don’t know where to find it, it’s hell of a job to find the download site.

There are probably a dozen of similar tools out in the wild, and each and every major drawing program probably provides such features. However, as a free, and very easy to use alternative, give it a try.

Restore Desktop Layout on Windows

Works on my machine!I continually move between different office places using different setups for monitors with my laptop. Sizes, numbers and orders of the monitors vary from place to place. As a consequence, you either deal with a complete mess on your desktop or you spend several hours per week in rearranging icons on your desktop.

Tired of doing so, I was looking for a nice tool for Windows, easy to use. Desktop Restore by Jamie O’Connell is such a tool available for Windows x86 and x64 systems and it is free to use (while he appreciate donations). For me, it works fine on a Windows 7 64-bit machine.

It integrates well with the Windows Explorer  context menu where you can save and restore layouts for different resolutions. This even allows you to set up your desktop for different locations and restore them with a single mouse click.

Desktop Restore

I have used it for ages, however, I have not really realized how great this tools until I set up my machine from the scratch recently. 

Windows Metafile Preview on Windows 7

Works on my machine!The visual preview of files in Windows Explorer is one of the great features of Windows when looking for a certain file. Unfortunately, with Windows Vista Microsoft disabled the preview for Windows Metafile Format (.WMF) and Enhanced Metafile Format (.EMF) files. As I needed t work a lot with EMF files during my latest book project with Springer, I was looking for some way to enable the preview of the file types mentioned above in Windows Explorer.

Windows 7 without EMF/WMF preview

Fortunately, there is a great plugin called emfplugin written by Daniel Gehringer to enable the preview. The plugin is available for x32 and x64 machines and should work on both, Windows Vista and Windows 7. Once installed (and rebooted) the Windows Explorer is capable of displaying EMF and WMF files.

Windows Explorer EMF and WMF thumbnail preview plug-in

The plugin is licensed under the MIT license, so its safe to go with it. At the very end this raises the question why Microsoft did actually disable the preview for two formats developed by Microsoft itself and whether they might work with Windows 8 again.

DropBox with TrueCrypt on Lion and Windows

After receiving my new MacBook, I wanted to sync a whole set of files between both systems. For convenience, I decided to use DropBox instead of a thumb drive and for security reasons, I decided to use TrueCrypt to encrypt some of my confidential data within the DropBox folders.

Using a TrueCrypt container within DropBox is quite convenient as I am syncing my DropBox folders with various machines (e.g. at work). However, I do not want to access these file there nor do I want that an admin might check out my “oooh so secret” files (not saying they would, though).

DroppBox with TrueCrypt on Lion and Windows

With my rusty Mac OS kung-fu, I had to install TrueCrypt first. Of course, this failed and being the first app I did install on Lion, this was somewhat demotivating. Before you have install a version from MACFuse. It seems that the official version is not up to date, however, there are rumors you might use the latest version provided at Tuxera.com.

Once MACFuse and TrueCrypt are set up and the machine is rebooted, create a TrueCrypt container within DropBox. When creating on OS X Lion, you might want choose FAT for the containers file system so you can mount it on the Windows system as well. However, any change within this container will synchronize the container as a whole. Not being very efficient if this is a 256 MB file, it seems that one can turn of the timestamp of the TrueCrypt container to avoid syncing it. This will prevent that the container gets synced after files within the container are changes, however, the itself files are still updated. To turn it of, open TrueCrypt and select Settings / Preferences… chose the Security tab and uncheck the Preserve modifications timestamp of file container checkbox.

TrueCrypt Settings on OS X Lion

Of course, the same has to be done on your Windows system.

TrueCrypt Settings on Windows 7

Once both settings are applied, only the initial sync of the container will take some time. Thereafter, only the files within the container are updated. for me this seems to be a quite good solution to keep my boxes in sync and to avoid rubbernecks seeking through my private stuff. The setup is done quite easily, only the hassle with MACFuse was quite annoying.