Files
oam/knowledge base
2023-05-23 00:01:25 +02:00
..
2023-05-19 17:43:26 +02:00
2023-05-18 23:59:44 +02:00
2022-06-05 18:16:30 +02:00
2022-05-15 00:24:53 +02:00
2023-02-25 23:15:17 +01:00
2023-05-21 14:54:48 +02:00
2022-05-15 00:24:53 +02:00
2023-03-16 00:46:54 +01:00
2022-10-23 13:48:30 +02:00
2022-05-15 00:24:53 +02:00
2023-02-11 21:38:06 +01:00
2022-10-23 13:48:30 +02:00
2022-10-09 23:13:27 +02:00
2023-01-08 13:23:41 +01:00
2022-08-30 10:46:37 +02:00
2022-10-13 16:32:02 +02:00
2022-05-16 14:09:51 +02:00
2023-04-10 19:08:54 +02:00
2022-08-23 16:35:33 +02:00
2022-05-01 11:03:32 +02:00
2022-11-02 20:03:23 +01:00
2022-05-16 14:02:44 +02:00
2023-03-04 12:56:49 +01:00
2023-03-16 00:44:48 +01:00
2023-05-18 13:44:41 +02:00
2023-04-29 11:40:14 +02:00
2022-10-30 21:24:31 +01:00
2023-04-29 11:40:14 +02:00
2023-01-11 01:46:55 +01:00
2022-07-20 10:17:01 +02:00
2023-03-14 20:39:49 +01:00
2022-05-15 00:24:53 +02:00
2022-05-16 02:08:37 +02:00
2022-05-15 00:24:53 +02:00
2022-05-15 00:24:53 +02:00
2022-05-02 14:02:35 +02:00
2023-04-27 18:54:01 +02:00
2023-04-06 18:05:22 +02:00
2023-02-25 22:48:53 +01:00
2022-07-01 16:55:08 +02:00
2022-05-15 00:24:53 +02:00
2023-04-08 17:05:55 +02:00
2022-05-16 00:36:06 +02:00
2022-10-30 21:23:32 +01:00
2023-01-29 18:31:24 +01:00
2022-10-04 18:13:56 +02:00
2023-03-16 18:32:53 +01:00
2022-09-15 18:19:01 +02:00
2022-05-15 00:24:53 +02:00
2023-04-06 18:05:22 +02:00
2023-04-06 18:05:22 +02:00
2023-02-11 21:29:48 +01:00
2022-05-15 00:24:53 +02:00
2023-02-11 21:29:48 +01:00
2022-04-24 15:27:47 +02:00
2023-02-07 03:03:42 +01:00
2023-02-04 15:49:31 +01:00
2022-09-15 18:19:01 +02:00
2022-08-29 17:15:53 +02:00
2023-04-29 11:40:14 +02:00
2023-01-08 13:23:06 +01:00
2023-02-18 15:58:49 +01:00
2022-05-15 00:24:53 +02:00
2022-05-15 00:24:53 +02:00
2022-09-07 13:20:01 +02:00
2022-05-15 00:24:53 +02:00
2022-05-15 00:24:53 +02:00
2022-12-04 21:11:34 +01:00
2022-05-15 00:24:53 +02:00
2022-05-15 00:24:53 +02:00
2022-05-15 00:24:53 +02:00
2022-10-23 13:57:37 +02:00
2022-10-23 13:57:37 +02:00
2022-05-15 00:24:53 +02:00
2023-02-12 03:06:49 +01:00
2023-04-22 14:19:40 +02:00
2022-05-15 00:24:53 +02:00
2022-05-15 00:24:53 +02:00
2023-02-25 21:13:08 +01:00
2022-05-15 00:24:53 +02:00
2023-02-17 19:59:20 +01:00
2022-05-15 00:24:53 +02:00
2022-07-20 12:12:23 +02:00
2023-03-28 09:00:38 +02:00
2022-05-15 00:24:53 +02:00
2022-04-17 23:38:21 +02:00

Knowledge base

This is the collection of all notes, reminders and whatnot I gathered during the years.

Conventions

  • Prefer keeping an 80 characters width limit in code blocks.
    This improves readability on most locations.

  • Always use an highlighting annotation when writing code blocks (default to txt).

  • Use sh as highlighting annotation instead of shell when writing shell snippets in code blocks.
    The local renderer just displays them better like this.

    - ```shell
    + ```sh
      #!/usr/bin/env zsh
    
  • Group related options in commands where possible.
    It gives enhanced clarity and a sense of continuation.

      az deployment group validate \
    -   -f 'template.bicep' -g 'resource_group_name' -p 'parameter1=value' parameter2="value" -n 'deployment_group_name'
    +   -n 'deployment_group_name' -g 'resource_group_name' \
    +   -f 'template.bicep' -p 'parameter1=value' parameter2="value"
    
  • Split piped or concatenated commands into multiple lines.
    It emphasizes they are indeed multiple commands.

    - find . -type 'f' -o -type 'l' | awk 'BEGIN {FS="/"; OFS="|"} {print $NF,$0}' | sort --field-separator '|' --numeric-sort | cut -d '|' -f2
    + find . -type 'f' -o -type 'l' \
    + | awk 'BEGIN {FS="/"; OFS="|"} {print $NF,$0}' \
    + | sort --field-separator '|' --numeric-sort \
    + | cut -d '|' -f2
    
  • Indent the arguments of a command when splitting it into multiple lines.
    It makes sooo much easier to have clear what are arguments and what are different commands altogether.

      dnf -y install --setopt='install_weak_deps=False' \
    - 'Downloads/tito-0.6.2-1.fc22.noarch.rpm'
    +   'Downloads/tito-0.6.2-1.fc22.noarch.rpm'
    
  • Do not indent pipes or concatenations when splitting commands into multiple lines.
    It makes clear those are different commands.

      jq --sort-keys '.' datapipeline.json > /tmp/sorted.json \
    -   && jq '.objects = [(.objects[] as $in | {type,name,id} + $in | with_entries(select(.value != null)))]' \
    -        /tmp/sorted.json > /tmp/reordered.json \
    -     && mv /tmp/reordered.json datapipeline.json
    + && jq '.objects = [(
    +   .objects[] as $in
    +   | {type,name,id} + $in
    +   | with_entries(select(.value != null))
    + )]' /tmp/sorted.json > /tmp/reordered.json \
    + && mv /tmp/reordered.json datapipeline.json