For those code snippets in Ruby that I code or read, I will put them here so that I can refer to them later on.