Inspired by @theodorton’s TIL: January 2020, here is my take on last month’s TILs.
add_column :users, :some_column, :text, default: "default_value"
is safe in Postgres 11+, MySQL 8.0.12+, and MariaDB 10.3.2+.
(source : strong_migrations#adding-a-column-with-a-default-value)
sucker_punch looks to be reasonable choice for your background jobs processor if heroku bills scare you off.
CSS selector for namespaces is “|”, so for example if you’re looking
for <content:encoded>, the selector should be content|encoded.
(source : aaronfrerichs)
Rails. If you have a column named type and don’t want to use it as
a STI discriminator column, you can “disable” with
self.inheritance_column = :_type_disabled.
fetch follows redirects, use redirect: manual to disable it.
iTerm2. You can enable Option+Arrow to skip words by turning natural text editing on.
Nearly 4.5mln cases of influenza have been confirmed in 2018/19 season in Poland only. It’s more than 10% of whole population. 6% of those required hospital intervention. 150 cases ended in death.