I had to process a lot of Word .docx files into readable content for use in a searchable database.  Docx files are basically xml files in a zipfile container (as described by wikipedia).  Here is my solution, it’s pretty straight forward.  Just pass in the server file path to the read_docx() function and it will… Read More


Validating Email Addresses is one of the more elusive patterns to define, but this pattern will match 99.99% of all email addresses in actual use today.

A further change you could make is to allow any two-letter country code top level domain and only specific generic top level domains. This regex filters dummy email addresses… Read More


I develop a lot of data parsers and continuously run into composite mailing addresses that require to be split into their meta collections. The following Regex pattern will reformat these two style addresses into XML tag elements. SAMPLE ADDRESS DATA: 1200 Ocean Rd., Narragansett, RI 02882 1200 Ocean Rd., Narragansett, RI 02882-1234 FIND PATTERN USING… Read More


If you’ve ever used Amazon’s AWS console then you probably know that though sometimes it can be clunky, it has a ton of functionality for interacting with the various AWS services. So when I needed to give one of my coworkers access to one of our S3 buckets, I immediately investigated the laziest option: figuring… Read More


Google Design are open-sourcing 750 glyphs as part of the Material Design system icons pack. The system icons contain icons commonly used across different apps, such as icons used for media playback, communication, content editing, connectivity, and so on. They’re equally useful when building for the web, Android or iOS. Check them out: https://github.com/google/material-design-icons/releases/tag/1.0.0… Read More


Responsive videos seem to be an after-thought for many websites. While text and images are easy to resize to mobile and tablet screens, videos have always required extra work. Even popular video sharing sites like Youtube.com still don’t have an easy “responsive” option and require specifying a video dimension for embedding. Luckily, the 3.2+ version… Read More


As 2015 comes to a close, it seems appropriate to round out a list of the best AngularJS templates that I’ve seen this year. Whether you’re looking to build a dashboard application, a portfolio application, or you are merely looking for a responsive AngularJS template to build your application on, there is sure to be a… Read More


First, note that it is not possible to detect whether text belongs to a specific undesired encoding. You can only check whether a string is valid in a given encoding. You can make use of the UTF-8 validity check that is available in preg_match since PHP 4.3.5. It will return false (with no additional information) if… Read More


Having worked with CodeIgnighter for many years, I’ve crafted the following the following HTACCESS script to meet most CI needs.

 … Read More


Here’s a question guaranteed to make your stomach lurch: “Would you mind if I gave you some feedback?” What that means is “Would you mind if I gave you some negative feedback, wrapped in the guise of constructive criticism, whether you want it or not?” The problem with criticism is that it challenges our sense… Read More