4/24/2007

duplicate a table in mysql

create table tmp select * from test.bugs;
insert into tmp select * from test.bugs;

4/15/2007

KNOPPIX

This is a bootable linux system. When windows can't be booted, this system can be used to obtain the data on the hard drive.

4/14/2007

I learnt something today

Text is different between Windows and Linux. To convert a window text file, use:
cat log.log | tr -d '\r' > new.log

I also learnt easy_install, which is a python module (easy_install) bundled with setuptools that lets you automatically download, build, install, and manage Python packages. To install an unziped file, use -Z, an upgraded file use -U. For example, to install a newer version of MySQLdb, type:
sudo easy_install -UZ MySQLdb-python

4/07/2007

datetime module in Python

http://pleac.sourceforge.net/pleac_python/datesandtimes.html