пятница, 29 января 2010 г.

mysql utf8

/etc/mysql/my.cnf

[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
default-character-set = utf8
skip-character-set-client-handshake

[mysql]
default-character-set = utf8

суббота, 2 января 2010 г.

edit bash command in vim

Last Command

Hitting "fc" from a Bash shell invokes your default editor (hopefully Vim) on your last shell command and executes it after Vim exits. This is great for command-line history editing after the fact.

-e ENAME selects which editor to use. Default is FCEDIT, then EDITOR, then vi.

You can also edit the *current* command using CTRL-xCTRL-e (in, ahem emacs mode).
Handy if your oneliner becomes unmanageable.
You can the function "edit-and-execute-command" to your fave keypresses in "~/.inputrc".