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).

Thursday, January 16, 2014

Redirect and the ThreadAbort exception

Tired of getting the ThreadAbort exception when you have the Common Language Runtime Exceptions enabled? Then do it properly using the following code:

Response.Redirect(url, false);


Working with Hyper-V on windows 8

I love the new Hyper-V integration on window 8 and I think I will not be able to switch to another version unless there is a Hyper-V support! I have been working lately on multiple dev environments thanks to the virtualization capabilities of win8 and this is a quick guide on how I organize my work environments.

Wednesday, January 15, 2014

Git rebase without commiting changes

If you are working on tons of changes (like switching from bootstrap v2 to v3), you might need to rebase often in order to keep up to date with your colleagues' changes. Working with visual studio helps keeping track of the added files, but if you need to, you can git add --all to add any new files. After that, create a temporary commit:

git commit -m 'tempCommit' // Create a temp commit 
git pull --rebase origin master // Rebase to the latest master 

Fix any conflicts if needed (and do "git rebase --continue" if conflicts occur) and then soft reset the head to discard the temp commit.

git reset HEAD~1

Friday, January 3, 2014

Change unidentified networks to private

Working with Hyper-V in windows 8 you might need to change the private network location to private in order to access the host's web server from a client virtual machine (e.g. testing a site in older browsers). By default, the private network doesn't contain any domain controller or dns server and you might have static ips on your vms and the host. This means that by default the connection's location is public as the network is unidentified. To change the location of your unidentified networks to private, I found a powershell script.