Saturday, April 12, 2014

Create hotspot on your windows machine

Being a developer, you might want to test your localy hosted websites with various mobile devices. The easiest way is to create a virtual hotspot and have the devices connected there. This can be easily done executing the first two commands of the following gist in an administration command prompt (run as admin):
Once connected, your devices will get an ip in the range of 192.168.x.y (mine was 192.168.173.something) and the pc will be available on the 192.168.x.1 ip.
In order to disable the hotspot, just run the last command on the gist.

Sunday, March 23, 2014

Grant execute on sql user

Back in the early days of sql server, stored procedures were much faster compared to normal queries. This meant that a typical system would host more than 200 stored procedures (hopefully on the same schema). In order to grant execute access to a role or user you can use the following snippet

Friday, February 28, 2014

Removing deleted files from git

If you have accidentally added huge binary files in a repo and you want to remove them using the following git command:
Thanks fly to Sam Watkins for sharing this.

Friday, February 21, 2014

Relative deploy locations for visual studio 2012+

Working with team foundation server, you may end up having various publish profiles to publish various configurations. You can specify relative paths in the local folder location by adding something like the following:
Watch out that the $(MSBuildProjectDirectory) points to the folder that contains the pubxml file, so it points to \Properties\PublishProfiles folder. So, the 3 back in the path, end up in the solution folder (if there is one).

Saturday, February 1, 2014

Visual studio 2013 evaluate expression problem

While debugging in vs 2013, you may run into the issue of the quick watch not evaluating the expressions while debugging. Try enabling Managed Compatibility mode by going to
Options --> Debugging --> General --> Use Managed Compatibility Mode
Note that this happened while debugging wcf services under windows 7 and never occurred on my machine running windows 8.1, but I may have been lucky.
Hope this save you some time and also check this blog post for more weird debug issues

Wednesday, January 22, 2014

Deleting multiple small files fast on windows

If you want to delete 21Gb or small txt files from your hard disk you will notice that the GUI is slow (finding files first etc). The fastest way I have found is the following:

del /f/s/q foldername > nul
rmdir /s/q foldername

Thanks Hugo for the tip.

Tuesday, January 21, 2014

Building CEF with visual studio 2013

Building Chromium Embedded Framework project (CEF) is very easy. It just needs time. Lot's of time and disk space (~21Gb).