Archive for January, 2015

Speed up site with .htaccess

January 20, 2015 1 comment

Append these line in your .htaccess file.

#Trun on compression

mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

#Turn on content caching

ExpiresActive On
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType text/css “access plus 1 month”
ExpiresByType application/pdf “access plus 1 month”
ExpiresByType text/x-javascript “access plus 1 month”
ExpiresByType text/javascript “access plus 1 month”
ExpiresByType application/javascript “access plus 1 month”
ExpiresByType application/x-shockwave-flash “access plus 1 month”
ExpiresByType image/x-icon “access plus 1 month”

ExpiresByType application/font-woff “access plus 1 month”
ExpiresByType application/ “access plus 1 month”
ExpiresByType application/x-font-ttf “access plus 1 month”
ExpiresByType font/opentype “access plus 1 month”
ExpiresByType image/svg+xml “access plus 1 month”

ExpiresDefault “access 2 days”
Header set Cache-Control “public”
Header unset Cache-control

Header append Vary: Accept-Encoding
Header unset Pragma

#Mod_deflate is an apache module that can be used to compress data using gzip compression before sending it to the browser

AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/x-font-ttf

Install Ruby On Windows

January 19, 2015 Leave a comment

Get ruby installer for windows from here
Download Development kit from here

Setup development enviorment-
1. Run ruby installer
a. Set installation path. Mine is C:\wamp\bin (I’m using wamp server for php and I’m going to use it’s mysql and Apache.)
2. Run Development kit installer
a. Set installation path. Mine is C:\wamp\bin\Ruby193\DevKit
3. Open commant prompet and run this command to check ruby version.
> ruby -v
OUtput comes like this ruby 1.9.3p551 (2014-11-13) [i386-mingw32] if not then set enviorment valiable for ruby. Mine is C:\wamp\bin\Ruby193\bin

%d bloggers like this: