#SSHと権限の設定 http://d.hatena.ne.jp/rubellum/20100901/1283321253 に従って、SSHの設定とrootログインの禁止をする。
##sudo
Default env_keep+="PATH"
この一文を/etc/sudoersに入れると、sudo時に現在のPATHが引き継がれる。
#SSHと権限の設定 http://d.hatena.ne.jp/rubellum/20100901/1283321253 に従って、SSHの設定とrootログインの禁止をする。
##sudo
Default env_keep+="PATH"
この一文を/etc/sudoersに入れると、sudo時に現在のPATHが引き継がれる。
| # Install with: | |
| # bash < <(curl -L https://raw.github.com/gist/2070371) | |
| # | |
| # renv, linecache19-0.5.13.gem, ruby-debug-base19-0.11.26.gem | |
| # | |
| # https://raw.github.com/gist/1333785 | |
| # http://d.hatena.ne.jp/kurizo/20111225/p1 | |
| # | |
| RUBY_V='1.9.3-p194' |
| # Install with: | |
| # bash < <(curl -L https://raw.github.com/gist/1333785) | |
| # | |
| # Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
| echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
| curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
| curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem |
| echo "gem: --no-ri --no-rdoc" >> ~/.gemrc |
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
| // JavaScript key code consts | |
| var VK_DELETE = 8 | |
| var VK_TAB = 9 | |
| var VK_RETURN = 13 | |
| var VK_ESCAPE = 27 | |
| var VK_SPACE = 32 | |
| var VK_LEFT = 37 | |
| var VK_UP = 38 | |
| var VK_RIGHT = 39 |