FYI! doctype html

  • 0
The doctype at the start of the HTML file tells the browser which version of HTML you are using. The doctype is not an HTML element, so it doesn't have a closing tag. The doctype ensures that your web page displays consistently when its visited from different browsers.

Make link directory on Ubuntu 12.04

  • 0
I want create link directory from my home/username/Documents/folder_name into folder /var/www

let's do it by execute :

ln -s /home/username/Documents/folder /var/www/

Just it!

YII, change default controller

  • 0
File main.php
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'My application',
    'defaultController' => 'myController/myAction',   // <-- Use this code to change default controller

How to check date range on rails?

(Time.now.to_date - 2.days.ago.to_date).to_i

Description :
Time.now.to_date we will get date now with format : Fri, 5 Aug 2014
use to_i to return range date