Instantly share code, notes, and snippets.

What would you like to do?
git clone
cd redis
sudo make install
make test
sudo redis-server
git clone
cd redis
ruby sample.rb
require "lib/redis"
r =
r.hmset("items:1", "a", 1, "b", 2)
r.hmset("items:2", "a", 3, "b", 4)
r.hset("items:3", "we_can_use_any_hash_structure", "really!!")
r.lpush("list", 1)
r.lpush("list", 2)
r.lpush("list", 3)
r.sort("list", :by => "nosort", :get => "items:*")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment