PHP / MYSQL / GIT / Magento / Html / CSS / Js Tips….

PHP / MYSQL / GIT / Magento / Html / CSS / Js Tips….

Please post and share your ideas on this Page…

11 Responses to “PHP / MYSQL / GIT / Magento / Html / CSS / Js Tips….”

  1. nithincninan Says:

    How do I make Git ignore file mode (chmod) changes?

    >>>>> git config core.fileMode false

    http://stackoverflow.com/questions/1580596/how-do-i-make-git-ignore-file-mode-chmod-changes

    thanks!
    Nithin Chacko Ninan
    nithincninan@gmail.com
    +919895382293

  2. nithincninan Says:

    How do I grant privileges in MySQL?

    grant all on *.* to ‘ user ‘@’%’ identified by ‘ pass ‘ with grant option;

    eg: grant all on *.* to ‘root_web1’@’%’ identified by ‘admin’ with grant option;
    eg: grant all on *.* to ‘root’@’%’ identified by ” with grant option;

  3. nithincninan Says:

    Extracting a *.tar.bz2 file?

    tar xjvf file.tar.bz2

  4. nithincninan Says:

    1. Set Date in Server….

    [root@corraserver01 ~]# date –set “Tue Jan 13 16:27:02 IST 2015”
    Tue Jan 13 16:27:02 IST 2015
    [root@corraserver01 ~]# date
    Tue Jan 13 16:27:04 IST 2015
    [root@corraserver01 ~]# date –set “Tue Dec 30 16:27:02 IST 2014”
    Tue Dec 30 16:27:02 IST 2014
    [root@corraserver01 ~]# date –set “Tue Jan 13 16:27:02 IST 2015”
    Tue Jan 13 16:27:02 IST 2015
    [root@corraserver01 ~]#

  5. Nithin Says:

    git archive dev | gzip > wor.tar.gz

  6. Nithin Says:

    Git export commamd

    git archive dev | gzip > filename.tar.gz

  7. Nithin Says:

    Display each sub-directory size in a list format using 1 line command

    : du -h –max-depth=1

  8. nithincninan Says:

    Warning: Your Magento folder does not have sufficient write permissions

    >>>>> go to Magento home directory and just give permissions for your web root.

    1) e.g. (in ubuntu) : sudo chown -R www-data .
    You could also change the permissions

    2) sudo chmod 777 -R downloader/*
    I hope it helps….

  9. nithincninan Says:

    Git: If you want to overwrite of local file from master branch to your branch, use the below comment in git
    >>>> git checkout origin/master <>

  10. nithincninan Says:

    GIT: Need to edit the most recent git commit use the below comment:

    >>>>>> git commit –amend -m “…..”

    Note: use -m if you want to wipe out the old message and use a new one

  11. Nithin Ninan Says:

    Mysql providing grant Privilage to other ip adderss:

    mysql> grant all on dbname.* to ‘user’@’192.168.1.%’ identified by ‘password’;
    Query OK, 0 rows affected (0.00 sec)

    mysql> flush privileges;
    Query OK, 0 rows affected (0.14 sec)

    mysql> quit
    Bye

    nithin@nithin-Vostro-260s:~$ netstat -tunlp | grep 3306
    (Not all processes could be identified, non-owned process info
    will not be shown, you would have to be root to see it all.)
    tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN –

    nithin@nithin-Vostro-260s:~$ sudo vi /etc/mysql/my.cnf

    change the below settings in /etc/mysql/my.cnf

    #bind-address = 127.0.0.1
    to
    bind-address = 0.0.0.0

    This is to provide the db/file access to all other ips

    nithin@nithin-Vostro-260s:~$ sudo service mysql restart
    mysql stop/waiting
    mysql start/running, process 31150
    nithin@nithin-Vostro-260s:~$

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s