This Planet is a Tedious Place...

07/12/15 Use OSX Meld with difftool too...

Following on from an earlier post where I described how to use Meld with git's mergetool, here's how to use it with difftool too...

[difftool "meld"]
cmd = open -W -a Meld --args $LOCAL $PWD/$REMOTE

Fairly obvious really, although the $PWD isn't required for the local file.

Once you've done this, you can also set up gitk to use Meld as an external diff tool, by just setting "Exernal diff tool" to meld.

posted by Gruntfuggly # 13:41 Comments...

01/10/15 Clear terminal history when using grunt taskrunner

On my current project, we're using grunt to watch for changed files and automatically rerun our unit tests. This works great, but when there are lots of broken tests, it's a pain to have to scroll back up the output window to find the first failure.

To make this easier, you can create a grunt task that clears the window and run this first:

grunt.registerTask( 'clear', function()
grunt.log.write( "\x1bc\x1b[3J" );
} );

The above works for in OSX - you might need to change the escape codes to make it work in other shells/terminals.

posted by Gruntfuggly # 14:28 2 comments

11/09/15 Resolve git merge conflicts with Meld on OSX Yosemite

There's no official Meld packaged app for OSX, but reading this blog post led me to this package. Unfortunately I could get the later versions to work, but the origin alpha (here) worked for me.

Alex Kras has provided a script to enable it to work from the command line, but I was sure there was a simpler way to open it, and after some messing around, it seems you can use OSX's open command, so you can set the following in your .gitconfig to open Meld automatically using git mergetool.

[mergetool "meld"]
cmd = open -W -a Meld --args --auto-merge $PWD/$LOCAL $PWD/$BASE $PWD/$REMOTE --output $PWD/$MERGED
trustexitcode = false

posted by Gruntfuggly # 14:50 Comments...

18/06/15 Visual Studio Document Auto Save

For me, one of the most useful extensions for Visual Studio is Charles Bates' Document Auto Save. It simply saves all modified documents when Visual Studio loses focus. This is brilliant if you use git outside of Visual Studio as it means git gui always shows your changes when you rescan.

For some reason, Charles hasn't put the extension in the Visual Studio gallery, so it's slightly more convoluted to install, and probably doesn't reach as wide an audience as I think it should.

Read about it here or install it using the instructions on this page:

posted by Gruntfuggly # 09:57 Comments...

04/02/15 Dualit coffee machine filters

Turns out that you have to put the round filter papers in the holder with the shiny side up and the rough side down...

posted by Gruntfuggly # 23:04 Comments...