Featured Post

How To Spend Millions and Fail During the Super Bowl

Easy. Use Java. Just saying. Actually this is a FAIL for Dockers not Java. It doesn’t matter which technology you use you can scale it (it just may cost more than others). You think they would have at least done performance testing on this before they released it. Wait, Dockers makes pants, so they...

Read More


PowerShell – Speak Number of Lines of Code

Posted by Keith Elder | Posted in PowerShell | Posted on 26-02-2010

Ok, this is a total trivial post using PowerShell but it just shows some of the crazy fun things one can do with PowerShell.  Here is what this does. It uses the speech APIs in Windows to speak the number of lines of code found in a folder.

$speak = new-object -com “SAPI.SPVOICE”
$x = (dir -Include *.cs, *.aspx -Recurse | Select-String .).Count
$speak.Speak($x)

Of course if you just want the number of lines of code then just run the line in the middle.  But you have to admit, it isn’t near as fun!

NOTE: I am no PowerShell expert, please use the above code at your own risk!