Featured Post

PHP Design Pattern

Sorry, this is a private post meant only for Red Ventures Developers. If you are a developer, log in here: http://developers.redventures.com/wp-admin/

Read More

Useful Rewrite when moving to/from a CMS

Posted by Kyle | Posted in Public | Posted on 23-08-2010

Tags: , , , ,

0

We often move sites in and out of various content management systems to best fit our needs, and sometimes, you want to change the URLs. In our most recent case, we were moving from an old installation of wordpress, into a smaller, centralized static HTML site. The problem that came up, is that we wanted our URLs to end in .html to match the rest of the non-CMS pages, while the current wordpress installation had them all ending in slashes. Obviously, we don’t want to have to map one-to-one an old URL to a new URL, and we don’t want to be too generic to have a bunch of URLs 301 to a new URL to only 404 when it gets there. So this solution checks for a valid file before sending the visitor a 301.

Web development for the iphone and ipad

Posted by Ryan | Posted in Public | Posted on 30-05-2010

Tags: , ,

0

Interesting smashing magazine on developing web apps for the iphone and ipad.

http://www.smashingmagazine.com/2010/05/28/web-development-for-the-iphone-and-ipad-getting-started/

Regex to Validate Email Addresses

Posted by Ryan | Posted in Public | Posted on 28-05-2010

Tags: , , , , ,

0

There’s so many email address regular expressions out there, it’s hard to know which one works best. This site has done a comprehensive tests of several regex’s and this one appears to be best…for now.

/^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i

http://fightingforalostcause.net/misc/2006/compare-email-regex.php

jQuery tips

Posted by James | Posted in Public | Posted on 13-05-2010

Tags:

0

The ones for gaining speed on DOM insertion are particularly interesting.

http://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips.aspx

Apache redirect subdomains to non www, and regular domains to www

Posted by Ryan | Posted in Public | Posted on 13-05-2010

Tags: , , , , , , , , ,

0

For SEO purposes, it’s always a good idea to send all visitors to one domain for your site. For example, Google will index both http://example.com and http://www.example.com and count it as duplicate content. Therefore, it’s a good idea to forward all traffic to one or the other. In the example below, I want traffic to be forwarded differently if it’s a subdomain versus a non-subdomain. This example avoids using hard coded domains so it can be easily copied and implemented in your .htaccess file or apache conf file.

RewriteEngine on

# Rewrite regular domains to always have www
RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]
RewriteCond %{HTTP_HOST} !^[^\.]+\.[^\.]+\.[^\.]+ [NC]
RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

# Rewrite subdomains to NEVER have www
RewriteCond %{HTTP_HOST} ^www\.([^\.]+)\.([^\.]+)\.([^\.]+) [NC]
RewriteRule ^(.*)$ http://%1.%2.%3/$1 [R=301,NC,L]

Performance Issues with Null Values in a Partitioned Table

Posted by Ryan | Posted in Public | Posted on 07-05-2010

0

http://datacharmer.blogspot.com/2010/05/two-quick-performance-tips-with-mysql.html

The main point is that if you have columns with nulls, those nulls are stored in the first partition and if that partition is large, then you will take a big hit.  To avoid such, add an empty partition to be the first partition and it runs much faster.

Apache htaccess Quick Tips

Posted by Colin | Posted in Public | Posted on 03-05-2010

Tags: , , , , ,

0

http://www.noupe.com/php/htaccess-techniques.html

Our apache configs are pretty complex these days, but this article is a good read for anyone needing a ‘back-to-basics’ primer.

This is a quick read, covering 12 small htaccess snippets ranging from compressing asset files and forcing download headers to how to do a simple 301 redirect.

Exceptions vs Failure Return Codes

Posted by Ryan | Posted in Public | Posted on 29-04-2010

0

http://codeutopia.net/blog/2010/03/11/should-a-failed-function-return-a-value-or-throw-an-exception/

Quick read on when to use exceptions vs when to use return codes.  I think the author does a good job of making something that is a gray area for some developers a little more black and white.

40 Useful jQuery Techniques and Plugins

Posted by Ryan | Posted in Public | Posted on 28-04-2010

Tags: , , ,

0

http://www.smashingmagazine.com/2010/04/27/45-useful-jquery-techniques-and-plugins/

Always fun to find new jquery stuff.

Thoughts:

TipTip - Could be used in conjunction with reporting to show formulas for calculations.

Dygraphs - Could be used in place of flot for dashboards on iPhones

Imageless buttons – Similar to Google’s imageless buttons

Sponsor Flip Wall – Simple enough.  Could be used on our main site to highlight our partners