Snippet to directly send an e-mail in Rails, without templates
ActionMailer::Base.mail(
from: "gamecreatre@example.com",
to: "receiver@example.com",
subject: "Sample Subject",
body: "Message Body"
).deliver
There are 22 posts filed in Code Snippets (this is page 3 of 5).
Snippet to directly send an e-mail in Rails, without templates
ActionMailer::Base.mail(
from: "gamecreatre@example.com",
to: "receiver@example.com",
subject: "Sample Subject",
body: "Message Body"
).deliver
find . -name config.rb -print0 | xargs -0 grep 'search-thing'
sed -n -e '/DROP TABLE.*`table_name`/,/UNLOCK TABLES/p' dump.sql > table_name.sql
Source: https://ruleoftech.com/2019/restore-single-table-from-full-mysql-database-dump
find . -newermt '14 days ago' ## minutes/hours etc.. see date input formats
In this example I get the ruby-version of my projects.
tail -n +1 */.ruby-version
Which results in the following output
==> project1/.ruby-version <==
2.5.1
==> project2/.ruby-version <==
3.0.0
==> project3/.ruby-version <==
2.7.2