Tuesday, February 19, 2013

LESS is more

If you're a Visual Studio web developer and you haven't tried out the Web Essentials extension by Mads Kristensen, then GO NOW, GET IT!

And for those who do know about it, and you were using it for it's LESS support, then you may have noticed in the last update how it was removed :( The only alternative then would appear to have been T4CSS.

But the same day I updated and saw the lack of LESS support, was the same day that I realised it's now baked into Visual Studio in the most recent ASP.NET and Web Tools 2012.2 Update.

It supports adding LESS files from the New Item dialog, and upon build will generate the CSS and minified CSS for it too. Which is obviously the reason it was removed from Web Essentials. Awesome :)

Thursday, February 14, 2013

Git tip - diff of only modified files

I was wondering how to see a diff of only those items that were modified in my Git workspace, and thanks to Stackoverflow, you can use the --diff-filter parameter:

git diff --diff-filter=M
git dt --diff-filter=M

The second one is if you use a visual diff tool. I prefer WinMerge, might do a post on my setup at some point, it's pretty simple once you know how.

Wednesday, February 13, 2013

Where'd my Visio BMPN stencils go?

For some reason, when opening up a saved Visio diagram that uses the BPMN stencils, these no longer show up in the Shapes window.

To get them back, click on More Shapes > Open Stencil... then find the Visio content directory, in my case this is C:\Program Files\Microsoft Office\Office14\Visio Content\1033, and then enter BPMN*_M.vss to show only the metric BPMN stencils. Select them all, then click Open.

I have no idea why it isn't stored with the document somehow. Apparently if you go to File > Info > Properties > Advanced Properties and then check the Save workspace option, then it should save things like this, but that's checked for me and it doesn't. Maybe because it's the Professional version and not the Premium version, but I doubt it. Sounds like a bug to me.

Thursday, February 7, 2013

Easier way to get to that hosts file

In Windows, there's a hosts file mapping IP addresses to hostnames. For some weird reason, it's in the arbitrary location of c:\windows\system32\drivers\etc\hosts. This kinda reminds me of a Unix/Linux path, with the \etc\hosts. But anyway. That's often too much to type in when just trying to go Start -> Run -> notepad++ hosts. So, use symbolic links :) Something else that is Unix/Linux like, that not many people know exist on Windows:

C:\>mklink hosts c:\windows\system32\drivers\etc\hosts
symbolic link created for hosts <<===>> c:\windows\system32\drivers\etc\hosts

Then you can just say, notepad++ \hosts.

Much easier.