Showing posts with label setting. Show all posts
Showing posts with label setting. Show all posts

Saturday, December 27, 2008

linux auto logout setting

$> cd
$> vi .profile
# user will be auto logout after 300 seconds.
export TMOUT=300

如果是针对所有用户,则修改/etc/profile文件。

Saturday, October 11, 2008

HowTo set width/height/font/fontSize of vim window

" set the screen width and height, the same as set columns and lines
win 80 25
" columns width of the display
" set co=80
" lines number of lines in the display
" set lines=24
" For Mac OS X you can use something like this: >
set guifont=Monaco:h12

Tuesday, April 01, 2008

Rails Content type header setting

Added utf-8 as the default charset for all renders. You can change this default using:
ActionController::Base.default_charset=(encoding) [DHH]
...now:
config.action_controller.default_charset="utf-8"

Added proper getters and setters for content type and charset [DHH]. Example of what we used to do:
response.headers["Content-Type"] = "application/atom+xml; charset=utf-8"

...now:
response.content_type = Mime::ATOM
response.charset = "utf-8"