Misc topics
Hello my name is <ul><li>Michael Grosser </li></ul><ul><li>TU-Dresden / TFH-Berlin </li></ul><ul><li>Rathershort.com </li>...
Topics <ul><li>Smusher </li></ul><ul><li>has_a_location </li></ul><ul><li>acts_as_feed </li></ul>
Smusher
Smusher: Formats <ul><li>GIF -> kleine PNG </li></ul><ul><li>PNG -> kleine PNG </li></ul><ul><li>JPG -> kleine JPG </li></ul>
Smusher: Diff <ul><li>2898 bytes </li></ul><ul><li>138 bytes </li></ul><ul><li>Typically 10-95% </li></ul>
Smusher: Usage <ul><li>git clone git://github.com/grosser/smusher.git </li></ul><ul><li>cd smusher </li></ul><ul><li>rake ...
has_a_location
has_a_location: Setup <ul><li>script/plugin install git://github.com/ptb/geokit.git </li></ul><ul><li>... git://github.com...
has_a_location: Usage <ul><li>@festival.in_radius(500) </li></ul><ul><li>@festival.location = [12.1212,23.232232] </li></u...
acts_as_feed
acts_as_feed <ul><li>Users/Companies blogs </li></ul><ul><li>Transparent  - Atom + RSS </li></ul><ul><li>URL changes -> up...
acts_as_feed: Setup <ul><li>sudo gem install rss-client </li></ul><ul><li>script/plugin install git://github.com/grosser/a...
acts_as_feed: Usage <ul><li>data = YAML.load(feed.feed_data) </li></ul><ul><li>feed_title = data[:title] </li></ul><ul><li...
Ende <ul><li>Danke </li></ul>
Upcoming SlideShare
Loading in...5
×

smusher has_a_location acts_as_feed

595

Published on

Short presentation over my new plkgins acts_as_feed + has_a_locaion and the smusher libary for lossless image reduction

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
595
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

smusher has_a_location acts_as_feed

  1. 1. Misc topics
  2. 2. Hello my name is <ul><li>Michael Grosser </li></ul><ul><li>TU-Dresden / TFH-Berlin </li></ul><ul><li>Rathershort.com </li></ul>
  3. 3. Topics <ul><li>Smusher </li></ul><ul><li>has_a_location </li></ul><ul><li>acts_as_feed </li></ul>
  4. 4. Smusher
  5. 5. Smusher: Formats <ul><li>GIF -> kleine PNG </li></ul><ul><li>PNG -> kleine PNG </li></ul><ul><li>JPG -> kleine JPG </li></ul>
  6. 6. Smusher: Diff <ul><li>2898 bytes </li></ul><ul><li>138 bytes </li></ul><ul><li>Typically 10-95% </li></ul>
  7. 7. Smusher: Usage <ul><li>git clone git://github.com/grosser/smusher.git </li></ul><ul><li>cd smusher </li></ul><ul><li>rake URL=www.x.com/logo.png FILE=public/logo.png </li></ul><ul><li>rake URL=www.x.com/images FOLDER=/my_app/public/images </li></ul><ul><li>Protection: 404 / file larger / file empty </li></ul>
  8. 8. has_a_location
  9. 9. has_a_location: Setup <ul><li>script/plugin install git://github.com/ptb/geokit.git </li></ul><ul><li>... git://github.com/grosser/has_a_location.git </li></ul><ul><li>has_a_location :default_units=>:kms, :default_formula => :flat, :default_location_lat => CFG[:default_lat], :default_location_lng => CFG[:default_lng] </li></ul>
  10. 10. has_a_location: Usage <ul><li>@festival.in_radius(500) </li></ul><ul><li>@festival.location = [12.1212,23.232232] </li></ul><ul><li>@festival = [0,0] #does not save default </li></ul><ul><li>do_stuff if @festival.location </li></ul>
  11. 11. acts_as_feed
  12. 12. acts_as_feed <ul><li>Users/Companies blogs </li></ul><ul><li>Transparent - Atom + RSS </li></ul><ul><li>URL changes -> update </li></ul><ul><li>Old -> Update </li></ul><ul><li>Protect: hanging downloads </li></ul><ul><li>Protect: giant files </li></ul>
  13. 13. acts_as_feed: Setup <ul><li>sudo gem install rss-client </li></ul><ul><li>script/plugin install git://github.com/grosser/acts_as_feed.git </li></ul><ul><li>class Feed < ActiveRecord::Base acts_as_feed :timeout=>3 #seconds belongs_to :covered, :polymorphic => true after_save :update_feed end </li></ul>
  14. 14. acts_as_feed: Usage <ul><li>data = YAML.load(feed.feed_data) </li></ul><ul><li>feed_title = data[:title] </li></ul><ul><li>feed_descr = data[:descriptions] </li></ul><ul><li>first_entry_title = data[:entries][0][:title] </li></ul>
  15. 15. Ende <ul><li>Danke </li></ul>
  1. A particular slide catching your eye?

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

×