diff options
Diffstat (limited to 'src/content/tils/2020/09')
-rw-r--r-- | src/content/tils/2020/09/04/cli-email-fun-profit.adoc | 11 | ||||
-rw-r--r-- | src/content/tils/2020/09/05/oldschool-pr.adoc | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/content/tils/2020/09/04/cli-email-fun-profit.adoc b/src/content/tils/2020/09/04/cli-email-fun-profit.adoc index 5476fac..1da1154 100644 --- a/src/content/tils/2020/09/04/cli-email-fun-profit.adoc +++ b/src/content/tils/2020/09/04/cli-email-fun-profit.adoc @@ -15,7 +15,7 @@ Reason 3 is the fun part, reasons 1 and 2 are the profit part. First {ssmpt}[install and configure SSMTP] for using, say, Gmail as the email server: -[source,shell] +[source,sh] ---- # file /etc/ssmtp/ssmtp.conf FromLineOverride=YES @@ -31,7 +31,7 @@ AuthPass=password Now install {mailutils}[GNU Mailutils] (`sudo apt-get install mailutils` or the equivalent on your OS), and send yourself your first email: -[source,shell] +[source,sh] ---- echo body | mail -aFrom:email@example.com email@example.com -s subject ---- @@ -39,7 +39,7 @@ echo body | mail -aFrom:email@example.com email@example.com -s subject And that's about it, you've got mail. Here are some more places where it might be applicable: -[source,shell] +[source,sh] ---- # report a backup cronjob, attaching logs set -e @@ -62,10 +62,11 @@ trap finish EXIT do-long-backup-cmd-here ---- -.... +[source,sh] +---- # share the output of a cmd with someone some-program | mail someone@example.com -s "The weird logs that I was talking about" -.... +---- ...and so on. diff --git a/src/content/tils/2020/09/05/oldschool-pr.adoc b/src/content/tils/2020/09/05/oldschool-pr.adoc index a2c758c..392ec67 100644 --- a/src/content/tils/2020/09/05/oldschool-pr.adoc +++ b/src/content/tils/2020/09/05/oldschool-pr.adoc @@ -26,7 +26,7 @@ to be locked in by any of them, putting the "D" back in "DVCS": it’s a Here’s the raw output of a `git request-pull`: -[source,shell] +[source,sh] ---- $ git request-pull HEAD public-origin The following changes since commit 302c9f2f035c0360acd4e13142428c100a10d43f: @@ -62,7 +62,7 @@ address ready for public consumption. A simple solution for that is for you to add the `public-origin` alias as the HTTPS alternative to the SSH version: -[source,shell] +[source,sh] ---- $ git remote add public-origin https://example.com/user/repo ---- @@ -78,7 +78,7 @@ Experiment it yourself, and get acquainted with the CLI. Now that you can create the content of a pull request, you can just {cli-email}[deliver it] to the interested parties email: -[source,shell] +[source,sh] ---- # send a PR with your last commit to the author's email git request-pull HEAD public-origin | mail author@example.com -s "PR: Add thing to repo" |