The website of Lei Chen

Sunshine and rain of a developer

Archive for April, 2009

Bash: Create a variable from several piped commands

Posted by hide1713 on April 19, 2009

Here’s how to put the result of several commands to a variable. This is quite useful.

> echo $(ls|sort|uniq|wc)
14 14 342

Posted in shell | Leave a Comment »

Mysql Insert Data From Select

Posted by hide1713 on April 17, 2009

insert A_table (id, name) select id,name from B_table;

Posted in SQL | Leave a Comment »

Mysql Dump The Table Schema

Posted by hide1713 on April 16, 2009

mysqldump -u root -pmypassword test_database –no-data=true –add-drop-table=false > test_dump.sql

Posted in SQL | Leave a Comment »

Test Post by ScribeFire

Posted by hide1713 on April 13, 2009

ScribeFire is a offline blog client in Firefox.

17 Again Movie Trailer – Zac Efron

Posted in Uncategorized | Leave a Comment »

Gnome Blogger Test

Posted by hide1713 on April 13, 2009

This is a test post of Gnome Blogger

Features:

* Clean interface doesn’t get in the way of what you’re writing

* WYSIWYG styled text support

* Entries can be written gradually over the course of a day, popping gnome blog open and closed as you have thoughts to jot down and then posting at the end of the day

* Operates as a panel object/applet or a standalone application

* Supports many different kinds of blogs

* New Spell checking

* New Drag and drop images into your blog entry (if your blog supports it)

Posted in Uncategorized | Leave a Comment »

Smart method to protect your email address from spam

Posted by hide1713 on April 4, 2009

Recent research shows that the old approach “somebody at yahoo dot com” can not protect you from spam.  Well. I have a good suggestion here

python -c “import base64; print base64.decodestring(‘aGlkZTE3MTNAZ21haWwuY29t\n’)”

This approach might raise the bar. However, eventually, spammer would calculate all base 64 string in a page

Posted in Uncategorized | Leave a Comment »