25 May '12, 4am

Sinatra: README (Chinese):

# 在 http://example.com/example 上运行的应用 get '/foo' do request.body # 被客户端设定的请求体(见下) request.scheme # "http" request.script_name # "/example" request.path_info # "/foo" request.port # 80 request.request_method # "GET" request.query_string # "" request.content_length # request.body的长度 request.media_type # request.body的媒体类型 request.host # "example.com" request.get? # true (其他动词也具有类似方法) request.form_data? # false request["SOME_HEADER"] # SOME_HEADER header的值 request.referrer # 客户端的referrer 或者 '/' request.user_agent # user agent (被 :agent 条件使用) request.cookies # 浏览器 cookies 哈希 request.xhr? # 这是否是ajax请求? request.url # "http://example.com/example/foo" request.path # "/example/foo" request.ip # 客户端IP地址 request.secure? # false(如果是ssl则为true) request.forwarded? # true (如果是运行在反向代理之后) request.env # Rack中使用的未处理的env哈希 end

Full article: http://www.sinatrarb.com/intro-zh.html#%E9%80%9A%E8%BF%87...

Tweets

Sinatra Book:

sinatra-book.gittr.com 26 May '12, 9am

Sinatra supports many different template engines (it uses the Tilt library internally to support practically every templat...

Steamed chicken with Chinese sausage

food.insing.com 25 May '12, 12pm

When steamed, the complementing aromas from the lap cheong (Cantonese for ‘sausage’) and mushrooms are released, filling t...

120,000 Chinese Electric Vehicles: Filed under:...

altenergystocks.com 24 May '12, 7pm

I asked Art Porcari for a paragraph about what Kandi Technologies' (KNDI ) recent press release meant for the company to b...

Chinese couple knock down elderly woman and bur...

straitstimes.com 24 May '12, 8am

BEIJING (REUTERS) - Chinese police have arrested a young couple who buried an old woman alive believing she was dead after...

Sony Computer Entertainment starts operation of...

digitimes.com 25 May '12, 9am

Sony Computer Entertainment starts operation of console games Chinese-language translation center in Taiwan Ocean Chen, Ta...

Tariffs on Chinese Solar Are Bad for Us All: Fi...

altenergystocks.com 23 May '12, 12pm

Gavin, I agree with many of your points, but to not acknowledge that there have been illegal subsidies doled out to Chines...

Decanter to launch Chinese version of its website

luxuo.com 22 May '12, 3pm

In a sign of the wine times, one of the world’s most authoritative wine publications, Decanter , said it plans to launch a...

Just blogged: Chinese DDoS knocks 123-reg offline

domainincite.com 23 May '12, 2pm

New gTLD applicant asks for money back Chinese DDoS knocks 123-reg offline Four action sports gTLDs fall off a cliff Digit...

All 29 Chinese fishermen kidnapped by unidentif...

straitstimes.com 20 May '12, 3pm

BEIJING (AFP) - All 29 Chinese fishermen kidnapped earlier this month by unidentified armed North Koreans have been freed ...

The New Chinese Patrol Fleet

strategypage.com 20 May '12, 11am

May 20, 2012: In part to help the domestic ship building industry, the China Marine Surveillance (CMS) service is getting ...

@bleything tried the #stream helper?

sinatrarb.com 15 May '12, 8pm

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

Who Are the Winners and Losers From the New Tariff on Chinese Solar Panels? #energy #cleantech #solar @triplepundit

Who Are the Winners and Losers From the New Tar...

triplepundit.com 21 May '12, 9am

“At these margins, China-based manufacturers would certainly have to raise U.S. prices to turn a profit,” Mehta added. So ...

Chinese businesswoman, sentenced to death over ...

straitstimes.com 21 May '12, 11am

BEIJING (Reuters) - A self-made Chinese businesswoman convicted of cheating investors out of millions had her death senten...

Football: Anelka threatens to leave Chinese club Shanghai Shenhua

Football: Anelka threatens to leave Chinese clu...

channelnewsasia.com 21 May '12, 9am

SHANGHAI: French striker Nicolas Anelka has threatened to leave Shanghai Shenhua, a state-backed newspaper said on Monday,...