Tuesday, January 8, 2013

debian screen command

You start screen as "screen -r" ^A ? show a help screen (display key bindings) ^A c create a new window and switch to it ^A n go to next window ^A p go to previous window ^A 0 go to window number 0 ^A 1 go to window number 1 ^A w show a list of windows ^A a send a Ctrl-A to current window as keyboard input ^A h write a hardcopy of current window to file ^A H begin/end logging current window to file ^A ^X lock the terminal (password protected) ^A d detach screen session from the terminal ^A DD detach screen session and log out

Monday, January 7, 2013

ImportError: No module named MySQLdb

apt-get install python-mysqldb (Linux Ubuntu, Debian)
yum install MySQL-python (Linux Fedora, CentOS)

Tuesday, January 1, 2013

jQuery comma in selector?

The second argument in the selector is a context for search. $(a,b) is the same as $(b).find(a)

Saturday, December 29, 2012

debian no sound

turns out there are a few processes locked up the sound device lsof /dev/snd/* to find out what those processes are, and kill -9 those processes, then the sound works again for me

Wednesday, December 26, 2012

debian Logitech Z205 usb speaker

find your usb device through here cat /proc/asound/cards edit ~/.asoundrc 1 pcm.!default {
2 type hw
3 card 2
4 }
5 ctl.!default {
6 type hw
7 card 2
8 }
sudo /etc/init.d/alsa-utils restart

Tuesday, December 18, 2012

mysqld unknown option --skip-bdb

/usr/sbin/mysqld: unknown option '--skip-bdb' because Using BerkeleyDB is now discouraged as its support will cease in 5.1.12. so edit file /etc/mysql/my.cnf #skip-bdb

Saturday, December 1, 2012

easy_install uninstall

$ easy_install -m [PACKAGE] It removes all dependencies of that package then $ rm -rf .../python2.X/site-packages/[PACKAGE].egg