02 May '12, 2pm

@lucperkins you don't need to use haml, dude. Sinatra supports anything Tilt supports You probably want ERB or Mustache

# 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.html#Available%20Template%...

Tweets

Sinatra: Documentation:

sinatrarb.com 02 May '12, 2pm

A whirlwind tour of Sinatra’s most interesting features. Configuring Settings Detailed documentation on all of Sinatra’s b...

New Google development kit supports MIPS

eetimes.com 02 May '12, 8pm

SAN FRANCISCO--MIPS Technologies Inc. has welcomed Google Inc.’s release of a native development kit (NDK) for Android whi...

Amazon Kindle Fire supports USB Host OTG now #fb

jayceooi.com 29 Apr '12, 9am

Yup, just like Samsung Galaxy S II that supports USB Host OTG (too bad that HTC One X does not support it officially). Kin...

use after_commit

rubyflow.com 02 May '12, 10pm

Most developers use AR callbacks after_create/after_update/after_destroy to generate background job, expire cache, etc., b...

Do We Really Need Omega's? via @sophieuliano #omega #health

Do We Really Need Omega's? via @sophieuliano #o...

gorgeouslygreen.com 02 May '12, 4pm

Omega supplements can be confusing and many of my readers have questioned whether or not they really need to supplement wi...

“Sinatra: README”

sinatrarb.com 27 Apr '12, 5am

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

New Legislation in Congress Supports Facebook U...

searchenginejournal.com 01 May '12, 4pm

A new bill proposed by Eliot Engel (NY-D) and Jan Schakowsky (IL-D) known as the “Social Networking Online Protection Act”...

Speak up! Young people need to be heard at the Earth Summit

Speak up! Young people need to be heard at the ...

grist.org 02 May '12, 6pm

Next month, the United Nations will hold a mega-conference in Rio de Janeiro, Brazil — the Earth Summit, aka Rio+20 . In a...

Why Link Builders Need To Do More Than Just Build Links

Why Link Builders Need To Do More Than Just Bui...

searchengineland.com 01 May '12, 5pm

In the past few months, link building as we’ve known it has been totally shaken up by three major events: Google anounced ...

Skip the Gym: The Only Piece of Strength Equipment You Need #running

Skip the Gym: The Only Piece of Strength Equipm...

runaddicts.net 01 May '12, 7pm

Interested in writing for RunAddicts.net? Get started now! Most runners have a love-hate relationship with lifting weights...

[BLOGPOST] Google Drive Terms of Service: Everything You Seriously Need to Know

[BLOGPOST] Google Drive Terms of Service: Every...

domain.me 30 Apr '12, 7am

Google Drive was released and we already analyzed why you won’t use it . Maybe as a bit of additional free cloud storage, ...

Tell President Obama You Want an End to Factory Farming!

Tell President Obama You Want an End to Factory...

treehugger.com 02 May '12, 12pm

Last October TreeHugger was on the media sponsors of Farm Sanctuary 's first Conference to End Factory Farming . It's a hu...