start new:
tmux
start new with session name:
tmux new -s myname
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
RubySpec は Ruby で動くコードによって Ruby そのものの挙動を記述しようとするテストの集まりです。詳しくは http://rubyspec.org
これを動かしてみましょう。
git clone git://github.com/rubyspec/rubyspec.git
| #!/bin/env python | |
| import Image | |
| import urllib | |
| import datetime | |
| import json | |
| import os | |
| class Watts(object): | |
| def __init__(self): |
| #!/usr/bin/env ruby | |
| ## | |
| # script/spec_server_irb | |
| require 'drb' | |
| require 'irb' | |
| begin | |
| begin |
The DeferredDispatcher is a way to get around the 30-second limit for App Engine requests. We don't want spin-up to be a "show stopper", and we want every request to have a full 30 seconds to do "real work". We added this to appengine-rack 0.0.7, so folks won't need an additional require. The DeferredDispatcher works by using redirects to break up a loading request into 3 parts.
We are inside jruby-rack, so obviously the runtime and Jruby-rack have initialized, so first we set @runtime to true (from nil) and redirect. Next pass, we notice that the @rack_app is nil, so we require the framework (which can take some time) and create a new dispatcher (these have been passed in as a hash) and redirect. In the final pass, we hand the environment to the dispatcher, to do the original "work" of the request.
| # stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
| # and made a lot more robust by me | |
| # this implementation uses erb by default. if you want to use any other template mechanism | |
| # then replace `erb` on line 13 and line 17 with `haml` or whatever | |
| module Sinatra::Partials | |
| def partial(template, *args) | |
| template_array = template.to_s.split('/') | |
| template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" | |
| options = args.last.is_a?(Hash) ? args.pop : {} | |
| options.merge!(:layout => false) |