.gitignore generator for Magento

Git is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. it’s important for many projects and Magento is not an exception. for many beginners or even experienced developers, a good .gitignore file is not always in their mind, this is source of many sins in the future to other developers who get in the line of the same project later.

i created a bash script and have been using it for awhile. You can generate a good .gitignore file from now on and stop worrying about git related issues in the future. you can find the script below

Continue reading

MySQL – mysqldump database with minimum damage to the server

lightweght I have very large Magento databases with of almost 400 of tables some of which have up to 10GB of data in.  I’ve always had headaches when backing up these databases. Using default mysqldump it quickly spirals the server load out of control and locks up everything… affecting my users. Trying to stop the process can lead to crashed tables and lots of downtime during recovery of those tables. I now use Continue reading

Magento – Installing Extensions via Command Line

install-banner

I don’t like the idea of having to change permissions of my magento install to add on new extensions. There’re some services that allow you to download extension in compressed file like http://freegento.com/ddl-magento-extension.php , so you will only need to extract then copy&paste to your Magento installation folder, this is also a pain to me, especially when i’m on a Mac (yes, Mac is bad at merging files) . Thanks to Magento, we have command line for this type of work.

Continue reading

Unix – new user strange shell

shellbanner

I faced this issue when i tried to create a new user on Ubuntu server, new user was given the Bourne shell rather than the Bash shell, this is a basic shell located in /bin/sh, and it looks boring, you won’t be able to use auto-completion with such shell. in this article, i will show you how to change default shell of an unix user.

Continue reading

Unix – Recursively chmod only directories or files

directories

Have you ever come across the problem of needing to chmod many directories and sub-directories, but you don’t want to touch any of the files? Maybe it’s the exact opposite, or you need to recursively change the permissions on only files with a specific extension. If so, this article is for you

To change permission of all directories to 755, execute this command in terminal

Continue reading

Unix – display a logfile in real time on screen

logfile

Q. I’d like to see my php or apache web server log files in real time. How do I see log file in real time including all incoming logs?

A. You need to use tail command which output the last part of files in real time including all incoming logs to a file.

tail -f file-name command

here are some examples

Continue reading

Unix – Setup HTTPS virtual hosts

ssl

SSL is an essential part of creating a secure Apache site. SSL certificates allow you encrypt all the traffic sent to and from your Apache web site to prevent others from viewing all of the traffic. It uses public key cryptography to establish a secure connection. This means that anything encrypted with a public key (the SSL certificate) can only be decrypted with the private key (stored only on the server) and vice versa.

Continue reading