content top

Get a UNIX timestamp using Javascript.

The Javascript Date object has a number of functions for working with dates and times. The getTime() method returns the millisecond representation of the Date object. In this tiny little post I going to show you how to convert Date object to UNIX timestamp. In php we mostly use timestamp representing date and I think this will help you whenever you need to deal with both time and date functionality. To convert the current date and time to a...

Read More

Installing Symfony without pear installation

Installing Symfony without pear installation

Installing symfony 1.4.6 without pear is not that difficult. In my earlier post I show you how to install symfony 1.4.6 with pear installation. That may not be helpful for those who don’t have Internet. So I insist to show you how to install symfony 1.4.6 without pear. Let’s start. Step-01. First make directory under /var/www/ folder. Suppose a folder name ‘smronju’. You can do it in command line like 1sudo mkdir -p...

Read More

Making Web Server in ubuntu.

Making Web Server in ubuntu.

Being as a web developer I often have to configure my Ubuntu as a web server for developing PHP projects. This is actually pretty common thing that you have to make it whether you are in windows or mac. In this tutorial I will show you how to make web server in your favorite OS Ubuntu. So, let’s do it. First install the apache2 php5 and mysql 1sudo apt-get install apache2 php5 php5-gd mysql-server phpmyadmin This will install all the...

Read More

Forgot root password of MySQL ?

Forgot root password of MySQL ?

Today I will show you how to modify the existing root password of MySQL, to be able to do it you must firstly be connected to it. If you already know the root password and just want to reinitialize it, you can skip this part. If you don’t have the root password then follow the steps below. It is possible to bypass the authentication process and to access MySQL. By the way I’m on a Linux PC and the command will work on Ubuntu...

Read More

42 Tips for optimizing PHP code

42 Tips for optimizing PHP code

1. If a method can be static, declare it static. Speed improvement is by a factor of 4. 2. 1 echo is faster than print. 3. Use echo’s multiple parameters instead of string concatenation. 4. Set the maxvalue for your for-loops before and not in the loop. 5. Unset your variables to free memory, especially large arrays. 6. Avoid magic like 1__get, __set, __autoload 7. 1require_once() is expensive 8. Use full paths in includes and...

Read More
content top
 
#CSS3 pattern collection http://t.co/Gzhh3SCm2 days ago