As a Rails developer I have often seen the shorthands for specifying different dates using the built-in methods on Fixnum. For example, if you want to specify the date for 5 days ago, you can simply use:
However, what I didn’t know was that there is a similar shorthand for specifying file sizes – I stumbled across this while trying to upload files directly to S3.
Pretty neat! Happy coding.