2011-05-01から1ヶ月間の記事一覧

256 colors

zsh

% for i in {0..255}; do echo -e "\e[38;05;${i}m${i}"; done | column -c 200 Show numerical values for each of the 256 colors in ZSH

unite-cake.vim

https://github.com/oppara/vim-unite-cake(unite-rails をパク参考にしました) ただし、見様見真似なため、emptyファイルを無視できず... できた!

配列のすべてのキーを変更する

php

PHP: array_change_key_case - Manual とりあえずベンチとってみる http://net-beta.net/ubench/ PHP 5.2.13 % time php -f array_change_key_case.php php -f array_change_key_case.php 0.26s user 0.01s system 97% cpu 0.275 total % time php -f foreac…

セレクトボックスでsubmit

(function() { $(SELECT).change(function() { $(this).closest('form').submit(); }); })();

Paginator::prev(), Paginator::next()のバグ?

1ページしかない時、disabledOptionsがemptyでない場合、escape => false が無視される。 escapeさせる場合は、disabledOptionsにescapeの設定を追加する必要がある。 false ); $disabled_options = array( 'class' => 'disabled' ); echo $this->Paginator…

.htaccessで相対パス対応

例えば ../img/foobar/hoge.png を img/foobar/hoge.png にしたい 画像は、webroot/img/の中に全て入ってるという条件 RewriteRule ^.*\/((img|js|css)\/.*\.(png|gif|jp?g|js|css))$ $1 [NC,L]

unite.vim

vim

GitHub - Shougo/unite.vim: Unite and create user interfaces やっと移行(ネコはまだ)機能ありまくり...; if exists('g:loaded_unite') let g:unite_source_file_mru_limit = 200 let g:unite_source_file_mru_filename_format = '' nnoremap <silent> fff :<C-u>Unit</c-u></silent>…