Free Website Monitoring via Google Documents

OK, this is wicked cool.  I wonder how much traffic Google will allow from something like this before they start to block it?

Anyway, this is a web site monitor that can email you when your site goes down – in Google Docs form.  It allows for email and SMS notification when the site goes down.  The SMS method is definitely hackish, but admirable in a way.

Has a granularity of five minutes.


Posted in | Leave a comment

Personal: Committed to the Crime by Chaos Chaos

What does it mean when a song from a cartoon strikes home so deeply you seek it out and purchase the entire album?  I’m pretty sure it means I’m even more screwed up than I believe.

The cartoon in question is Rick and Morty, Season 2, Episode 3, Auto Erotic Assimilation.  The ending is brutal, and over the animation the song Do You Feel It? from Committed to the Crime by Chaos Chaos plays.  Maybe it’s not as powerful without that association.  But it’s in my play list now.

Amazon:  Committed to the Crime by Chaos Chaos
YouTube:  Rick and Morty, Season 2, Episode 3, Ending Scene

Posted in Personal | Leave a comment

Windows 10: Uninstall the Built In Applications

Microsoft includes many applications in Windows 10.  Most of them are tiny and aren’t really worth the effort of uninstalling, but it can be irritating to not know how to get rid of them if we wanted to.  Here we’re going to go ahead and uninstall the aforementioned Get Office application.  Then I’ll detail how to get the package name for other applications you might want to uninstall using the same process.

The first step is to search for Powershell:

RemoveApplicationsWindows10-1Then right click on the Windows Powershell shortcut and choose Run as administrator.  If you have two options – Windows Powershell and Windows Powershell (x86) – choose the version without x86 appended.

RemoveApplicationsWindows10-2A text window will appear with white lettering and a blue background.  At the top it should indicate Administrator: Windows Powershell.

RemoveApplicationsWindows10-3Type (or paste) the following into the window:

What we’re doing is running two commands, separated by a vertical pipe.  The first retrieves the package details of any package which matches *officehub*.  This output is then piped into the Remove-AppxPackage  cmdlet.  Remove-AppxPackage  is responsible for removing the package specified by the output from Get-AppxPackage  from the current user.

There’s no confirmation output, unfortunately.  You should see your system equivalent of an hourglass pop up for a moment while the application uninstalls, though.  You can close Powershell by typing exit  or clicking the close window button.

To retrieve a list of packages which can be uninstalled in this manner, use the following command:

Example output below:RemoveApplicationsWindows10-4So if we wanted to remove the Microsoft Camera application we’d execute the following command, using the names from the previous command:

So why not execute the following?

Simply put, it’s simpler to pipe the output of the Get-AppxPackage  command into the Remove-AppxPackage cmdlet.

Remove-AppxPackage accepts two types of arguments for specifying which application to uninstall, an AppxPackage object or a package name.

The output of Get-AppxPackage  is an AppxPackage object.  So when piped to Remove-AppxPackage  it qualifies as the first argument type.

The package name is much longer and more complex than Microsoft.WindowsCamera.  It is the PackageFullName specified by Get-AppxPackage .  For Microsoft.ZuneVideo on my system this is Microsoft.ZuneVideo_3.6.1.13571.0_x64__8wkyb3d8bbwe.

RemoveApplicationsWindows10-5Microsoft.ZuneVideo is much easier to understand and remember.

All of the above pertains to the current user only.  All of these commands will leave the application on the system intact, and installed for any new users created.  To remove the package from the system entirely we must switch to a different set of commands.

First, to retrieve a list of packages on the system which are uninstallable:

DISM is an acronym for Deployment Imaging Servicing Management.

Sample output:RemoveApplicationsWindows10-6Again, we’re retrieving the PackageName from the cmdlet Get-ProvisionedAppxPackages  and displaying it.  You’ll see that we’re dealing with the full package name for this type of uninstallation.

To remove a package, execute the following:

Example output:

RemoveApplicationsWindows10-7That covers that.

Technet: Get-AppxPackage
Technet: Remove-AppxPackage
Technet: Get-AppxProvisionedPackage
Technet: Remove-AppxProvisionedPackage
Technet: Deployment Imaging Servicing Management cmdlets in Windows PowerShell


Posted in Windows 10 | Leave a comment

Dragon Age: Inquisition Finished

Origin says I have 268 hours of game time for Dragon Age: Inquisition and all three DLC (Trespasser, Descent, Jaws of Hakkon).  Now I leave my computer on overnight with the game running all the time, so I’m sure a good number of those hours are AFK time.  Still, the game was long enough that I’m sure I got my money’s worth.  Inquisition was $60.00 (bought it at release) and each expansion was $15.00.  $105.00 for let’s say 200 hours of game time.

Movie tickets cost much more per hour than that.

So I’m satisfied with the amount of game play I had, but I’m greatly disappointed in some things.

First, a hard level cap of 27.  Even with all three DLCs installed this level cap was enforced.  This meant that for the last third of my game time I didn’t gain a single experience point.  One of the primary enjoyments I have from an RPG is growth in power; the ability to return to an area visited before and absolutely stomp over the creatures that killed you previously.

Second, crafting and equipment.  I was able to craft weapons and armor that were without equal through the official end of the game (the Trespasser DLC) by (again) the last third of the game.  So I tromped around a humongous area gaining nothing but quest completion (which rewarded me nothing) and fighting creatures (which rewarded me with nothing).

Third, stronghold customization.  Basically, when I first read about the game this seemed like a really neat feature.  In game you’ll find that all changes to your stronghold are purely cosmetic.  Actually, referring back to crafting, the quarries and logging stands were probably the hardest item to find in the game for me.  For cosmetic changes.  It was disappointing.

Finally, the big one.  Level scaling.  You’ll note that I previously indicated that I liked growth as part of an RPG.  Level scaling completely removes that from the equation.  Only parts of DA:I were level scaled, but it happened often enough I was tired of it.  The difference between me fighting a level 19 Qunari and a level 27 Qunari should not be measured solely in time.  That does nothing for me as a player; much less answer questions of “Why did I have to save the world?  Why couldn’t one of these common Qunari warriors do it?”

Worse, the level scaled areas and enemies dropped loot and contained crafting ingredients that were not level scaled.  A double whammy.

I didn’t like level scaling in Wizardry 8, I didn’t like it in Oblivion, and I sure as hell don’t like it in DA:I.  To me it reduces everything I’d done to get to level 27 to nothing.


Finally, to lighten the mood, the inexplicably lit torches.  Who lights these things in these dungeons that haven’t been explored for a thousand years?

With the new Game of the Year edition it’s probably worth a look despite these complaints.  You’ll get a ton of playtime out of it if you’re into RPGs at all.

Back to our regularly scheduled programming.


Posted in Games | Leave a comment

Windows 10: Turn off the “Get Office” notification.

I detest notifications from applications which I regularly use.  I really detest useless notifications which are trying to sell me something I already have via MSDN.  The “Get Office” notification that’s preinstalled with Windows 10 is definitely in the second case.

These notifications originate with the application Get Office.  You can uninstall it but apparently it sometimes reinstalls itself.  (Microsoft, I love you, but you’re getting really annoying with these decisions.)  The permanent method of disabling the notifications is via the Notification Center.

Open up the Settings menu.

DisableGetOfficeNotification1Select Notifications & actions from the next window.

DisableGetOfficeNotification2Scroll all the way down until you see the Show notifications from these apps section (highlighted in the picture below in red).  Find the Get Office application and hit the toggle slider (highlighted in the picture below in yellow).

DisableGetOfficeNotification3You’re done.  No more pesky notifications.


Posted in Windows 10 | Leave a comment

Ubuntu Linux: How do you interpret system load?

System load can be seen in the uptime command as well as the top command.  But how do you interpret it?


The three numbers after load average represent, in order, the 1 minute, 5 minute, and 15 minute averages of load.

Roughly, each increment of 1 in the system load corresponds to 1 core of a CPU being fully utilized.  If you’re running a single core processor, a system load of 1.0 means you’re maxxed out.  2 cores gives you up to 2.0, etc.

How many processors do you have?  Use the nproc command to determine that.


In my two screenshots you’ll see that I’m overloaded.  While a CPU and motherboard upgrade had been planned (and lost in sparks and fire, a story for another day) I’m not too worried.

When you run top and hit 1 (the number one) you’ll get an evaluation as to what your CPU is doing.


The abbreviations correspond to:

  • us:  The user CPU time (or) % CPU time spent in user space.
  • sy:  The system CPU time (or) % CPU time spent in kernel space.
  • ni:  The user nice CPU time (or) % CPU time spent on low priority processes.
  • id:  The idle CPU time (or) % CPU time spent idle.
  • wa:  The wait CPU time (or) % CPU time spent in wait (usually on disk)
  • hi:  The hardware IRQ (or) % CPU time spent handling  hardware interrupts
  • si:  The software IRQ (or) % CPU time spent handling software interrupts
  • st:  Steal time – % CPU time in involuntary wait by virtual CPU while the hypervisor is servicing another virtual processor.

Looking at my numbers across the board there’s roughly 30% of the CPU time being spent in user and kernel space.  Another 30 to 40% is spent idle.  And 35 to 70% is spent waiting on resources.

I’m I/O bound.  This isn’t a startling revelation; I’m currently running a process which is verifying checksums on roughly 50GB of data, with another process decompressing and moving about 200GB of data.  And due to the aforementioned loss of equipment, the server is currently running on a 2.5″ SATA drive that I’m pretty sure spins at an incredible 5400 RPM.

Key takeaway:  number of cores * 1 = maximum system load.  Worry when you begin to reach 70% of that number; investigate the details to ensure you’re CPU bound and not I/O bound.

Posted in Ubuntu Linux | Leave a comment

Windows 10: Windows 10 Insider Preview says I’m an Evaluation Copy?!

Worried about the fact that Windows 10 claims your Insider Preview is an evaluation copy? That’s because it is.

You’re on the fast ring for updates, and the current version of Windows 10 you’re running is just that – an evaluation. It’s not meant to be permanent. When a Windows 10 version gets promoted to the slow ring it is promoted from a build to a release. Release of Windows 10 won’t have the evaluation notice on them. (NOTE: This is not the correct terminology.)

You can double check your licensing status by executing

from the command line. A permanently activated machine will look as follows:


Posted in Windows 10 | Leave a comment

Cannot show requested dialog. Property Owner is not available for Database ‘[DatabaseName]’.

This error popped up on me today while I was trying to shrink files for a database.


So I checked the owners of my databases:

And sure enough, I had NULLs for several owners.  No idea how that happened.  Easy enough to fix.  Switch to each database in turn and execute the sp_changedbowner stored procedure.

Problem fixed.

Posted in General | Leave a comment

Humble and Downloading Purchases in Bulk ( is a site where you can buy bundles of software (games and applications) and choose not only how much to pay, but how to distribute the payment.  Payments go to charities, developers, or both depending upon how you split it.  It’s a great way to get games at Steam Sale pricing – I have some two hundred odd games available to me through the site., fka as Good Old Games, is a distributor of DRM free software.  They take games and update them or package them so they work on a modern system (including OSX and Linux in many cases).  The just released the Forgotten Realms Collection 1, Forgotten Realms Collection 2, and Forgotten Realms Collection 3.  More commonly known as the Gold Box series from SSI – my most favorite games ever.

The problem becomes remembering you have purchased a game at these sites. has introduced GOG Galaxy which is similar to Steam in many respects but it’s not as mature.  You can’t save downloaded content directly to a network drive, for instance, and downloading extra content like manuals and avatars is a few steps out of the way of the normal download process.

To that end, I went in search of a downloader for both and  And found a quality product available for each.  Both are Python scripts.  This article covers the downloader; the next article will cover the Humble Bundle downloader.

First, for, there’s GOGrepo.  You need Python 2.7, html5lib, and html2text; you can use PIP to install the Python modules with pip install html5lib html2text .  Download the Python script to the root of the folder you wish to download your collection to and execute login .  Even though the shell output copied here is from a Linux box it should be identical on a Windows box or OSX.

This saves your session information to gog-cookies.dat.

Next you’ll want to update the manifest of files which are available to you for download.  This is done using ./ update -os windows linux mac -lang en.

As you can see it can take some time to download game information.  The information downloaded here is saved to gog-manifest.dat.

I ran GOGrepo in the same directory as my existing collection, which requires that you import the files so it knows doesn’t attempt to redownload files you already have. This is done using ./ import . .. More specifically, the first dot is the source directory of the files you want to import and the second dot is the destination directory of the files you want to import. In my case, the current directory was where I wanted them stored and imported from.

GOGrepo will calculate the MD5 checksum for each file it finds and compare it to the file information it downloaded in the manifest.

This takes some time, depending upon the size of your existing collection.  (And this can be skipped if you don’t have a collection you wish to import.)

Once this process is done we’re ready to begin our download from GOG using the command  ./ download .  The command starts by informing us as to what files it’s doing to download.  A pass indicates that the file passed inspection and will not be downloaded; a download indicates that the file failed the MD5 check or is not present and will be downloaded.

Once it’s listed out all of the files it intends to download, it will begin the download process.

It downloads the files in parallel, and gives updates once a second as to the estimated data and time left.

Note that with the recent restructuring of games (separating bundles into individual games) you may find that some files you already have are redownloaded.  As an example, I had all of the Ultima games – but not in their separate folders.  GOGrepo marked these as needing download.

Posted in Games | Leave a comment

C#: Finding Credit Cards within Free Form Text

Preliminary Notes:

Your users, unaware that it is a PCI DSS violation to store a PAN have been entering PANs into a free form text field, along with expiration dates and CVV code.  You’ve been tasked with identifying the PANs and CVVs and masking them in the text.

First stab at a credit card regular expression would probably go something like this:

For the regular expression impaired that would be a word boundary (\b) followed by a decimal digit (0-9) 4 times {4}, followed by a space or – [ -] zero or more times; this set is repeated.  A number in curly brackets specifies the number of times a prior definition should repeat; characters in square brackets specify the acceptable characters in the set.

That would match a PAN entered in the following formats:

4012 8888 8888 1881

Using RegexLab we can validate this:


But what happens if the PAN isn’t so neatly separated from the text?  We can see in the above screen shot that CC4012-8888-8888-1881 isn’t matching the expression.  That doesn’t work.

So, easy enough, we just want to pull the word boundary definition then, right?  New regular expression might be:

Results:CreditCardBasicRegularExpression2We matched the PAN with text mashed up against it, but now we’ve also matched the UPS tracking number.  That’s problematic.  While the users are in the wrong in this situation if we start to mask tracking numbers, they’re probably going to hang us out to dry.

We could add a requirement to the regular expression that it’s not prefixed by 1Z.  That would look something like this:

(Note:  negative lookahead is not supported by Javascript.)

CreditCardBasicRegularExpression3Great!  Well, wait a moment.  Let’s take a closer look at the types of available credit cards that are out there.  The following table is cribbed from the Bank card number Wikipedia page.  Non active types have been removed.

Issuing networkIIN rangesActiveLengthValidation
American Express34, 37Yes15Luhn
China UnionPay62Yes16-19Luhn
Diners Club Carte Blanche300-305Yes14Luhn
Diners Club International300-305, 309, 36Yes14Luhn
Diners Club International38-39Yes16Luhn
Diners Club United States & Canada54, 55Yes16Luhn
Discover Card6011, 622126-622925, 644-649, 65Yes16Luhn
Maestro50, 56-69Yes12-19Luhn
Solo6334, 6767No16, 18, 19Luhn
Visa4Yes13, 16Luhn

The first thing we see is that not all PANs are sixteen digits long. American Express, Mastercard, Discover, and Visa were definitely in the mix for me, meaning I needed to support 15 digit card numbers as well as 16.  Fundamentally, supporting all the types listed above represent equal difficulty.

So, given an American Express number how does our existing regular expression fare?

CreditCardBasicRegularExpression4Not well, it turns out.

So we can’t use four groups of four digits as the basis for our regular expression.  Stepping back a moment we know that we want to match digits, spaces, and possibly dashes, with any number of digits between 12 and 19.

CreditCardBasicRegularExpression5Unfortunately, we’re matching the phone number at the bottom now. “But it’s only 10 digits long!” Our regular expression asked for 12 to 19 characters with digits, spaces, or dashes. The complete phone number, including spaces, is twelve characters long.

What we really want is 12 to 19 digits, ignoring selected contents between the digits.  (That selection will change based on your input and environment.)

There are methods of making a character conditional in a regular expression but not of requiring a particular length without said conditionals.  There really isn’t a solid way to ensure you have 12 digits, minimum.  (It might be doable by someone more familiar with regular expressions.  Would love to hear how.) The return on investment for any research in this regard was rapidly dwindling.

We’ll have to deal with that issue in a procedural fashion.  Right now we need to ensure that when we lift a PAN from text that we actually pull the entire PAN.  We don’t want to pull only the first ten digits and leave out the final six because of odd spacing.

To this end we’ll increase the regular expression to accommodate up to twice the expected size, allowing for a credit card numbers entered like so:

4 0 1 2 8 8 8 8 8 8 8 8 1 8 8 1

Or any variation thereof.

RegexLab .NET result:

CreditCardBasicRegularExpression8Here’s a test against every test PAN on the Paypal Object’s page:

CreditCardBasicRegularExpression9The phone number and UPS tracking number are problematic, but understandably so.  As discussed above, the phone number matches the regular expression we’re using.  The UPS tracking number, if the highlights are examined, actually begins matching a character away from the 1Z prefix we were using previously.

Again, we’ll filter those out later.  In fact, we’re going to remove the UPS prefix exclusion at this point.  It no longer serves a purpose.

I never intended to identify the PANs in one step; if you can, which I doubt, it’d be one hell of a complex expression.  We’re going to use the regular expression we have and pull in matches from the text in order to further identify what we have.

We define the CreditCardRegex.  Then we define a function named FindAndMask, meant to identify PANs in the provided text and mask them with asterisks.  Inside of Mask, we iterate through the results of calling Regex.Matches with the input text and regular expression provided.

If there are no matches no changes to text occur and we return that unchanged value.

If there are matches, we need to narrow down whether they are a genuine match, a phone number, UPS tracking number, or any other incidental number which happens to occur in the environment.

Looking at the table of card definitions there are four variables.  Issuer name, issuer prefixes (IIN), minimum length, and maximum length.  We can encompass the last three variables in one regular expression per definition if we strip the data of all non numeric characters prior to applying the regular expression.

Alternate LINQ syntax:

For the definition, we need only a name and regular expression.  That fits neatly into the definition of a key/value pair.

So now we begin defining regular expressions for each card type.  We’ll use the static constructor of the CreditCardFilter class to populate the CardDefinitions dictionary.

American Express’ IIN start with 34 or 37 and are 15 total digits in length.

China UnionPay’s IIN start with 62 and are 16 to 19 total digits in length.

Diner’s Club Carte Blanche’s IIN start with 300, 301, 302, 303, 304, or 305 and are 14 digits in length.

The first Diner’s Club International definition is identical to Diner’s Club Carte Blanche. The two additional definitions start with 309 or 36 and are 14 characters in length. This is the first definition which doesn’t fit neatly into solution. We could create two definitions, or use an conditional operator. I chose the conditional.

Diner’s Club (United States & Canada) IIN starts with 54 or 55 and is 16 digits long.

Interpayment’s IIN starts with 636 and is 16 to 19 digits long.

Instapayment’s IIN starts with 637, 638, or 639 and is 16 digits long.

JCB starts with 3528 through 3589 and is 16 digits long.

Maestro starts with 50 or 56 through 69 and are 12 to 19 digits long.

Dankort starts with 5019 and is 16 digits long.

Mastercard starts with 51 through 55 and is 16 digits long.

Solo starts with 6334 or 6767 and is 16, 18, or 19 digits in length.

Visa’s IIN starts with a 4 and is 13 or 16 digits in length.

UATP’s IIN starts with a 1 and is 15 digits in length.

The final step in identifying a possible PAN (and that’s all any of this is, ultimately: a possibility) is to run the PAN through the Luhn algorithm. The Luhn algorithm isn’t a definitive tool for identifying a PAN; it simply increases the credibility of a random sequence of digits of being one.

While it’s not a complicated algorithm, we’re not going to write this ourselves.  We’re going to rely upon the Rosetta Code implementation.

We have everything in place to identify possible PANs, but no capability to mask them.  A couple of requirements in that regard:

  • The spacing of the filtered PAN should match the original.
  • The last four digits of any PAN should be left unmasked.

Because of requirement #1, we can’t simply grab the last four digits of the stripped PAN and use that for requirement #2.  Those digits might be 2 222 in the original text.  What we need to do is iterate backwards through the original matched text, counting digits, until we hit 4.

The masking function needs to iterate through the PAN and replace every digit with an asterisk. Remember that we should be dealing with the original match value as arguments to these functions, not the stripped values.

At this point we have the capability to identify a possible PAN of most major formats and the capability to mask it, leaving intact the last four digits of the account number. We can add the meat to the FindAndMask function we previously defined.

We need to setup unit tests for this code, and then examine the situations we’ve already identified as problematic and resolve them.

Both of those will come in a second post very soon.

Posted in Programming | Leave a comment