Sometimes you just want to ignore changes you made locally and have the same situation you have on your git remote server. It is a simple thing to do, but don’t forget you will delete all the changes you have made locally before running this command.
It is not usual to show the number of the published post, however, it is not necessarily a bad thing. Sometimes, we just don’t publish on daily or weekly basis and this “published” date might make our posts look outdated. Therefore, we can build a simple procedure which will tell us how many of this […]
Assuming that we have column A containing first and last name with a potential middle name, we can assume that taking first name can be conducted by getting the value from beginning until first space.
We often need to list randomly chosen products on our Magento store. Lucky for us, Magento has provided this functionality, and this is easy to achieve from CMS block or CMS page. All we need to do is choose a category from which we’d like to list our products, and use following snippet in that […]
By default, Magento keeps track of complete “Comments History” on any order. This is a useful functionality that allows administrators to keep track of any internal communication as well as any comments left by a customer. The good news, for any developer is, it is easy to programatically add comment to any order in Magento. […]
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”.
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.
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.