Skip to content

Instantly share code, notes, and snippets.

View sletix's full-sized avatar
💭
^^

Oleg Artamonov sletix

💭
^^
View GitHub Profile
@nono
nono / redis2txt.rb
Created November 28, 2011 23:29
Export data from redis to a plain text files
#!/usr/bin/env ruby
require "redis"
redis = Redis.new
redis.keys("*").each do |key|
val = case redis.type(key)
when "string"
redis.get key
when "list"
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@sadfuzzy
sadfuzzy / ruby_strings.md
Last active August 29, 2015 14:08
Ruby strgins operation

%Q (executes #{})

This is an alternative for double-quoted strings, when you have more quote characters in a string.Instead of putting backslashes in front of them, you can easily write:

>> %Q(Joe said: "Frank said: "#{what_frank_said}"")
=> "Joe said: "Frank said: "Hello!"""