27 Apr '12, 5am

“Sinatra: README”

# app running on http://example.com/example get '/foo' do t = %w[text/css text/html application/javascript] request.accept # ['text/html', '*/*'] request.accept? 'text/xml' # true request.preferred_type(t) # 'text/html' request.body # request body sent by the client (see below) request.scheme # "http" request.script_name # "/example" request.path_info # "/foo" request.port # 80 request.request_method # "GET" request.query_string # "" request.content_length # length of request.body request.media_type # media type of request.body request.host # "example.com" request.get? # true (similar methods for other verbs) request.form_data? # false request["SOME_HEADER"] # value of SOME_HEADER header request.referrer # the referrer of the client or '/' request.user_agent # user agent (used by :agent condition) request.cookies # hash of browser cookies request.xhr? # is this an ajax req...

Full article: http://www.sinatrarb.com/intro#Available%20Template%20Lan...

Tweets

Now browsing: "Sinatra: README (Japanese)"

sinatrarb.com 22 Apr '12, 2pm

# アプリケーションが http://example.com/example で動作している場合 get '/foo' do request.body # クライアントによって送信されたリクエストボディ(下記参照) request.scheme...

WP-Ban 1.40 Readme

lesterchan.net 25 Apr '12, 9am

Ban users by IP, IP Range, host name and referer url from visiting your WordPress's blog. It will display a custom ban mes...

@bfarrellforever They do when it looks like this:

unicorn.bogomips.org 05 May '12, 4pm

Designed for Rack, Unix, fast clients, and ease-of-debugging. We cut out everything that is better supported by the operat...

@lucperkins you don't need to use haml, dude. S...

sinatrarb.com 02 May '12, 2pm

# app running on http://example.com/example get '/foo' do t = %w[text/css text/html application/javascript] request.accept...

Guides Standalone Usage in Sinatra - Padrino Ru...

padrinorb.com 22 Apr '12, 7pm

In these instances, the ideal situation would be to cherry-pick individual enhancements and use them in your existing Sina...