Middleman Foundation

This weekend I decided to try out the static site generator, Middleman. While I was working on converting an existing static site, I decided to take the opportunity to try out Zurb’s Foundation and SCSS too. Andrea Moretti created a Middleman template to get you started doing just this, but I hate just using templates without understanding what they are doing. So I decided to start with Middleman’s HTML5 Boilerplate template and add the Foundation Bower package to it....

April 29, 2014

Create a Development Version of an Existing WordPress Site

UPDATE : This article provides a manual approach to creating a development copy of your website. However, I ran across this WPBeginner article which describes a much easier approach using the Duplicator plugin. I would suggest following that guide unless you prefer the manual process. Before We Start Here’s my environment setup. This post should still be helpful if your setup isn’t exactly the same, though. GoDaddy Hosting (production) WAMP (development) phpMyAdmin (production + development) Files Download WordPress Files Instead of using the WordPress export feature, we’re going to grab all site’s files....

January 12, 2014

HTML5 Articles and Sections

Having trouble deciding whether to use a div, section or article in your HTML5 page? Oli Studholme has a great article explaining how they should be used and provides a very simple method for deciding which to use. To decide which of these three elements is appropriate, choose the first suitable option: 1. Would the enclosed content would make sense on it’s own in a feed reader? If so use 2....

December 27, 2013

Force Bundling Optimizations

Use the following code in the BundleConfig.cs of your ASP.NET MVC application to force bundling and minification. // BundleConfig::RegisterBundles BundleTable.EnableOptimizations = true; Why? Why would you do this? Sometimes bundling and minification causes problems, such as in AngularJS. You will want to find these problems before publishing, so just enable this line every once in a while to make sure everything still works as expected with the optimizations.

December 16, 2013

Read Open File in C#

This post is a summary of this StackOverflow answer by Cheeso. To read a file that is currently open (or may be open later) in another process, you must specify a FileShare option. The FileShare flag indicates the modes that other processes are allowed to open the file in. using (Stream s = System.IO.File.Open(fullFilePath, FileMode.Open, FileAccess.Read, // I want to open this file for reading only. FileShare.ReadWrite)) // Other processes may specify // FileAccess of read or write....

December 16, 2013