This file contains 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
#!/usr/bin/env bash | |
sudo apt-get -y update | |
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev git-core | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make | |
sudo make install |
This file contains 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
#!/usr/bin/env ruby | |
#^syntax detection | |
site 'http://community.opscode.com/api/v1' | |
cookbook 'build-essential' | |
cookbook 'ruby_build', | |
:git => 'git://github.com/fnichol/chef-ruby_build.git', :ref => 'v0.6.2' | |
cookbook 'rbenv', |
This file contains 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
# authenticate with the repository | |
# use a blank password | |
cvs -d:pserver:[email protected]:/cvsroot/jusb login | |
# pull down the source | |
cvs -z3 -d:pserver:[email protected]:/cvsroot/jusb co -P jusb | |
# change directories | |
cd jusb |
This file contains 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
en: | |
user_sessions: | |
new: | |
title: "Sign in to My Site" |
This file contains 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
<header> | |
<%=page_title %> | |
<hr/> | |
</header> | |
<%= render "form" %> |
This file contains 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
def page_title(title=view_context.t('.title')) | |
content_tag(:h1, title) | |
end |
This file contains 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 | |
before_filter :infer_bookmarklet_format | |
include BookmarkletFormat | |
end |
This file contains 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 BookmarkletFormat | |
Mime::Type.register_alias "text/javascript", :bookmarklet | |
end |
This file contains 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 BookmarkletFormat | |
Mime::Type.register_alias "text/javascript", :bookmarklet | |
def infer_bookmarklet_format | |
if request.format == :js && request.referer.to_s.match('^' + bookmarklet_url.to_s) | |
request.format = :bookmarklet unless disable_bookmarklet? | |
end | |
end | |
def disable_bookmarklet? |
This file contains 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
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'cucumber' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
if File.exists? "bin/cucumber" | |
exec "bin/cucumber " + $*.join(" ") |