0
Sinatra
 Zero & XDite
Make Ur Calendar Icon
Yes, Make our own!
BA
UUDDLRLRBA
• Full-time student
          • Works in hypo
itsZero
          • http://itszero.org/
          • http://twitter.com/itsze...
...
Sinatra + RMagick
#!/usr/bin/ruby
require 'rubygems'
require 'sinatra'
require 'RMagick'
include Magick
 
FONTPATH = File.dirname(File.expan...
http://makeyourcalicon.heroku.com
           http://tr.im/j9DH
Another Example
Oh, Dear Mr IE6...
PHP / CodeIgniter




                ?
debug       ...
 by XDite
require ‘twitter_search’
require 'rubygems'
require 'sinatra'
require 'twitter_search'
get '/' do
    @client = TwitterSearch::Client.new
'politwee...
10   !
db & paginate
activerecord
will_paginate
40
Deployment!
Passenger


•(          ) Ruby   mod_php
• Supports Rack!
Rack
 Handler         Adapters
• Mongrel        • Camping
• WEBrick        • Sinatra
• FastCGI        • Merb
• Passenger  ...
Sinatra on Passenger
 1   require 'rubygems'
 2   require 'sinatra'
 3
 4   Sinatra::Application.default_options.merge!(
 ...
Java on GAE
JRuby + Sinatra + GAE
URLFetching
Bumble
Will_paginate
http://gae.mrie6.com
      http://tr.im/j9DK
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Sinatra
Upcoming SlideShare
Loading in...5
×

Sinatra

1,781

Published on

This is a slide of lightning talk session of OSDC.tw 2009. In this slide, we'll show you some example, and deployment tips & tricks on passenger(mod_rails), heroku and Google .

Published in: Technology, Art & Photos
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
1,781
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
56
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Sinatra"

  1. 1. Sinatra Zero & XDite
  2. 2. Make Ur Calendar Icon
  3. 3. Yes, Make our own!
  4. 4. BA
  5. 5. UUDDLRLRBA
  6. 6. • Full-time student • Works in hypo itsZero • http://itszero.org/ • http://twitter.com/itszero
  7. 7. ...
  8. 8. Sinatra + RMagick
  9. 9. #!/usr/bin/ruby require 'rubygems' require 'sinatra' require 'RMagick' include Magick   FONTPATH = File.dirname(File.expand_path(__FILE__)) + quot;/ Aller/Aller_Bd.ttfquot;   get '/' do   open('public/index.html').read end   get '/gen_icon' do   headers['Content-Type'] = 'image/png'   [some nasty RMagick code...]     canvas.format = 'png'   canvas.to_blob end  
  10. 10. http://makeyourcalicon.heroku.com http://tr.im/j9DH
  11. 11. Another Example Oh, Dear Mr IE6...
  12. 12. PHP / CodeIgniter ?
  13. 13. debug ... by XDite
  14. 14. require ‘twitter_search’
  15. 15. require 'rubygems' require 'sinatra' require 'twitter_search' get '/' do @client = TwitterSearch::Client.new 'politweets' @results = @client.query :q => '@MrIE6' erb :home end
  16. 16. 10 !
  17. 17. db & paginate
  18. 18. activerecord will_paginate
  19. 19. 40
  20. 20. Deployment!
  21. 21. Passenger •( ) Ruby mod_php • Supports Rack!
  22. 22. Rack Handler Adapters • Mongrel • Camping • WEBrick • Sinatra • FastCGI • Merb • Passenger •... •...
  23. 23. Sinatra on Passenger 1 require 'rubygems' 2 require 'sinatra' 3 4 Sinatra::Application.default_options.merge!( 5 :run => false, 6 :environment => :production 7 ) 8 9 require 'make_your_cal_icon.rb' 10 run Sinatra::Application 11 => config.ru
  24. 24. Java on GAE
  25. 25. JRuby + Sinatra + GAE
  26. 26. URLFetching Bumble Will_paginate
  27. 27. http://gae.mrie6.com http://tr.im/j9DK
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×