Rackのステータスコードとシンボルの表
ちょっとブックマークとかでも、あとでなんて検索したらいいかわからなくなりそうなので、メモしておく
下記のブログの抜粋です。
status code | description | symbol |
---|---|---|
100 | Continue | :continue |
101 | Switching Protocols | :switching_protocols |
102 | Processing | :processing |
200 | OK | :ok |
201 | Created | :created |
202 | Accepted | :accepted |
203 | Non-Authoritative Information | :non_authoritative_information |
204 | No Content | :no_content |
205 | Reset Content | :reset_content |
206 | Partial Content | :partial_content |
207 | Multi-Status | :multi_status |
226 | IM Used | :im_used |
300 | Multiple Choices | :multiple_choices |
301 | Moved Permanently | :moved_permanently |
302 | Found | :found |
303 | See Other | :see_other |
304 | Not Modified | :not_modified |
305 | Use Proxy | :use_proxy |
306 | Reserved | :reserved |
307 | Temporary Redirect | :temporary_redirect |
400 | Bad Request | :bad_request |
401 | Unauthorized | :unauthorized |
402 | Payment Required | :payment_required |
403 | Forbidden | :forbidden |
404 | Not Found | :not_found |
405 | Method Not Allowed | :method_not_allowed |
406 | Not Acceptable | :not_acceptable |
407 | Proxy Authentication Required | :proxy_authentication_required |
408 | Request Timeout | :request_timeout |
409 | Conflict | :conflict |
410 | Gone | :gone |
411 | Length Required | :length_required |
412 | Precondition Failed | :precondition_failed |
413 | Request Entity Too Large | :request_entity_too_large |
414 | Request-URI Too Long | :request_uri_too_long |
415 | Unsupported Media Type | :unsupported_media_type |
416 | Requested Range Not Satisfiable | :requested_range_not_satisfiable |
417 | Expectation Failed | :expectation_failed |
422 | Unprocessable Entity | :unprocessable_entity |
423 | Locked | :locked |
424 | Failed Dependency | :failed_dependency |
426 | Upgrade Required | :upgrade_required |
500 | Internal Server Error | :internal_server_error |
501 | Not Implemented | :not_implemented |
502 | Bad Gateway | :bad_gateway |
503 | Service Unavailable | :service_unavailable |
504 | Gateway Timeout | :gateway_timeout |
505 | HTTP Version Not Supported | :http_version_not_supported |
506 | Variant Also Negotiates | :variant_also_negotiates |
507 | Insufficient Storage | :insufficient_storage |
510 | Not Extended | :not_extended |
尊敬し合える議論っていいよね
僕は原発は無い方がいい派です。
しかし、原発無くしたい人たちが、原発再稼働賛成の人を罵倒したりしているのを、 ネットで見ていたりするのをみると不快です。
同様に、原発再稼働賛成の人が、原発反対の人を、わかってないバカみたいな感じで扱うのも気分が悪くなります。
また、どちらの陣営に関してもですが、仲間うちで 敵対勢力をバカにしたような感じで同調しあう感じのやり取りが苦手です。
もちろんほとんどの人は礼儀正しくやっているのでしょうが、 角が立っている人がやっぱり目立っていて嫌です。
お互いリスクとメリット、歴史的な背景や、感情論も含めたところを 鑑みて、自分の立ち位置決めてるんですし もうちょっと言葉を選んでもらえないかなーと思う次第です。
重要なことなので、言葉尻で感情的になるべきじゃないと思うので。
実際、日本に住めなくなっちゃった場所が出来たのも事実。 また、雪降りゃ電気足りなくなるのも事実。 どっちも大変なことです。
自分と違う意見の人を大切に扱えるかどうかは、 民主主義や現代の社会を生きるのに必要な資質と思います。
という気持ちになった、建国記念日の夜です。
インストールしたgemはどこにあるのか
ほとんどはbundlerさんのおかげで明確なわけですが、普通にgem install
したらばどこに入ってるのか、知りたくて気持ち悪くなりました。
まー単純にgemのコードを読みたくなったって話なんですが。
gem environment
を実行すると、わかりました。僕の場合、以下のように出ました。
RubyGems Environment: - RUBYGEMS VERSION: 2.0.6 - RUBY VERSION: 1.9.3 (2013-06-27 patchlevel 448) [x86_64-darwin12.4.0] - INSTALLATION DIRECTORY: /Users/unlearned/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1 - RUBY EXECUTABLE: /Users/unlearned/.rbenv/versions/1.9.3-p448/bin/ruby - EXECUTABLE DIRECTORY: /Users/unlearned/.rbenv/versions/1.9.3-p448/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-12 - GEM PATHS: - /Users/unlearned/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1 - /Users/unlearned/.gem/ruby/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - :ssl_verify_mode => 0 - REMOTE SOURCES: - https://rubygems.org/
これで、GEM PATHS
のところを探れば良いわけですね。
簡単です。
ruby 2.1.0インストール、gemにも
インストールをrbenvを使ってするんだけど、 gemも一気に入れ替えてみる。
$ rbenv install -l # インストール可能なバージョンを調べる $ RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl)" $ rbenv install 2.1.0 $ rbenv install 2.1.0 # インストール $ rbenv global # 現在グローバルでのバージョン表示 $ gem list --no-versions > /tmp/gemlist # 今までつかってたrubyのgemのリスト $ rbenv global 2.1.0 # グローバルで使用するrubyに設定 $ rbenv rehash $ gem install `cat /tmp/gemlist` $ rbenv rehash
インフラまわりのメモです。
なんか最近、言葉をすぐ忘れてしまったりするのでメモです。
chefspec
chefのcookbookのテストをRspecで書ける
serverspec
サーバーのインストールや、コンフィグレーションのテストをRspecで書ける
Docker
VMみたいなもん。linux上で複数のlinuxを動かせる。 システム分離にLinux Containers(LXC)、ファイルシステムにAdvanced multi layered unification system(Aufs)を使っていて、軽量
Linux Containers(LXC)
仮想マシンではなくて、個別のプロセスとネットワークスペースを作り出す仮想環境。 chroot的な?
Advanced multi layered unification system(Aufs)
ユニオンマウントができて、UnionFSよりも安定 いくつかのファイルシステムをオーバーレイしてマウントできる。 スナップショット的にも使える。
emacsのパッケージアンインストール
私の名前は高城 剛。住所不定、職業不明。
僕にとって高城剛は、ゲーム番組にでてた、 ゲーム業界に詳しい人だったんだが、ちょっと世間では違うようなので読んでみた。 というか、忙しい時にかぎって、こういうどうでもいい本が読みたくなるもんだ。
なんか、思ったよりも、えらい人だったんだなーと。 あと、ちょっと仏教的な考え方にたどり着いちゃった人のようで、 玄米を食べてるとか、んー。
これからの時代の先を考えてる人の感じを知るにはいいと思います。 とにかく、海外に遊びにいきたいなーと思う本でした。