Sunday, December 4, 2011

Learn some Ruby syntaxes from company source code

I think the fastest way to catch up Ruby and Rails idiomatic of my new company is to learn from it directly instead of learning from other available tutorials or books. Below is my note on this learning.

Rake

Exec shell command


  • use back-quote such as `ls`
  • return string from stdout
  • access Process object with $? such as $?.success
  • (not related to Ruby) `command 2>/dev/null` get rid of stderr

- string.chomp to remove new line in end of string

RSpec a lot of things on https://www.relishapp.com/rspec

No comments:

Config number of file descriptors on Linux

Check file descriptor limit for a process. Vary depending on owner of the process $ cat /proc/{process-id}/limits Check current number of...