PHP: get random array value
Sometimes it can be useful to get random array value in PHP. You can use my function below to do it: If you have any ideas how to make it better: all your comments are welcomed.
web development and system administration of Linux
Sometimes it can be useful to get random array value in PHP. You can use my function below to do it: If you have any ideas how to make it better: all your comments are welcomed.
My general transfer Magento website on Linux procedure 1. Export MySQL database to SQL dump to file using phpMyAdmin or mysql command-line: mysqldump -h localhost -u db_user -p db_name > ./db_name.sql …or any other utility. MySQL database host, name, user and password can be found in file ./app/etc/local.xml Example section with db settings: <config> <global> … Continue reading General transfer Magento website procedure in Linux
Working in Linux you need to find files changed in dates range. To find these files I am using set of commands below: 1. Create file stamp with date range begin: $ touch –date "2012-11-01" ~/tmp/2012-11-01.txt 2. Create file stamp with date range end: $ touch –date "2012-11-10" ~/tmp/2012-11-10.txt 3. Find all files in user … Continue reading Linux: how to find files changed in dates range
Sometimes working in Linux you may need to output configuration file content without comments and empty lines. In this case you can use command sequence below: cat /etc/my.cnf |grep -v '#' |sed '/^$/d' |more You can replace /etc/my.cnf with another configuration file name and '#' with any other comment mark e.g. ';' or '//'
Welcome to my little online world. This is my first post. I will edit but not delete this post. Because this one will remind me exact day then I have start blogging here!