Brad Foley

SiteCore Certified Developer

For the past week, ending on Friday, I was in Atlanta training with the SiteCore team. I’m now certified on an exciting product, SiteCore XP (Experience Platform) 8. With the aquisiton of the Commerce Server line, and now Commerce Server being directly integrated with Commerce Server, I though this certificaiton and training would be worth…

Search for a string in files PowerShell

So many times I have had to hunt down a piece of code, or find a method. This is my go to command. It simply allows me to search all text in a directory recursively and outputs the names of the files that contain my pattern or search string. Search strings in files using PowerShell:…

Generating a SHA256 from a file

I have been working on cleaning up my family’s collection of photos. Before I was married I believe my total count was around 300 or so. Now that I am married and have 2 kids. I just checked and there are 30,000. I believe there to be quite a few duplicates in my collection. I’m…

Breaking A Simple Captcha (Part II)

Now that we have an appropriatly cleaned and processed image, which will greatly improve the success of our OCR lets look at that side of things. I’ve opted to use tesseract-ocr and the .NET Wrapper provided here. This is also available via NuGet here. Thankfully this code is rather quick and easy. Using the Bitmap returned from…

Breaking A Simple Captcha (Part I)

Time after time, well not that often, actually only about three times in my career I have found myself entering CAPTCHA after CAPTCHA trying to load test, enter a content multiple times, or whatever.  It’s a daunting task. This time, I decided that I was going to automate it. Here is a sample of the…

Easing Space Requirements of Your Development Databases

One of the my biggest pains with development environments is management, obviously they don’t need or deserve the attention that would be give to a production environment.  Recently, actually today, one of my database servers ran out of space. Why you ask? Let me tell you, because we left everything in full recovery mode, and…

Making Exception Information Human Readable

Often times developers will log exceptions. Which in itself is a good thing. However, they generally only log the Message property, which can and often times is useless. My solution is the method below.

This is a simple bit of reflection code that writes out each of the properties and values of an exception…

Debugging Windows Services

Once again, it’s time to develop a windows service. Sometimes I try and avoid these type projects, but i have a very specific requirement that whenever a file changes on a server that a call is made to an edge caching device to evict that item from cache. One of the things that I hate…

The true cost of an outage….

So, I was shopping around, at work, i know i’m a horrible person. But what i needed was a simple timer light switch for my outdoor lights. I did a search on Google. I came up with the first link of course being home depot, i click and this is where i end up. A…