Friday, April 13, 2012

linux Commands

    alias - create names or abbreviations for commands
    apropos - search the manual page names and descriptions
    at [man page] - queue, examine or delete jobs for later execution

    bc [man page] - An arbitrary precision calculator language

    cal - displays a calendar
    cat [man page] - concatenate files and print on the standard output
    cd - change directory
    chgrp [man page] - change group ownership
    chmod [man page] - change file access permissions
    cksum [man page] - checksum and count the bytes in a file
    cp [man page] - copy files and directories
    csplit [man page] - split a file into sections determined by context lines

    date [man page] - print or set the system date and time
    dd [man page] - convert and copy a file
    du [man page] - estimate file space usage

    egrep [man page] - print lines matching a pattern
    export - set an environment variable

    fgrep [man page] - print lines matching a pattern
    find [man page] - search for files in a directory hierarchy
    fold [man page] - wrap each input line to fit in specified width

    grep [man page] - print lines matching a pattern
  
    head [man page] - output the first part of files

    join [man page] - join lines of two files on a common field

    logrotate [man page] - rotates, compresses, and mails system logs
    ls [man page] - list directory contents

    mkdir [man page] - make directories
    mv [man page] - move (rename) files
    mount [man page] - mount a file system

    nl [man page] - number lines of files

    od [man page] - dump files in octal and other formats

    pwd [man page] - print name of current/working directory

    rgrep [man page] - print lines matching a pattern
    rm [man page] - remove files or directories

    scp - secure copy (remote file copy program)
    ssh - OpenSSH SSH client (remote login program)

    tail [man page] - output the last part of files
    tar [man page] - The GNU version of the tar archiving utility
    tee [man page] - read from standard input and write to standard output and files
    time [man page] - run programs and summarize system resource usage
    touch [man page] - change file timestamps

    vim - Vi IMproved, a programmers text editor
  
    watch [man page] - execute a program periodically, showing output fullscreen
    wc [man page] - print newline, word, and byte counts for each file
    whoami [man page] - print effective userid

yes [man page] - output a string repeatedly until killed

To export you sql to excel file

" . mysql_error() . "
" . mysql_errno()); //select database $Db = @mysql_select_db($DB_DBName, $Connect) or die("Couldn't select database:
" . mysql_error(). "
" . mysql_errno()); //execute query $result = @mysql_query($sql,$Connect) or die("Couldn't execute query:
" . mysql_error(). "
" . mysql_errno()); while($row = mysql_fetch_assoc($result)) { //print_r($result); $data[]=array('ID'=>$row[ID],'First_name'=>$row[user_nicename],'Last_name'=>$row[display_name]); } //echo sizeof($data); $key=0; foreach($data as $id) { $sql1="SELECT * FROM wp_usermeta where user_id=".$id['ID']; //echo $sql1; $result1 = @mysql_query($sql1,$Connect); while($row1 = mysql_fetch_assoc($result1)) { $k=$row1[meta_key]; $v=$row1[meta_value]; $data[$key][$k]=$v; //$data[]=array('ID'=>$row1[ID]); } $key++; } /* echo"
";
    print_r($data);
    echo"
"; */ $field=array('League','First Name','Last Name','Gender','DOB','AHC No.','Address','Postal Code','Parent /Guardian One information Last Name','Parent /Guardian One information First Name','Parent /Guardian One Phone','Parent /Guardian One Email','Parent /Guardian Two information Last Name','Parent /Guardian Two Information First Name','Parent /Guardian Two Home','Parent /Guardian Two Email','Community ID','Medical Issues?','Post 1 Volunteer','Post 1 Name','Shirt Size','Post 2 Volunteer','Post 2 Name','Shirt Size','Who I'd like to Volunteer with First','Who I'd like to Volunteer with Last','How Registered'); if (isset($w) && ($w==1)) { $file_type = "msword"; $file_ending = "doc"; }else { $file_type = "vnd.ms-excel"; $file_ending = "xls"; } //header info for browser: determines file type ('.doc' or '.xls') header("Content-Type: application/$file_type"); header("Content-Disposition: attachment; filename=database_dump.$file_ending"); header("Pragma: no-cache"); header("Expires: 0"); if (isset($w) && ($w==1)) //check for $w again { $sep="\t"; $new="\n"; foreach($field as $attri) { echo $attri.$sep; } echo $new; $keys=0; foreach($data as $data_con){ /** 1.League***/ if($data_con['select7']) { echo $data_con['select7']; echo $sep; } else { echo $sep; } /** 2.First name***/ if($data_con['First_name']) { echo $data_con['First_name']; echo $sep; } else { echo $sep; } /** 3.Last name***/ if($data_con['Last_name']) { echo $data_con['Last_name']; echo $sep; } else { echo $sep; } /** 4.Gender***/ if($data_con['radiobutton_Gender']) { echo $data_con['radiobutton_Gender']; echo $sep; } else { echo $sep; } /** 5.DOB***/ if($data_con['dob3']) { echo $data_con['dob1'].'-'.$data_con['dob2'].'-'.$data_con['dob3']; echo $sep; } else { echo $sep; } /** 6.AHC No.***/ if($data_con['Community']) { echo $data_con['Community']; echo $sep; } else { echo $sep; } /** 7.Address ***/ if($data_con['uadd']) { echo $data_con['uadd']; echo $sep; } else { echo $sep; } /** 8.Postal Code ***/ if($data_con['pcode']) { echo $data_con['pcode']; echo $sep; } else { echo $sep; } /** 9.Parent /Guardian One information Last Name ***/ if($data_con['g1_lname']) { echo $data_con['g1_lname']; echo $sep; } else { echo $sep; } /** 10.Parent /Guardian One information First Name ***/ if($data_con['g1_fname']) { echo $data_con['g1_fname']; echo $sep; } else { echo $sep; } /** 11.Parent /Guardian One Phone ***/ if($data_con['g1_ph']) { echo $data_con['g1_ph']; echo $sep; } else { echo $sep; } /** 12.Parent /Guardian One Email ***/ if($data_con['g1_email']) { echo $data_con['g1_email']; echo $sep; } else { echo $sep; } /** 13.Parent /Guardian Two information Last Name ***/ if($data_con['g2_lname']) { echo $data_con['g2_lname']; echo $sep; } else { echo $sep; } /** 14.Parent /Guardian Two Information First Name ***/ if($data_con['g2_fname']) { echo $data_con['g2_fname']; echo $sep; } else { echo $sep; } /** 15.Parent /Guardian Two Phone ***/ if($data_con['g2_ph']) { echo $data_con['g2_ph']; echo $sep; } else { echo $sep; } /** 16.Parent /Guardian Two Email ***/ if($data_con['g2_email']) { echo $data_con['g2_email']; echo $sep; } else { echo $sep; } /** 17.Community ID ***/ if($data_con['Community']) { echo $data_con['Community']; echo $sep; } else { echo $sep; } /** 18.Medical Issues? ***/ if($data_con['HealthCare']) { echo $data_con['HealthCare']; echo $sep; } else { echo $sep; } /** 19.Post 1 Volunteer ***/ if($data_con['Volunteer_position1']) { echo $data_con['Volunteer_position1']; echo $sep; } else { echo $sep; } /** 20.Post 1 Name ***/ if($data_con['Volunteer_name1']) { echo $data_con['Volunteer_name1']; echo $sep; } else { echo $sep; } /** 21.Shirt Size ***/ if($data_con['Shirt_size1']) { echo $data_con['Shirt_size1']; echo $sep; } else { echo $sep; } /** 22.Post 2 Volunteer ***/ if($data_con['Volunteer_position2']) { echo $data_con['Volunteer_position2']; echo $sep; } else { echo $sep; } /** 23.Post 2 Name ***/ if($data_con['Volunteer_name2']) { echo $data_con['Volunteer_name2']; echo $sep; } else { echo $sep; } /** 24.Shirt Size ***/ if($data_con['Shirt_size2']) { echo $data_con['Shirt_size2']; echo $sep; } else { echo $sep; } /** 25.Who I'd like to Volunteer with First ***/ if($data_con['volunteerwithfname']) { echo $data_con['volunteerwithfname']; echo $sep; } else { echo $sep; } /** 26.Who I'd like to Volunteer with Last ***/ if($data_con['volunteerwithlname']) { echo $data_con['volunteerwithlname']; echo $sep; } else { echo $sep; } /** 27.How Registered ***/ if($data_con['Fees']) { echo $data_con['Fees']; echo $sep; } else { echo $sep; } echo $new; } }else{ $sep="\t"; $new="\n"; foreach($field as $attri) { echo $attri.$sep; } echo $new; $keys=0; foreach($data as $data_con){ /** 1.League***/ if($data_con['select7']) { echo $data_con['select7']; echo $sep; } else { echo $sep; } /** 2.First name***/ if($data_con['First_name']) { echo $data_con['First_name']; echo $sep; } else { echo $sep; } /** 3.Last name***/ if($data_con['Last_name']) { echo $data_con['Last_name']; echo $sep; } else { echo $sep; } /** 4.Gender***/ if($data_con['radiobutton_Gender']) { echo $data_con['radiobutton_Gender']; echo $sep; } else { echo $sep; } /** 5.DOB***/ if($data_con['dob3']) { echo $data_con['dob1'].'-'.$data_con['dob2'].'-'.$data_con['dob3']; echo $sep; } else { echo $sep; } /** 6.AHC No.***/ if($data_con['Community']) { echo $data_con['Community']; echo $sep; } else { echo $sep; } /** 7.Address ***/ if($data_con['uadd']) { echo $data_con['uadd']; echo $sep; } else { echo $sep; } /** 8.Postal Code ***/ if($data_con['pcode']) { echo $data_con['pcode']; echo $sep; } else { echo $sep; } /** 9.Parent /Guardian One information Last Name ***/ if($data_con['g1_lname']) { echo $data_con['g1_lname']; echo $sep; } else { echo $sep; } /** 10.Parent /Guardian One information First Name ***/ if($data_con['g1_fname']) { echo $data_con['g1_fname']; echo $sep; } else { echo $sep; } /** 11.Parent /Guardian One Phone ***/ if($data_con['g1_ph']) { echo $data_con['g1_ph']; echo $sep; } else { echo $sep; } /** 12.Parent /Guardian One Email ***/ if($data_con['g1_email']) { echo $data_con['g1_email']; echo $sep; } else { echo $sep; } /** 13.Parent /Guardian Two information Last Name ***/ if($data_con['g2_lname']) { echo $data_con['g2_lname']; echo $sep; } else { echo $sep; } /** 14.Parent /Guardian Two Information First Name ***/ if($data_con['g2_fname']) { echo $data_con['g2_fname']; echo $sep; } else { echo $sep; } /** 15.Parent /Guardian Two Phone ***/ if($data_con['g2_ph']) { echo $data_con['g2_ph']; echo $sep; } else { echo $sep; } /** 16.Parent /Guardian Two Email ***/ if($data_con['g2_email']) { echo $data_con['g2_email']; echo $sep; } else { echo $sep; } /** 17.Community ID ***/ if($data_con['Community']) { echo $data_con['Community']; echo $sep; } else { echo $sep; } /** 18.Medical Issues? ***/ if($data_con['HealthCare']) { echo $data_con['HealthCare']; echo $sep; } else { echo $sep; } /** 19.Post 1 Volunteer ***/ if($data_con['Volunteer_position1']) { echo $data_con['Volunteer_position1']; echo $sep; } else { echo $sep; } /** 20.Post 1 Name ***/ if($data_con['Volunteer_name1']) { echo $data_con['Volunteer_name1']; echo $sep; } else { echo $sep; } /** 21.Shirt Size ***/ if($data_con['Shirt_size1']) { echo $data_con['Shirt_size1']; echo $sep; } else { echo $sep; } /** 22.Post 2 Volunteer ***/ if($data_con['Volunteer_position2']) { echo $data_con['Volunteer_position2']; echo $sep; } else { echo $sep; } /** 23.Post 2 Name ***/ if($data_con['Volunteer_name2']) { echo $data_con['Volunteer_name2']; echo $sep; } else { echo $sep; } /** 24.Shirt Size ***/ if($data_con['Shirt_size2']) { echo $data_con['Shirt_size2']; echo $sep; } else { echo $sep; } /** 25.Who I'd like to Volunteer with First ***/ if($data_con['volunteerwithfname']) { echo $data_con['volunteerwithfname']; echo $sep; } else { echo $sep; } /** 26.Who I'd like to Volunteer with Last ***/ if($data_con['volunteerwithlname']) { echo $data_con['volunteerwithlname']; echo $sep; } else { echo $sep; } /** 27.How Registered ***/ if($data_con['Fees']) { echo $data_con['Fees']; echo $sep; } else { echo $sep; } echo $new; } } ?>

Wednesday, April 4, 2012

adding-one-post-in-multiple-blog



You can add your one post to your multiple blog .

 For this there is one site providing this facilities.
Site: --    ping.fm
Create an account on this. Select the network you want to add eg presently using blogspot.com 

then check  the field in posting  option .