Monday 23 September 2013

How to configure phpMyAdmin to access multiple servers from phpmyadmin?

Hi Guys,

Open the following URL in editor:

vim /etc/phpmyadmin/config.inc.php

Now,

   $i++;

    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    //if (empty($dbserver))
    $dbserver = 'servername';
    $cfg['Servers'][$i]['host'] = $dbserver;

    if (!empty($dbport)) {
        $cfg['Servers'][$i]['connect_type'] = 'tcp';
        $cfg['Servers'][$i]['port'] = $dbport;
    }
    //$cfg['Servers'][$i]['compress'] = false;
    /* Select mysqli if your server has it */
    $cfg['Servers'][$i]['extension'] = 'mysqli';
   
Cheers!!!

Monday 16 September 2013

How to count files and line recursively using ubuntu?

Hellos,


How to count number of files recursively?

find . -type f | wc -l


How to count number of lines in files recursively?

wc -l `find  -name '*.php' -o -name '*.html' -o -name '*.xls' -type f`;

Cheers!!!









Thursday 5 September 2013

How to Remove Save Draft & Preview Buttions.. and also Status: Draft & Visibility: Public in wordpress?

 Hello All,
 Please add below lines in your function.php file 
 
<?php
  add_action('admin_print_styles', 'remove_this_stuff');
  function remove_this_stuff() { ?>
    <style>
       #misc-publishing-actions, #minor-publishing-actions {display:none; }
    </style>
<?php } ?>
 
Cheers!!!