gabrewer.com

Life is too important to be take seriously.

Cool Development Utility - xip.io

Post a comment

I stumbled across a mention of a free service xip.io that spared developers the hassle of editing their host file for every new development web site they needed to setup. Having had to edit the host file many times this really appealed to me. So I went to find out what type of black magic enabled this.

What I found was a very simple and brilliant solution from Basecamp (formally 37signals. xip.io is a public custom dns service that given a [domain name].[ip address].xip.io returns the ip address specified.

For example

www.gabrewer.com.192.168.1.10.xip.io resolves to 192.168.1.10
dev.gabrewer.com.192.168.1.10.xip.io resolves to 192.168.1.10
dev.www.gabrewer.com.192.168.1.10.xip.io returns 192.168.1.10

Since this is a hosted service it works for all devices that have an Internet connection including tables, phones and other Internet connected devices.

I always love it when I find a nice piece of engineering that simplifies my development experience.

My first pull request - WebApiContrib.Formatting.CollectionJson

Post a comment

In my latest project I am using the great Collection+Json ASP.NET Web API library that Glenn Block put up on GitHub a while ago.  After using it for a while I decided to refactor my code and use something other than an int for my type identifiers.  When I changed to use the generic type, I discovered an issue with the code that had added the generic identifier capability to the library.  The Create method was still retuning an int instead of the generic TId.

So I wrote up the issue on GitHub and Glenn Block immediately responded asking if I was going to submit a Pull Request.  I am still relatively new to git and am still trying to grok it.  But since I had already forked the repository and updated the code, I figured this would be as good time as any to figure how to submit a pull request. 

Even though it was a one line change to the return type of the Create method, I realized that there were no unit tests for the CollectionJsonController class taking a generic identifier value.  So I decided I should fix that as well and created a XUnit test for this scenario by cloning the existing tests with just a Controller that used a string for the identifier.  Once I had the tests and the code working, I went about figure out how to submit my first pull request.

I found an excellent resource that made the process relativity straight forward and painless.  https://www.openshift.com/wiki/github-workflow-for-submitting-pull-requests 

You can find my first pull request (modest as it may be) at

https://github.com/WebApiContrib/WebApiContrib.Formatting.CollectionJson/pull/12#issuecomment-22815387

Nice JavaScript library for formating numbers and currency

Post a comment

In my continuing effort to really learn JavaScript, I was working on putting together a shopping cart application using JavaScript.  One of the things I needed to do was format some of values as currency. 

So I started looking around at the various techniques to accomplish this and ran across accounting.js a tiny JavaScript for number, money and currency formatting that seemed to fit the bill nicely. 

Now I can just do this.

accounting.formatMoney(12345678);    // $12,345,678.00
http://josscrowcroft.github.com/accounting.js/

Cisco Nexus 1000V for Microsoft Hyper-V Beta Program and Webinar

Post a comment

I just found this post from Aidan Finn via Damian Flynn’s blog post regarding the webinar and beta program for the Cisco Nexus 1000V switch for Microsoft Hyper-V on March 6th at 12pm EST. 

I am interested in learning what features the Nexus 1000V will provide leveraging the Hyper-V Extensible Switch.  We are currently using the SFlow Agent for Window Server 2012 Hyper-V to monitor our VM traffic and it is great for getting insight into the network utilization of the individual VMs.

Damian Flynn - Cisco Nexus 1000v Public Beta Program

Aidan Finn - Unveil Of Cisco Nexus 1000V Distributed Switch For Windows Server 2012 Hyper-V

ASP.NET and Web Tool 2012.2 Released Today

Post a comment

The ASP.NET and Web Tools 2012.2 update was released today.  There were many updates including some big additions like OData support and SignalR.   Some of the things that jump out at me form the release notes.

“Paste JSON as a .NET class. Using this Special Paste command to paste JSON into a C# or VB.NET code file, and Visual Studio will automatically generate .NET classes inferred from the JSON.”

“Mobile Emulator support adds extensibility hooks so that third-party emulators can be installed as a VSIX. The installed emulators will show up in the F5 dropdown, so that developers can preview their websites on a variety of mobile devices. Read more about this feature in Scott Hanselman’s blog entry on the new BrowserStack integration with Visual Studio.”

ASP.NET Web API OData

ASP.NET Web API OData gives you the flexibility you need to build OData endpoints with rich business logic over any data source”

“ASP.NET SignalR

ASP.NET SignalR makes it simple to add real-time web capabilities to your ASP.NET application, using WebSockets if available and automatically falling back to other techniques when it isn’t.”

Related Blog Posts

ASP.NET and Web Tools 2012.2 Release Notes
ScottGu - Announcing release of ASP.NET and Web Tools 2012.2 Update
Scott Hanselman - Released: ASP.NET and Web Tools 2012.2 in Context
Jon Galloway - Announcing the ASP.NET and Web Tools 2012.2 Release!
Web Tools 2012.2 and Web Essentials

Web Platform Installer crash when viewing Products or Applications

Post a comment

Today when I was trying to setup WordPress on my Windows 8 development machine the IIS Manager would crash with an System.OutOfMemoryException exception.

Exception:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.
Check InnerException for exception details. ---> System.OutOfMemoryException: Out of memory.

After doing a quick Bing search turn up this article on the IIS.NET Forums and after clicking “Get New Web Platform Components” problem solved.