October 22, 2013 0 Comments

without mysql password for I in $(mysql -e 'show databases' -s --skip-column-names); do mysqldump $I | gzip > "$I.sql.gz"; done need mysql password for I in $(mysql -uroot -hlocalhost -p -e 'show databases'

August 30, 2013 0 Comments

error_log(print_r($variable, TRUE));

August 17, 2013 0 Comments

ls -alZ /www/foler chcon -v -R --type=httpd_sys_content_t /www/folder ls -Z, --context Display security context so it fits on most displays. Displays only mode, user, group, security context and file name. chcon - change

August 14, 2013 1 Comment

UPDATE! Code moved to bitbucket: https://bitbucket.org/markoshust/syncdb/src Often times, you need to pull down an up-to-date version of Magento from your production server to your development or staging servers. This involves: Executing a mysqldump

August 14, 2013 1 Comment

Here is an example: var signupForm = new Validation(\’form-validate\’); var result = signupForm.validate(); if(result == true) { $(\’#form-validate\’).submit(); return true; } else return false; another one var signupForm = new VarienForm('signupForm', true); if

August 12, 2013 0 Comments

http://www.servermom.com/install-varnish-3-to-run-with-apache-2-on-centos-server/552/

August 12, 2013 0 Comments

Usually that comes from Selinux not giving access to the folder. do ls -alZ /var/www/ and if the html folder doesn't have the context system_u:object_r:httpd_sys_content_t, fix it with chcon chcon -v -R --type=httpd_sys_content_t

December 3, 2012 0 Comments

PHP provides various levels of error reporting using a bit-field as follows: Error Bit Purpose E_ALL All errors and warnings (doesn't include E_STRICT) E_ERROR Fatal run-time errors E_WARNING Run-time warnings (non-fatal errors) E_PARSE

October 24, 2012 0 Comments

find . -mtime -1 | grep "php\|js" | grep -v "tmp\|cache" find -mtime -1 find modified files last day grep "php\|js" file name include php or js grep -v "tmp\|cache" file name not

October 12, 2012 0 Comments

1. find current dir php file with content #FFFFFF find . -name "*.html" | xargs grep "#FFFFFF" 2. find a file current dir with content #FFFFFF find . -type f | xargs grep