不得不承认

Jan 发表于 2008-03-16 00:29:08

我和KSJ差距很大。。。sigh
关键词(Tag): sigh
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Sand Sculpture Bed

Jan 发表于 2008-03-14 10:43:44

关键词(Tag): sand bed sculpture
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Making your vim like textmate

Jan 发表于 2008-03-13 22:07:22

textmate is great, but vim is greater. Vim can acts_as_textmate, but textmate can't acts_as_vim. To make your vim more kindly to rails development, you need some well-known plugins:

* gem i vim-ruby: <must have>
* rails.vim: <must have>
* grep.vim: fast locate the code in current directory
* minibufexpl.vim: show a buffer tab above your edit area
* surround.vim: hard to use, but sometimes useful. When you have lots of html work you need this to insert html tags quickly
* matchit.vim: it will help you to eliminate un-closed tags/blocks/etc.

And finally, I strongly recommend the very new plugin - FuzzyFinder - who comes with vim7's release. It's so useful and unbelieveable ignored by people ... You'll get the great fuzzy find & open function from this, like you open a file in textmate or intellij. MUST HAVE!

Dig more from my .vimrc:

set nocompatible          " We're running Vim, not Vi!
syntax on                 " Enable syntax highlighting
colorscheme vividchalk       "Textmate color scheme on VIM. Use GVIM to get the best looking
set guifont=Terminus\ 12    "Popluar terminal fonts in archlinux community
filetype plugin indent on " Enable filetype-specific indenting and plugins

" Load matchit (% to bounce from do to end, etc.)
runtime! macros/matchit.vim

augroup myfiletypes
  " Clear old autocmds in group
  autocmd!
  " autoindent with two spaces, always expand tabs
  autocmd FileType ruby,eruby,yaml,html,erb set si sw=2 sts=2 et
augroup END

let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1

nmap <leader>rci :%!ruby-code-indenter<cr>

"noremap <C-f> :TSelectFiles<cr>
nnoremap <C-f> :FuzzyFinderFile <C-r>=expand('%:~:.')[:-1-len(expand('%:~:.:t'))]<CR><CR>
nnoremap <C-o> :FilesystemExplorer<cr>
关键词(Tag): vim rails
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

HTTP Header Status Graph

Jan 发表于 2008-03-12 22:42:28

关键词(Tag): http header status
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Choose 'custom' as session type when use .xsession

Jan 发表于 2008-03-12 11:10:18

When you have custom settings in .xsession, like XMODIFIER=@im=SCIM, and using kdm the same time, you have to choose 'custom' as session type when login. Otherwise KDM won't read .xsession at all.

ps. remember to chmod +x .xsession
关键词(Tag): kdm xsession
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Use dmenu on any WM

Jan 发表于 2008-03-12 09:22:43

You can't live without it once you tried it or you tried tiling window manager.

exe=`dmenu_path | dmenu` && eval "exec $exe"
关键词(Tag): dmenu
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Logitech's keyboard has no 'Insert' key

Jan 发表于 2008-03-11 00:19:55

Maybe they think human beings don't use it anymore, and I must be from MARS.

What lucky is I'm using Linux:

xmodmap -e "keysym Print = Insert"
echo -e "keysym Print = Insert" > ~/.Xmodmap
关键词(Tag): logitech shit
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

If Version Control Systems were Airlines

Jan 发表于 2008-03-08 20:51:17

"Subversion airlines thrives on the concept that "photocopying is cheap". You are encouraged to make photocopies of your ticket, or to photocopy your photo ID, and give copies of each to as many people as you can. At checkin time at the gate, if more than one person arrives with a copy of the same ticket, they are ushered into the "merging room" and each person is given a brick. The door is closed, something magical occurs, and the one person that emerges still able to walk is allowed to board the plane."

You should read this article: If Version Control Systems were Airlines
关键词(Tag): svn vcs
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

无法相信世界上会有人在用attachment_fu的时候还要创造一个叫做with_image的model出来

Jan 发表于 2008-03-06 00:46:08

真的很无语。。。直接导致了我几乎一天的无意义的debug。。。弄的我连用e文zhuangblity的力气都没有了

也好,直接导致attachment_fu被我看了个通透,架构一流,module玩的出神入化,拜Rick Olson大神。。。
关键词(Tag): rails attachment_fu
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

[Ads] Hangzhou RailsConf

Jan 发表于 2008-03-05 22:50:36

时间:本周日(3.9)下午3:00~5:00
地点:杭州电子科技大学文一校区主楼二楼(公交站:省委党校)
报名:跟贴或email至 devon AT kuxuesoft.com,非常欢迎大家做5~20分钟的小演讲
主题:技术探讨(sphinx, autotest...),交流学习

关键词(Tag): hangzhou railsconf
收藏: QQ书签 del.icio.us 订阅: Google 抓虾

Heroku release API and External Git Access

Jan 发表于 2008-03-05 11:16:56

Super cool. Only need to install their gem, then you can:

heroku clone myapp
cd myapp
ruby script/server
...edit locally...
git add .
git commit -m "local changes"
git push

Via their blog.
关键词(Tag): api rails git heroku
收藏: QQ书签 del.icio.us 订阅: Google 抓虾