Tuesday, May 5, 2015

I'm by no means a PowerShell script person. It's pretty useful though, so after an hour or so along with a bunch of internet searches, I came up with a script to add the list of Pingdom Probe servers to my IIS allow list.

Tuesday, January 13, 2015

Windows 8 comes with a handy "feature" called "Automatic Repair", which is supposed to fix your Windows installation.

I've seen this utility ran dozens of times, on dozens of machines, without success. Not a single time has it worked. I'll take my chances with Windows not booting and be fixable, so goodbye auto repair.

Friday, September 12, 2014

One of the problems with using jQuery's show and hide methods is that they are not compatible with the provided Bootstrap css classes "show" and "hide".

What is the problem? Bootstrap's css class looks like this:

.hide {

display: none!important;
}

Those important styles are necessary on some elements to make the behavior as expected. However, jQuery doesn't overwrite them when setting css attributes with the built-in show/hide methods. The recommended way that I found is to manually use .addClass("hide") and .removeClass("hide")...which is way too annoying.

Add the following JavaScript code after the initial jQuery .js file load and all is well.

Sunday, January 19, 2014

(this post is formatted poorly, it will be fixed later because I really need to post this one before I forget it)

On my latest project I upgraded to Entity Framework Version 6 and everything was fine until I tried to add a Stored Procedure function import.

After adding that I could no longer build the project and the error message of "The type or namespace name 'Objects' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)" started showing up.

Note: After you install the tools, your model will still not compile. To fix it you must either:

Delete and re-add the Model.edmx to your project

OR

Create another model and copy the Context.tt file from it over your initial model. After you copy the .tt, on Line 5 you'll need to set the name of your original Model.edmx

Line 5: const string inputFile = @"OriginalModel.edmx";

Now, after it compiled I ran into the fun error message "System.InvalidOperationException: The value of EntityCommand.CommandText is not valid for a StoredProcedure command. The EntityCommand.CommandText value must be of the form 'ContainerName.FunctionImportName'." At this point I was almost ready to write EF6 off as unusable, but I found a page at http://www.dotnetbits.com/entity-framework-6-t4-templates/ that gave me the updates to Context.tt that I needed.

Monday, September 30, 2013

My USB drive died and I needed a very quick way to get some larger files from my tablet to my laptop. The largest problem was that I was connected over an open WiFi network in my hotel room and I needed it to be as secure as I could make it.

So, creating an ad-hoc network came to mind between my laptop and tablet to transfer the files. I have never actually had a need to create one of these, but the steps are more manual than I remember them being in previous versions of Windows.

Open up the network adapter list, you can search for "View Network Connections" in the Windows 8 search.

Enable Internet Connection Sharing (ICS) by going to the Network Adapter properties you want to share (the same place you'd assign an IPv4 static IP at) and choose the Sharing tab. Then just enable it to be shared by others.