24 Jun '12, 12am

Shades of Gray: Lists and Sets in Redis:

#!/usr/bin/env ruby -wKU require "rubygems" require "redis" CLEAR = `clear` # create an article to comment on db = Redis.new article_id = db.incr("global:next_article_id") article = "article:#{article_id}" class << article def method_missing(field, *args, &blk) return super unless field.to_s !~ /[!?=]\z/ and args.empty? and blk.nil? "#{self}:#{field}" end end db[article.title] = "My Favorite Language" db[article.body] = "I love Ruby!" # initialize some session details comments_per_page = 2 comment_page = 1 login = ARGV.shift || "JEG2" loop do # show article print CLEAR puts "#{db[article.title]}:" puts " #{db[article.body]}" # paginate comments start = comments_per_page * (comment_page - 1) finish = start + comments_per_page - 1 comments = db.list_range(article.comments, start, finish) pagination = Array(start.zero? ? nil : "(p)revious") pagination << "(n)ext" if db.list_l...

Full article: http://blog.grayproductions.net/articles/lists_and_sets_i...

Tweets

Search vs. Social: The 50 Shades of Gray in Onl...

searchenginewatch.com 19 Jun '12, 1pm

Facebook is reportedly working on vastly improving what has long been poor search functionality on their ubiquitous social...

Do you keep daily to-do lists? LinkedIn shares ...

superadrianme.com 21 Jun '12, 7am

21 June 2012, Singapore – LinkedIn revealed in a study of 6,500 professionals in more than 15 countries around the world i...

#147 Sortable Lists - RailsCasts:

#147 Sortable Lists - RailsCasts:

railscasts.com 21 Jun '12, 2pm

All we have to do to make the list sortable is add the sortable_element helper method to the index view. We’ll pass it the...

2hb new - A:E L James T:Fifty shades of grey, f...

secondhandbooks.com.sg 25 Jun '12, 6am

By Title search trend Hunger Games x127 Twilight x95 Harry Potter x87 Game Thrones x78 Secret x77 Fifty Shades x62 Chicken...

2hb sold - A:E L James T:Fifty shades of grey, ...

secondhandbooks.com.sg 25 Jun '12, 4am

By Title search trend Hunger Games x127 Twilight x95 Harry Potter x87 Game Thrones x78 Secret x77 Fifty Shades x62 Chicken...

Google sets out to save dying languages

Google sets out to save dying languages

straitstimes.com 21 Jun '12, 12pm

A screengrab of the Endangered Languages Project video. Google has set out to save the world's dying languages. In an alli...

activity_feed 2.0.0.rc1 released - Activity fee...

rubygems.org 23 Jun '12, 3am

activity_feed 2.0.0.rc1 Activity feeds backed by Redis install gem install activity_feed --pre Download Documentation Subs...

Twitter sets off jitters as 'cascaded bug' hits site

Twitter sets off jitters as 'cascaded bug' hits...

straitstimes.com 21 Jun '12, 11pm

A hacker group claimed credit on Thursday for outages at Twitter after the company said it was affected by a 'cascaded bug...

“Shades of Gray: Ruby 1.9's String”

blog.grayproductions.net 25 Jun '12, 4am

James Edward Gray II added about 1 month later: Ruby has another interesting exception when it comes to Encoding incompati...

Jim Carrey Lists his Malibu Colony Home for $13.95 Million via @zite

Jim Carrey Lists his Malibu Colony Home for $13...

elitechoice.org 18 Jun '12, 7am

The master suite is on the upper floor. It offers the best views from the house as it faces the ocean. It has its own balc...

Shrouded in luxury, The Marina Bay Sands sets t...

luxurylaunches.com 23 Jun '12, 3pm

The Marina Bay Sands hotel, at its heart, is the biggest hotel in Singapore spreading over three 55-story towers connected...

Shades of Gray: Articles in Higher-Order Ruby:

blog.grayproductions.net 01 Jul '12, 11am

James Edward Gray II joined the Ruby community in 2004 and they just haven't been able to get rid of him since then. James...

Keep cool this summer with a pair of gorgeous n...

coach.com 25 Jun '12, 9pm

Glamorously oversized, this playful, colorful design features Signature Cs inside the arms and the \u201Cjumbled\u201D Coa...