Githubが会社向けに機能充実!・・・と思ったら月100ドルとか意外と高ぇ・・・。
と、思ってたらすぐさまこんなリリースが!
Organizations for Small Businesses - GitHub
Bronzeで月25ドルから。ちょっとこれはいいかもしんないですねー。
リポジトリは開発会社にとって落ちたら業務が出来ないので社内に置くと維持にちょっとドキドキ。社外にサーバー借りるにしても面倒+そこそこ費用がかかる。メンテナンスフリーで使い勝手の良いGithubがこのお値段で使えるならお得じゃないでしょうか。

そうそうそう!
config/routes.rb
ActionController::Routing::Routes.draw do |map|
map.posts 'posts', :controller => 'posts', :action => 'create',
:conditions => {:method => :post}
end
POST
% telnet localhost 3000
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
POST /posts HTTP/1.0
Content-Length: 21
hoge=fuga&hoge2=fuga2
HTTP/1.1 200 OK
Etag: "d1a0c9e0358e819fd093bc7ddd19caeb"
Connection: close
Content-Type: text/html; charset=utf-8
Date: Thu, 01 Jul 2010 08:54:17 GMT
Server: WEBrick/1.3.1 (Ruby/1.8.7/2010-06-23)
X-Runtime: 2
Content-Length: 72
Cache-Control: private, max-age=0, must-revalidate
<h1>Posts#create</h1>
<p>Find me in app/views/posts/create.html.erb</p>
Connection closed by foreign host.
GET
% telnet localhost 3000
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refusedTrying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /posts HTTP/1.0
HTTP/1.1 405 Method Not Allowed
Allow: POST
Connection: close
(以下略)
Module: ActionController::Routing
Route conditions
With conditions you can define restrictions on routes. Currently the only valid condition is :method.
- :method - Allows you to specify which method can access the route. Possible values are :post, :get, :put, :delete and :any. The default value is :any, :any means that any method can access the route.
Introducing Organizations - GitHub
Today we're introducing Organizations. Organizations simplify management of group-owned repositories (for example: your company's code), expand on our permissions system, and help focus your GitHub workflow for business and large open source projects.
githubに会社や大規模オープンソースプロジェクト用のOrganizations機能が入ったそうです。
今までは個人が他人をコラボレーターに追加するしかなかったので大きな会社では使い辛かったかもしれません。Organizations機能でグループ共通のダッシュボードや支払いやユーザー管理も一元化出来るそうです。もう会社でGithub使う準備が出来たって感じですね。

Wifi
$ dmesg | grep Wireless
[ 6.520647] ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.2kmprq
[ 6.665137] ipw2200: Detected Intel PRO/Wireless 2915ABG Network Connection
ipw2200ってヤツだそうです。sid main contrib non-freeで下記。
% sudo aptitude install firmware-ipw2x00
配下のディレクトリを755, それ以外を644
% chmod -R 644 .
% find . -type d -exec chmod 755 {} \;Hoptoadと同種の本番環境でのエラーの内容や回数を管理したり通知してくれるサービス。
ドキュメント通りで何の問題も無く動きます。
% gem install exceptional
require 'rubygems'
require 'sinatra'
set :raise_errors, true
require 'exceptional'
use Rack::Exceptional, API_KEY
get '/' do
"Hello World!"
end
get '/error' do
big.problem!
end
Sinatraでの実際のコードはこんな感じです。
一番の利点はHerokuのAddonからだと月9$が無料になること。しかし、Hoptoadの方がeggプランは元々無料だし、機能豊富なので良い気も。Herokuはなるべくシンプルなサービスを選んで組むそうなのでシンプルな方がよかったのかな。それとも連携に機能的・政治的な問題があったのかな?
コレの回答をtakaakiさんとfunc09さんに教えてもらいました。
% heroku config:add key=value
heroku configでサーバー上の環境変数を設定できるそうです。これはスマート!
ExceptionalなんかAddOn追加した時点でキーがENVに既に設定されてて至れり尽くせり。
% heroku config
EXCEPTIONAL_API_KEY => 7a3ee516cdb490dd...9e10d194fcf48410
RACK_ENV => production
こんな感じで行けちゃいます。
use Rack::Exceptional, ENV['EXCEPTIONAL_API_KEY'] || 'key'
設定ファイルとかも全部コレ。楽だわぁ。
イメージ作成
fsutil file createnew home.img 4294967296
ファイル C:\Program Files\coLinux\home.img が作成されました
fsutil file createnew root.img 4294967296
ファイル C:\Program Files\coLinux\root.img が作成されました
fsutil file createnew swap.img 536870912
ファイル C:\Program Files\coLinux\swap.img が作成されました
イメージ拡張
# colinux.conf
cobd0="C:\Program Files\coLinux\Debian-4.0r0-etch.ext3.1gb"
cobd1="C:\Program Files\coLinux\Debian-4.0r0-etch.ext3.1gb2"
cobd2="C:\Program Files\coLinux\root.img"
mkdir /mnt/src
mount /dev/cobd1 /mnt/src
mkdir /mnt/dst
mkfs.ext3 /dev/cobd2
mount /dev/cobd2 /mnt/dst
cp -Rap /mnt/src/* /mnt/dst/
halt
swap作成
mkswap /dev/cobd1
cofs
colinux設定ファイル
cofs0="C:\Documents and Settings\komagata\My Documents"
/etc/fstab
/dev/cofs0 /mnt/win cofs uid=komagata,gid=komagata,dmask=0755,fmask=0644 0 0
シングルユーザーモード
root=/dev/cobd0 ro single

