open ssl generate a random password

Filed Under (linux) by admin on 02-12-2009

Tagged Under :

Command to generate a decent random password

openssl rand -base64 6

Convert Excel time to Unix time

Filed Under (php) by admin on 02-12-2009

Tagged Under : , , , ,

When dealing in PHP with imported data from excel spreadsheets , you might encounter that excel dates looks very different.

Excel time looks like this 40179
You cannot compare or compute dates in PHP if it looks like that, it should be on unixtime
which looks like this 1104537600

Here is a quick function to convert excel date to unixtime date

<?
$DayDifference = 25569; //Day difference between 1 January 1900 to 1 January 1970
$Day2Seconds = 86400;// no. of seconds in a day
$ExcelTime = 30128;//integer value stored in the Excel column
$ExcelTime = substr($ExcelTime,0,5);//trim excel time get only whole 5 digit
$UnixTime = ($ExcelTime - $DayDifference)*$Day2Seconds;
echo $UnixTime;
?>

PHP ERROR Allowed memory size of 8388608 bytes exhausted

Filed Under (php) by admin on 27-11-2009

Tagged Under :

Error:
PHP ERROR Allowed memory size of 8388608 bytes exhausted
In php it means your memory use has exceeded the memory limit set by to execute a function.

Solution:
Type this above the function you are trying to excute
ini_set(”memory_limit”,”16M”);
or any desired memory size you wish

PHP 5.3 on Snow Leopard with mysqlnd

Filed Under (mysql, php) by admin on 26-11-2009

Tagged Under : , , ,

On snow leopard the bundled version of PHP installed is 5.3 And it’s new PHP mysql driver is mysqlnd not the old one (ext/mysql)

This might cause the following error:
mysqlnd cannot connect to MySQL 4.1+ using old authentication

Solution:
type in mysql

SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

Findings:
Because mysqlnd has a bigger password hash it will not be compatible anymore with the password written beforehand.

Ref:
http://dev.mysql.com/doc/refman/5.1/en/old-client.html

simply-buttons-v2 web buttons

Filed Under (Others) by admin on 17-11-2009

So Easy to use on your web apps
You can customize the css,colors
Lightsize,clean code
Compatible with ie6,ie7,ie8,firefox, safari and chrome
Web 2.0 style buttons
http://www.p51labs.com/simply-buttons-v2/

Play Framework

Filed Under (java) by admin on 17-11-2009

Tagged Under :

A very promising java web development framework
build your java web apss fast using the play framework
nice templating style, easy integration of java libraries and many more

Here is a nice vid on play framework

A web app in 10 minutes using Play! from zenexity on Vimeo.

Don’t do everything that is possible only what is necessary

Filed Under (Others) by admin on 06-11-2009

Don’t do everything that is possible only what is necessary

Now available for download Karmic Koala

Filed Under (Others) by admin on 02-11-2009

Tagged Under : ,

Karmic Koala ubuntu 9.10

http://www.ubuntu.com/GetUbuntu/download

The release names continues from Jaunty Jakalope to Karmic Koala… next stop is L****** L******

codeigniter read or write a file

Filed Under (codeigniter, php) by admin on 02-11-2009

Tagged Under :

In dealing with files on ci use the file helper
http://codeigniter.com/user_guide/helpers/file_helper.html

It is loaded using this line
$this->load->helper(‘file’);

read a file with read_file()

$data = read_file(‘./path/to/file.php’);

write a file with write_file();
write_file(‘./path/to/file.php’, $data, ‘w+’);

CI recommends “r+” but its better to use “w+”

Finally google maps unveils their turn by turn app

Filed Under (google maps) by admin on 29-10-2009

Tagged Under :

It came at the right time with android coming up, a feature, loooonged to be open and freeeee, how will this affect the paid turn by turn navi? I don’t know, but this one being free is a hit and this will change android’s game level from zero to hero

ads
ads

Jobs at Lexmark Cebu

Software Tools Developer 5 Dec 2008, 1:11 pm

Software Tools Developer

Source: Jobs at Lexmark Jobs at Lexmark |

Company Nurse 5 Dec 2008, 1:11 pm

Company Nurse

Source: Jobs at Lexmark Jobs at Lexmark |

Industrial Designer 5 Dec 2008, 1:11 pm

Industrial Designer

Source: Jobs at Lexmark Jobs at Lexmark |

Data Owner 5 Dec 2008, 1:11 pm

Data Owner

Source: Jobs at Lexmark Jobs at Lexmark |

Firmware Product Systems Engineer (FPSE) 5 Dec 2008, 1:11 pm

Firmware Product Systems Engineer (FPSE)

Source: Jobs at Lexmark Jobs at Lexmark |

Talent Management Specialist 5 Dec 2008, 1:11 pm

Talent Management Specialist

Source: Jobs at Lexmark Jobs at Lexmark |

Business Control Analyst (Auditor) 5 Dec 2008, 1:11 pm

Business Control Analyst (Auditor)

Source: Jobs at Lexmark Jobs at Lexmark |

SAP System Analyst 5 Dec 2008, 1:11 pm

SAP System Analyst

Source: Jobs at Lexmark Jobs at Lexmark |

Firmware Development Engineers 5 Dec 2008, 1:11 pm

Firmware Development Engineers

Source: Jobs at Lexmark Jobs at Lexmark |

HR Officer (Shared Services) 5 Dec 2008, 1:11 pm

HR Officer (Shared Services)

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Writers 5 Dec 2008, 1:11 pm

Technical Writers

Source: Jobs at Lexmark Jobs at Lexmark |

Spanish-speaking Customer Service Representative 5 Dec 2008, 1:11 pm

Spanish-speaking Customer Service Representative

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Illustrator 5 Dec 2008, 1:11 pm

Technical Illustrator

Source: Jobs at Lexmark Jobs at Lexmark |

Recruitment Assistant 5 Dec 2008, 1:11 pm

Recruitment Assistant

Source: Jobs at Lexmark Jobs at Lexmark |

Team Lead 5 Dec 2008, 1:11 pm

Team Lead

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Support Representative 5 Dec 2008, 1:11 pm

Technical Support Representative

Source: Jobs at Lexmark Jobs at Lexmark |

Technical Trainer 5 Dec 2008, 1:11 pm

Technical Trainer

Source: Jobs at Lexmark Jobs at Lexmark |

Software Build and Library Administrator 5 Dec 2008, 1:11 pm

Software Build and Library Administrator

Source: Jobs at Lexmark Jobs at Lexmark |

Business Database Administrator 5 Dec 2008, 1:11 pm

Business Database Administrator

Source: Jobs at Lexmark Jobs at Lexmark |

EDI - Support Analyst 5 Dec 2008, 1:11 pm

EDI - Support Analyst

Source: Jobs at Lexmark Jobs at Lexmark |