Sinatraonpassenger 090419090519 Phpapp01

696 views

Published on

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
696
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Sinatraonpassenger 090419090519 Phpapp01

  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 itsZero • Works in hypo • 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

×