Friday, September 28, 2007

Support Mozilla Firefox!




stupid IE! doesn't follow simple basic css/html standards. Help make IE obsolete. Use Mozilla Firefox!

Wednesday, September 19, 2007

common but not so commonly used "VIm" commands

for my reference purpose:

line cut and paste: d, p
highlight cut and paste: v, y, p
search the word under the cursor: *
find and replace:
%s/findstring/replacestring/gc or
:gs?pat?sub?
g=global
c=confirm

Any word completion: ctl-n

Write mode: Insert
Non-write mode: Escape

find: /
line cut: d
highlight/visual: v
yank: y
paste: p
write: w
force write: w!
quit: q
force quit: q!
write and quit: wq

Thursday, September 13, 2007

common but not so commonly used "mysql" commands

I always forget the exact syntax or parameters of these commands...

Grant Privileges:
mysql> GRANT ALL PRIVILEGES ON db_name.* TO username@host -> IDENTIFIED BY 'password' WITH GRANT OPTION;

Change root password:
first time: $ mysqladmin -u root password NEWPASSWORD
change: $ mysqladmin -u root -p oldpassword newpass
bypass: c:\> mysqld-nt --skip-grant-tables

Backup:
fullbackup of db:
$ mysqldump --tab=/path/to/some/dir --opt db_name or
$ mysqlhotcopy db_name /path/to/some/dir