ASP.Net Controller API nuggets

Write Directly to Response Stream Stack-o basically covers this already but kinda danced around how minimal the code can really be for the basic scenario… 123456789101112131415161718192021222324252627 //e.g. $.ajax(url, { procName: "", parms: {deliveryDate:"3/2/2016"}, returnParmName: "" }, ...) public class GenericProcArgs { public string procName { get; set; } //from: //super convenient way to receive JS object with arbitrary properties to be fed straight to proc parms public dynamic parms { get; set; } /// <summary> /// whether to titleCase the JSON property names (handy for feeding auto built datagrids) /// </summary> public bool titleCase { get; set; } = false; public string returnParmName { get; set; } } //here's the beef.

Kendo UI Nuggets

Grid doesn’t like spaces in dataSource field names (I happen to be subscribing to KnockoutJS observable here to receive data feed but that naturally depends on your framework of choice.) Typical Kendo JS error: invalid template Particularly note the way the columns property is generated. 1234567891011121314151617181920212223242526272829303132333435363738 sigCapVm.packingSlips.subscribe(function (newval) { var gridPackingSlips = $("#gridPackingSlips"); var kgrid ="kendoGrid"); if (kgrid && kgrid.columns.length); else { if (kgrid) kgrid.destroy(); gridPackingSlips.kendoGrid({ //workaround for autogenerating columns with spaces //from: http://www.

Nuget Cheatsheet

tip command line uninstall all packages matching pattern `get-package speaking of Humanzier, just install Humanizer.Core to get English only ↩

Updating 2006 MacBook Pro to Windows 10

There’s a fair amount of noise to wade through out there on this topic… this post is a humble gathering of the current state, cira February 2017… once we get the various bits lined up, it’s surprisingly smooth sailing with FULL compatibility under Windows 10 x64, even the latest “Anniversary Edition”… over 10 years later something as complex as Windows maintaining this much hardware compatibility is pretty amazing in our industry.

Fixing OpenSSL on WordPress Windows PHP 5.6+

Background: i ran into OpenSSL errors during the Disqus plugin setup. there’s tons of hits suggesting various solutions, below is the very simple solution that worked for me… Sample error messages: SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed<br /> Failed to enable crypto in ... TL;DR: download latest cacert.pem place it in a pertinent folder (e.g. $\wp-includes\certificates) edit your php.ini > openssl.cafile={full path to cacert.pem}

JavaScript (ES7) async wrappers perfect for Chrome.Bookmarks API

Background: I tasked myself with a little project to sync my Chrome Bookmarks Bar with my Diigo links. Chrome’s Bookmarks API is very straightforward but it is a traditional async callback style call… so it became a good opportunity for me to cozy up to EcmaScript v7’s (ES7) async/await support… since this is done in a Chrome Extension, it lends itself to this hard dependency on ES7 syntax… async/await is supported as of Chrome v55 in Dec.

[SOLVED] Certain Font Awesome icons not showing in Xamarin iOS

Problem None of the icons in the FA v4.7 release were showing up for me, while all the others were… so I had a basic working scenario but not entirely. Background I was doing a simple approach of showing the icons in a Label like so: <Label FontFamily="FontAwesome" Text="&#xf2b5;" /> I had my FontAwesome.ttf file under the iOS project’s Resources folder and via a font explorer tool I confirmed that the v4.

Automatic Header Links

I envied this little eye candy on some other blogs and it was easy to throw together.   If you’re on WordPress, a plugin like Simple Custom CSS and JS comes in handy for stuff like this. CSS a.headerLink:hover { color: inherit; opacity: 1; } a.headerLink { position: relative; transition: opacity 0.5s ease-in-out; cursor: pointer; opacity: .2; } a.headerLink i.fa { position: absolute; left: -1.5em; } a.headerLink:focus { color: inherit !