Justin Walker

WEB DEVELOPER, CAT ENTHUSIAST, FAN OF VINTAGE COCKTAILS, TRAVEL, AND BREAKFAST BURRITOS

IIS - Rewrite Subdomain To Corresponding Subdirectory

At work we have a website setup to showcase some of our work. We only ever send people directly to a specific example and the method we employed was to just put each web project in a subdirectory of the root (e.g. example.com/great-project). This can be problematic, especially for single pages apps, where the code is expecting the site to be located at the root. To avoid having to edit code I s...

Parse, PHP, and cURL on Windows Azure

I was recently trying to use Parse’s PHP SDK and was running into some issues when I deployed the project to Azure. Whenever I would attempt to run any of the Parse scripts I would get a 500 Internal Server Error.It turns out that Parse is using cURL which does not ship with it’s own CA certificate bundle. To fix the problem I needed to specify a CA cert bundle for PHP’s cURL. All the steps bel...

C# - String to Title Case

I was recently given a bunch of data to import where the names of businesses where all capitalized and I needed to store them in title case. TextInfo has a ToTitleCase method but it does not account for special characters (e.g. “O’BRIAN” or “BEST-COFFEE”).I ended up writing a string extention method where I first run ToTitleCase then apply regex to look for letters following special characters....

Simple forms authentication for Azure Websites

I needed a way to password-protect a staged version of a project I was working on that was up on azure websites. Normally I would use an .htpasswd but that doesn’t work on IIS. I found gist that someone had put together that was using forms authentication and I made it all bootstrappy.Just place both files in the root of your project.

CSS - Full Page Fixed Background on iOS

I struggled for a bit trying to get this to work on iOS. I had a background set to cover on the HTML element and on a desktop browser it worked great. The issue with iOS (and other touch screen devices) is that the background did not stay fixed and was also stretched to the total height of the content (not the viewport).This was the solution I came up with that worked:html { background: url('pa...