Many small applications need to store user credentials, but it’s hard to create a good username/password infrastructure. What if you could just use a small XML file with credentials that don’t actually stores the password, but just a hash and some salt.
Increase WordPress performance on IIS
I noticed that the Time To First Byte (TTFB) of my website was taking way too long. First I thought it should be resolved by caching, but I noticed that it couldn’t be the caching, because TTFB kept being pretty high. After some research I found the culprit: IPv6 with the MySQL driver.
How to download a URL and get its MIME type using the C# WebClient?
A while back I needed to download a URL and determine the MIME type. Fortunately many web servers will send the MIME type of the resource back to the client (so browsers even require it). Here is a snippet of C# code that does the trick.
Fixing IE Quirks Mode in ASP.Net
Quirks mode refers to a technique used by some web browsers for the sake of maintaining backward compatibility with web pages designed for older browsers, instead of strictly complying with W3C and IETF standards in standards mode. Here’s how to force IE into submission by adding a DLL to ASP.Net.
Little life saver: parsing HTML entities
Click to ‘select all’ on the PRE element
When you want to display code, you’re probably working with pre elements. The fact that they can contain markup make them really effective for syntax highlighting. I’ve used Knockout en comment binding to generate code into a pre field and that’s really cool.
Subscribe to all changes of an entire Knockout ViewModel
Knockout is amazing. It is fast and intuitive. I use the subscribe function a lot, but I found myself lacking a general subscribe that allows me to track the changes of an entire ViewModel, so I created one myself that even supports unsubscribe and throttling.