This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#language: ja | |
フィーチャ: httpサーバ | |
シナリオ: 静的コンテンツが表示される | |
もし "/"にアクセスする | |
ならば HTTPのステータスコードは"200" | |
かつ 以下の文字列を含むコンテンツが返される | |
""" | |
ようこそ!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rugygems.org/" | |
gem "rails", git:"git://github.com/rails/rails.git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
ja: | |
devise: | |
confirmations: | |
# confirmed: "Your account was successfully confirmed. You are now signed in." | |
confirmed: "アカウントの確認が完了しました。ようこそ!" | |
# send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes." | |
send_instructions: "数分でアカウントの確認手順を記載したメールが届きます。" | |
# send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir product | |
cd product | |
cat <<EOF > Gemfile | |
source :rubygems | |
gem 'capistrano' | |
gem 'railsless-deploy' | |
EOF | |
bundle install | |
capify . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PWD=`pwd` | |
mkdir -p build/{BUILD,SOURCES,SPECS,RPMS,SRPM} | |
cp $SRC build/SOURCES | |
rpmbuild -D "_topdir $PWD/build" $* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% rbenv install 1.9.2-p290 | |
% rbenv rehash | |
% git clone https://github.com/imathis/octopress.git | |
% cd octopress | |
% rbenv local 1.9.2-p290 | |
% ruby -v | |
% gem install bundler | |
% bundle install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% brew update | |
% brew install rbenv | |
==> Downloading https://github.com/sstephenson/rbenv/tarball/v0.3.0 | |
######################################################################## 100.0% | |
==> Caveats | |
To enable shims and autocompletion, add rbenv init to your profile: | |
eval "$(rbenv init -)" | |
==> Summary | |
/usr/local/Cellar/rbenv/0.3.0: 32 files, 160K, built in 6 seconds | |
% echo 'eval "$(rbenv init -)"' > ~/.zshrc.rbenv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
grep "GC" $1 | awk ' NR == 1 { offset = $1 }; { $1 = sprintf("%.3f", $1 - offset); print $0 }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
# l19n by url parameter | |
before_filter :set_locale | |
private | |
def set_locale | |
I18n.locale = params[:locale] || I18n.default_locale | |
end |