Files
oam/knowledge base
..
2023-11-18 19:48:55 +01:00
2024-01-01 21:13:39 +01:00
2023-11-18 19:48:55 +01:00
2023-08-18 18:56:11 +02:00
2023-07-10 21:33:56 +02:00
2023-12-24 19:35:27 +01:00
2023-12-26 12:02:34 +01:00
2024-02-15 22:02:53 +01:00
2022-08-30 10:46:37 +02:00
2023-12-23 19:44:15 +01:00
2023-11-18 19:48:55 +01:00
2023-12-24 19:35:27 +01:00
2022-08-23 16:35:33 +02:00
2023-10-14 17:34:50 +02:00
2023-09-14 00:24:11 +02:00
2023-11-18 19:48:55 +01:00
2023-09-20 20:24:37 +02:00
2023-03-04 12:56:49 +01:00
2023-07-18 07:11:46 +02:00
2023-11-18 19:48:55 +01:00
2024-02-19 21:24:11 +01:00
2024-05-02 02:05:05 +02:00
2023-09-10 15:38:43 +02:00
2023-08-06 15:26:09 +02:00
2023-08-23 21:48:48 +02:00
2023-11-18 19:48:55 +01:00
2024-04-24 14:01:09 +02:00
2024-02-17 14:25:53 +01:00
2022-10-30 21:24:31 +01:00
2024-04-04 19:28:08 +02:00
2023-11-18 19:48:55 +01:00
2024-01-01 21:13:39 +01:00
2024-02-16 21:28:21 +01:00
2023-12-26 23:38:49 +01:00
2023-11-18 19:48:55 +01:00
2023-11-25 20:21:21 +01:00
2023-11-13 23:17:19 +01:00
2024-01-01 21:13:39 +01:00
2024-01-09 18:15:57 +01:00
2024-01-16 18:01:16 +01:00
2024-01-09 18:16:34 +01:00
2023-09-19 23:31:18 +02:00
2023-08-04 20:56:28 +02:00
2023-12-29 22:52:10 +01:00
2024-01-31 12:33:07 +01:00
2023-12-24 19:35:27 +01:00
2023-09-14 00:24:11 +02:00
2023-09-23 20:10:07 +02:00
2023-12-24 19:35:27 +01:00
2023-08-04 20:56:53 +02:00
2023-11-18 19:48:55 +01:00
2024-04-08 18:21:26 +02:00
2022-05-15 00:24:53 +02:00
2023-11-13 23:17:19 +01:00
2024-04-28 23:47:23 +02:00
2023-07-30 21:29:57 +02:00
2024-03-03 13:40:32 +01:00
2023-12-24 19:35:27 +01:00
2024-04-04 19:28:08 +02:00
2024-02-29 22:15:10 +01:00
2023-07-14 22:16:12 +02:00
2023-11-18 19:48:55 +01:00
2023-12-29 22:52:10 +01:00
2023-09-14 00:24:11 +02:00
2023-11-18 19:48:55 +01:00
2023-12-24 19:35:27 +01:00
2023-08-12 16:56:31 +02:00
2023-11-18 19:48:55 +01:00
2023-11-18 19:48:55 +01:00
2023-08-06 15:26:32 +02:00
2024-02-11 13:13:15 +01: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 if none is available.

  • 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