Skip to content

Instantly share code, notes, and snippets.

@aenigme
aenigme / .htaccess
Created August 6, 2010 16:02
Kohana htaccess file
RewriteEngine on
RewriteBase /
# Add www rule
# RewriteCond %{HTTP_HOST} ^example.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
# Remove www rule
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
// cross-browser width and height functions
function f_clientWidth() {
return f_filterResults (
window.innerWidth ? window.innerWidth : 0,
document.documentElement ? document.documentElement.clientWidth : 0,
document.body ? document.body.clientWidth : 0
);
}
function f_clientHeight() {
return f_filterResults (