Profile_bird

Hey there! shantanuo is using Twitter.

Twitter is a free service that lets you keep in touch with people through the exchange of quick, frequent answers to one simple question: What's happening? Join today to start receiving shantanuo's tweets.

Already using Twitter
from your phone? Click here.

shantanuo

  1. One can use TIMEDIFF() & DATEDIFF(), or compare two UNIX_TIMESTAMP() values. My personal favorite is to use TIMESTAMPDIFF()
  2. Inernal File Separator: The safe way to change IFS in a 'while read' loop is: while IFS=\| read a b c do : whatev... http://bit.ly/6CJbVw
  3. Overwriting files: output redirection using n> usually overwrites existing files. You can control this with .. http://bit.ly/4o54Ma
  4. send messages across network: The following command can be used to send messages to remote servers. ss.. http://bit.ly/425Wai
  5. strings -n2 user.MYD # to see the usernames, hosts, and password hashes
  6. create procedure tst (myvar int) begin if (myvar > 0) then select 'greater than'; else select 'less than'; end if; end$$ #mysql procedure
  7. update mysql.proc set security_type = 'INVOKER' ; # this will allow anyone to execute others stored procedures
  8. (echo "delimiter ;;" && mysqldump -uroot -pPassWord -d --routines dbName | awk '/(SP1|New_SP2)/,/;;/') | more
  9. SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1 #replication restart after skipping 1 statement #mysql
  10. sort -s -k1,2 purchases.txt # stable sort on first and second column
  11. find . -type f -exec echo mv {} {}.txt \; # add extension text to files recursively
  12. find . -name *.txt -prune -o -print # find all files other than text files
  13. power of wget: wget is really a very powerful utility. Here is an example. wget -mk oksoft.antville.org.. http://bit.ly/xipPV
  14. Every developer should use error_reporting(E_ALL); while developing.
  15. PHP can be used in an interactive mode php -a and ctrl+d to execute
  16. You can add ‘!/usr/bin/php’ header at the top of the PHP script and marke it as executable
  17. but only for the number of times specified in master-retry-count. #mysql
  18. #MySQL slave will try to reconnect after getting a timeout (slave-net-timeout) after waiting the number of seconds in master-connect-retry
  19. ssh user@host "mysqldump -h localhost -u root -pPassWord databasename | gzip -cf" | gunzip -c > database.sql # backup from remote #mysql
  20. Silence of the Foxes: This simple Firefox tool lets you create custom Firefox installers which you can use to de.. http://bit.ly/p6jgB