2013-01-01から1年間の記事一覧

Sinatraでアプリ構築

http://www.sinatrarb.com/intro-jp.html アプリ構築 プロジェクト作成 $ mkdir hello-sinatra $ cd hello-sinatra $ bundle init Gemfile # A sample Gemfile source "https://rubygems.org" gem "sinatra" gemをインストール $ bundle install --path=vend…

nodebrewでnode.jsをインストール

node.jsのバージョン管理システム https://github.com/hokaccha/nodebrew インストール(github 公式documentより) $ curl -L git.io/nodebrew | perl - setup ... install nodebrew in $HOME/.nodebrew ======================================== Add path: …

idobata.ioにはてブのエントリーを通知するRubyスクリプトを書いてみた

最近開発時のコミュニケーションツールとして、社内の何人かで試しにidobata.ioを使っていて Emacsのルームができたので、はてブのEmacsエントリーを自動で通知させるスクリプトを書いてみた。 idobata.ioはルームごとにWebhookのURLを提供してくれているの…

OS X Mavericksでcommand line toolsインストール

mac

Mavericksにしてからbrew doctorでcommand line toolsがないよっというwarningがでるようになった。 kawahiro@mac ~$ brew doctor Warning: No developer tools installed. You should install the Command Line Tools. Run `xcode-select --install` to ins…

Railsで連動プルダウン

都道府県を選んだら市区町村が絞り込まれるとかよくあるやつ。 今回は会社登録時に都道府県と市区町村をプルダウンで選べるみたいな設定で考える。 都道府県、市区町村、会社のモデルとそれぞれのリレーションはこんな感じ。 # ms_pref.rb class MsPref < Ac…