summaryrefslogtreecommitdiff
path: root/src/content/blog/2021
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-04-16 11:20:43 -0300
committerEuAndreh <eu@euandre.org>2025-04-16 11:20:43 -0300
commitd36c2e459a74ec67e523539eb98b78b95b01432a (patch)
treea7099fbfbdab6a21f59b6efe095bffb40ceae646 /src/content/blog/2021
parentsrc/content/style.css: Show header on hover only (diff)
downloadeuandre.org-d36c2e459a74ec67e523539eb98b78b95b01432a.tar.gz
euandre.org-d36c2e459a74ec67e523539eb98b78b95b01432a.tar.xz
src/content/: Normalize [source,$lang] code blocks
Diffstat (limited to 'src/content/blog/2021')
-rw-r--r--src/content/blog/2021/01/26/remembering-ann.adoc18
-rw-r--r--src/content/blog/2021/02/17/fallible.adoc2
-rw-r--r--src/content/blog/2021/04/29/relational-review.adoc6
3 files changed, 14 insertions, 12 deletions
diff --git a/src/content/blog/2021/01/26/remembering-ann.adoc b/src/content/blog/2021/01/26/remembering-ann.adoc
index 889683d..6786b3c 100644
--- a/src/content/blog/2021/01/26/remembering-ann.adoc
+++ b/src/content/blog/2021/01/26/remembering-ann.adoc
@@ -54,7 +54,7 @@ previous choices appear at the beginning.
Where you would do:
-[source,shell]
+[source,sh]
----
$ seq 5 | fzf
@@ -69,7 +69,7 @@ $ seq 5 | fzf
And every time get the same order of numbers, now you can write:
-[source,shell]
+[source,sh]
----
$ seq 5 | remembering -p seq-fzf -c fzf
@@ -85,7 +85,7 @@ $ seq 5 | remembering -p seq-fzf -c fzf
On the first run, everything is the same. If you picked 4 on the previous
example, the following run would be different:
-[source,shell]
+[source,sh]
----
$ seq 5 | remembering -p seq-fzf -c fzf
@@ -124,7 +124,7 @@ Here are some functions I wrote myself that you may find useful:
=== Run a command with fzf on `$PWD`
-[source,shellcheck]
+[source,sh]
----
f() {
profile="$f-shell-function(pwd | sed -e 's_/_-_g')"
@@ -148,7 +148,7 @@ profile allows it to not mix data for different repositories.
:pass: https://www.passwordstore.org/
-[source,shell]
+[source,sh]
----
choice="$(find "$HOME/.password-store" -type f | \
grep -Ev '(.git|.gpg-id)' | \
@@ -169,14 +169,14 @@ the contents of my {pass}[password store], with the entries ordered by usage.
Where I previously had:
-[source,shell]
+[source,sh]
----
exe=$(yeganesh -x) && exec $exe
----
Now I have:
-[source,shell]
+[source,sh]
----
exe=$(dmenu_path | remembering -p dmenu-exec -c dmenu) && exec $exe
----
@@ -187,7 +187,7 @@ If you don't have `dmenu_path`, you can get just the underlying `stest` tool
that looks at the executables available in your `$PATH`. Here's a juicy
one-liner to do it:
-[source,shell]
+[source,sh]
----
$ wget -O- https://dl.suckless.org/tools/dmenu-5.0.tar.gz | \
tar Ozxf - dmenu-5.0/arg.h dmenu-5.0/stest.c | \
@@ -198,7 +198,7 @@ $ wget -O- https://dl.suckless.org/tools/dmenu-5.0.tar.gz | \
With the `stest` utility you'll be able to list executables in your `$PATH` and
pipe them to dmenu or something else yourself:
-[source,shell]
+[source,sh]
----
$ (IFS=:; ./stest -flx $PATH;) | sort -u | remembering -p another-dmenu-exec -c dmenu | sh
----
diff --git a/src/content/blog/2021/02/17/fallible.adoc b/src/content/blog/2021/02/17/fallible.adoc
index f2aa333..1f2f641 100644
--- a/src/content/blog/2021/02/17/fallible.adoc
+++ b/src/content/blog/2021/02/17/fallible.adoc
@@ -265,7 +265,7 @@ int main() {
Compile with `-DFALLIBLE` and run {fallible-check}[`fallible-check.1`]:
-[source,shell]
+[source,sh]
----
$ c99 -DFALLIBLE -o leaky leaky.c -lfallible
$ fallible-check ./leaky
diff --git a/src/content/blog/2021/04/29/relational-review.adoc b/src/content/blog/2021/04/29/relational-review.adoc
index cb552c3..4b53737 100644
--- a/src/content/blog/2021/04/29/relational-review.adoc
+++ b/src/content/blog/2021/04/29/relational-review.adoc
@@ -89,6 +89,7 @@ FROM people employees
INNER JOIN people managers ON employees.manager_id = managers.id;
----
+[source,clojure]
----
;; create schema
#{{:db/ident :person/id
@@ -126,11 +127,12 @@ Both "Foo" and "Bar" are employees, and the data is normalized. SQL represents
data as tables, and Datomic as datoms, but relations could be derived from both,
which we could view as:
-....
+[source,sql]
+----
employee_name | manager_name
----------------------------
"Foo" | "Bar"
-....
+----
== Conclusion