-
Time zone conversion cheat sheet at the shell with Ruby
Why would you need a command line time zone conversion? Imagine that you’re troubleshooting a problem. Add that your team is distributed across multiple timezones. Now add that database times are generally recorded in UTC, but your alerting all displays in local time. If you’re trying to pinpoint when an event happened and comparing notes…
-
Error on an M1 Mac loading Rails: node-sass refusing to compile.
Fixing an error with a stale Rails project erroring while starting up on an M1 Mac
-
Getting a Count of Occurrences of Items in a Ruby Array (and a Caveat for Rails)
I feel like I’m often wanting to count occurrences of items in an array (Rails has its own special case as well), and I’m always trying to do it the “long way.” I finally stumbled upon this answer on StackOverflow that details the version-by-version options: Ruby 2.7+ use .tally directly on the array: Ruby 2.4+…