For Clients
For Geeks

Lets say that we’re writing bash script that should perform all the commands as a regular user, but it should also edit some files for which sudo command is needed. Writing sudo command won’t be much of a help as script might not ask for the password, and instead might just respond with “Permission denied”.

Continue reading

To import database dump into your PostgreSQL database, you can use following command: 1 pg_restore -i -h localhost -p 5432 -U username -d old_db -v database_backup.SQL Notice that port and username may be different for your PostgreSQL installation.

Continue reading

To create database dump from PostgreSQL, you can use following command: 1 pg_dump -i -h localhost -p 5432 -U username -F c -b -v -f database_backup.SQL Notice that port and username may be different for your PostgreSQL installation.

Continue reading

Magento uses md5 hashed values stored in the database as user’s password. This means that you can not retrieve the real password value no matter what and how important it is. And that’s actually really good since it protects user’s privacy and is more ethic way of storing personal data. And anyway, you can always […]

Continue reading

Apache enable htaccess

In: Apache

20 Aug 2013

If .htaccess is not working on your Apache it is possible that it is not enabled. To enable .htaccess on Apache edit following file: /etc/apache2/sites-available/default Locate following line: AllowOverride None and replace it with: AllowOverride All Finally – run following two commands sudo a2enmod rewrite sudo /etc/init.d/apache2 restart Notice: This instruction on how to enable […]

Continue reading

Although front end validation is not an only form of validation you should do, you’d still want to validate forms on front end. As forms usually have email address of the person filling it in, it could be useful to do JavaScript email validation. Therefore, I have just focused on single JavaScript method. You will […]

Continue reading

If you ever find a need to, as a result of your custom action, display the 404 page to customer, you can do it by using the following code inside your controller class 1 2 3 $this->getResponse()->setHeader(’HTTP/1.1′,’404 Not Found’); $this->getResponse()->setHeader(’Status’,’404 File not found’); $this->_forward(’defaultNoRoute’); This way you’ll be calling the default Magento dispatcher and it […]

Continue reading

If you’d like to check if process is running on Linux OS, you can do it by using code from following snippet: command = "sidekiq" running = `ps ax | grep -v grep | grep $command | wc -l`   if [running -gt 0]; then echo "Sidekiq is running!" else echo "Sidekiq is not running…" […]

Continue reading

Page 1 of 2012345...1020...Last »
Sell More With Magento & Facebook