ruby fun

ok, let’s get straight into irb because REPL speaks a thousand words…

irb> %w_a b c_
=> ['a', 'b', 'c']

That was cryptic…try this

irb> %i_a b c_
=> [:a, :b, :c]

That save a whole bunch of keystrokes…how about this

irb> %r_a/b/c_
=> /a\/b\/c/

That makes regular expression with forward slash more readable…in fact there’s a whole slew of them %: %q, %x, %

ok, that’s enough fun for now.

 
0
Kudos
 
0
Kudos

Now read this

nginx pow coexistence

I am a user of Pow, is a zero-config Rack server for Mac OS X…serving your apps locally in under a minute and nginx, [engine x] is an HTTP and reverse proxy server Now, pow is good for rack app but nothing else. But if nginx sits in... Continue →