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
# # if Zero | |
# = switch_if(0) do | |
# h1 | |
# ... | |
# # => <div class='zero' id='zero'><h1>...</h1></div> | |
# | |
# # if One | |
# = switch_if(1) do | |
# h1 | |
# ... |
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
module ApplicationHelper | |
def icon_name_for(name) | |
sym_name = name.to_sym | |
case sym_name | |
when :home | |
'icon-dashboard' | |
when :team | |
'icon-group' | |
when :content | |
'icon-pencil' |
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
~ ‹1.9.3-p392› $ gem i capybara | |
Fetching: capybara-2.1.0.gem (100%) | |
IMPORTANT! Some of the defaults have changed in Capybara 2.1. If you're experiencing failures, | |
please revert to the old behaviour by setting: | |
Capybara.configure do |config| | |
config.match = :one | |
config.exact_options = true | |
config.ignore_hidden_elements = true | |
config.visible_text_only = true |
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
ubuntu@ip-99-999-999-99:~$ sudo passenger-install-nginx-module | |
Welcome to the Phusion Passenger Nginx module installer, v3.0.19. | |
This installer will guide you through the entire installation process. It | |
shouldn't take more than 5 minutes in total. | |
Here's what you can expect from the installation process: | |
1. This installer will compile and install Nginx with Passenger support. | |
2. You'll learn how to configure Passenger in Nginx. |
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
~/rails ‹2.0.0-p0› $ rails new todo -T | |
create | |
create README.rdoc | |
create Rakefile | |
create config.ru | |
create .gitignore | |
create Gemfile | |
create app | |
create app/assets/images/rails.png | |
create app/assets/javascripts/application.js |
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
~ ‹2.0.0-p0› $ rbenv install 1.9.3-p392 | |
Downloading yaml-0.1.4.tar.gz... | |
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b | |
Installing yaml-0.1.4... | |
Installed yaml-0.1.4 to /Users/takuyan/.rbenv/versions/1.9.3-p392 | |
Downloading ruby-1.9.3-p392.tar.gz... | |
-> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | |
Installing ruby-1.9.3-p392... |
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
~ ‹1.9.3-p374› $ rbenv install 2.0.0-p0 | |
Downloading openssl-1.0.1e.tar.gz... | |
-> https://www.openssl.org/source/openssl-1.0.1e.tar.gz | |
Installing openssl-1.0.1e... | |
Installed openssl-1.0.1e to /Users/takuyan/.rbenv/versions/2.0.0-p0 | |
Downloading ruby-2.0.0-p0.tar.gz... | |
-> http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz | |
Installing ruby-2.0.0-p0... | |
Installed ruby-2.0.0-p0 to /Users/takuyan/.rbenv/versions/2.0.0-p0 |
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
~ ‹1.9.3-p385› $ rbenv install 1.9.3-p392 | |
Downloading yaml-0.1.4.tar.gz... | |
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b | |
Installing yaml-0.1.4... | |
Installed yaml-0.1.4 to /Users/takuyan/.rbenv/versions/1.9.3-p392 | |
Downloading ruby-1.9.3-p392.tar.gz... | |
-> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | |
Installing ruby-1.9.3-p392... |
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
$("body") | |
.on('click', '#binder_open', function(){ | |
$(this).addClass("hide"); | |
$("#binder").addClass("open"); | |
$("html,body").animate({ scrollTop: 0}, 600); | |
}) | |
.on("click", "#binder .binder_close, #footer_close", function(){ | |
$("#binder_open").removeClass("hide"); | |
$("#binder").removeClass("open"); | |
}); |
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
// クリックすると何かが開く程度の認識で良いです | |
$("#binder_open").live('click', function(){ | |
$(this).addClass("hide"); | |
$("#binder").addClass("open"); | |
$("html,body").animate({ scrollTop: 0}, 600); | |
}); | |
// クリックすると何かが閉じる程度の認識で良いです | |
$("#binder .binder_close, #footer_close").live("click", function(){ | |
$("#binder_open").removeClass("hide"); | |
$("#binder").removeClass("open"); |