summaryrefslogtreecommitdiff
path: root/3 resources
diff options
context:
space:
mode:
Diffstat (limited to '3 resources')
-rw-r--r--3 resources/Note taking.md7
-rw-r--r--3 resources/TaskWarrior (ToDo).md3
-rw-r--r--3 resources/ansible.md20
-rw-r--r--3 resources/elixir.md (renamed from 3 resources/programming/Elixir.md)2
-rw-r--r--3 resources/group.one infra.md (renamed from 3 resources/Group.ONE Infrastructure.md)0
-rw-r--r--3 resources/man pages.md (renamed from 3 resources/Man pages.md)1
-rw-r--r--3 resources/mermaidjs.md21
-rw-r--r--3 resources/nix.md58
-rw-r--r--3 resources/note taking system.md21
-rw-r--r--3 resources/programming/Elixir - modules.md0
-rw-r--r--3 resources/programming/Nix.md16
-rw-r--r--3 resources/rabbitmq.md (renamed from 3 resources/RabbitMQ.md)1
-rw-r--r--3 resources/taskwarrior.md4
13 files changed, 125 insertions, 29 deletions
diff --git a/3 resources/Note taking.md b/3 resources/Note taking.md
deleted file mode 100644
index 2a47666..0000000
--- a/3 resources/Note taking.md
+++ /dev/null
@@ -1,7 +0,0 @@
-**2024-08-21 17:59:00**
-I want to become better at taking notes consistently in the hope that I forget less important things and become better overall at managing knowledge.
-To try and create the habit I will open a new daily note in Obsidian at the start of the day and sit down at the end of the day to refine anything written down into a more permanent form like this one. I'm hoping that by doing this consistently I will more often write down ideas, information, etc. during the day, rather than forget about it.
-
-After refining the daily notes, I should commit and push changes to a remote git repo that is also regularly backed up so I keep all this knowledge safe.
-
-I'm not yet sure if and how I incorporate this into a "zettelkast", something I did start before but never really stuck. I will need to do more research into this, and note taking overall. \ No newline at end of file
diff --git a/3 resources/TaskWarrior (ToDo).md b/3 resources/TaskWarrior (ToDo).md
deleted file mode 100644
index 6002fde..0000000
--- a/3 resources/TaskWarrior (ToDo).md
+++ /dev/null
@@ -1,3 +0,0 @@
-**2024-08-21 18:03:00**
-I want to better keep track of what i'm doing, for that purpose I will use taskwarrior. For usage see `man task`.
-Adding a task is done by `task add`, to modify it `task <ID> modify` . I use priorities, they can be set on a new or existing task with `priority:H/M/L`.
diff --git a/3 resources/ansible.md b/3 resources/ansible.md
new file mode 100644
index 0000000..501f9d0
--- /dev/null
+++ b/3 resources/ansible.md
@@ -0,0 +1,20 @@
+# Ad-hoc commands
+update apt cache:
+```
+ansible <pattern> -m ansible.builtin.apt -a "update_cache=true cache_valid_time=3600"
+```
+
+update packages:
+```
+ansible <pattern> -m ansible.builtin.apt -a "name=* state=latest"
+```
+
+run puppet:
+```
+ansible <pattern> -a "/opt/puppetlabs/bin/puppet agent --test"
+```
+
+reboot:
+```
+ansible <pattern> -m ansible.builtin.reboot -f 1
+```
diff --git a/3 resources/programming/Elixir.md b/3 resources/elixir.md
index b106ae4..4d38de1 100644
--- a/3 resources/programming/Elixir.md
+++ b/3 resources/elixir.md
@@ -1,6 +1,6 @@
Elixir supports "macro's", which is Elixir code that runs at compile time. They receive the AST of the source code as input and can apply transformations to it. This is how Elixir is written itself, using Elixir macro's.
-Elixir functions can be organized into [[Elixir - modules]].
+Elixir functions can be organized into [[elixir - modules]].
```
defmodule MyModule do
# Comment
diff --git a/3 resources/Group.ONE Infrastructure.md b/3 resources/group.one infra.md
index 1d9ba33..1d9ba33 100644
--- a/3 resources/Group.ONE Infrastructure.md
+++ b/3 resources/group.one infra.md
diff --git a/3 resources/Man pages.md b/3 resources/man pages.md
index 901be15..576d4b8 100644
--- a/3 resources/Man pages.md
+++ b/3 resources/man pages.md
@@ -1,3 +1,2 @@
-**2024-08-21 18:07:20**
I need to more consistently read man pages. Example is `man task` to see how taskwarrior works, after reading it today I found that it is actually quite easy.
They often contain good information on how to use a certain tool. \ No newline at end of file
diff --git a/3 resources/mermaidjs.md b/3 resources/mermaidjs.md
new file mode 100644
index 0000000..e468459
--- /dev/null
+++ b/3 resources/mermaidjs.md
@@ -0,0 +1,21 @@
+**ZenUML**
+Optional **Title**
+**Participants** can be declared when used or at the start.
+**Annotators** give **participants** a special icon, defined at the doc site.
+**Aliases** give a short **participant** name a more descriptive name when rendered, e.g: A as Alice <- Alice will be rendered, but the code can use A.
+**Messages** between **participants** can be **sync, async, creation or reply**.
+**Sync** use A.\<MessageName\> have a block {} for nested messages
+**Async** use an arrow A->B: How are you?
+**Creation** new keyword new A(optional params)
+**Reply** three ways to define:
+* Assign var from **Sync** message, e.g: OptionalType a = A.SyncMessage()
+* Return A.SyncMessage { return blaat }
+* @return or @reply on an **async** message
+**Nesting** can be done on both creation and sync messages using blocks {}.
+**Comments** can be added using `// comment` and support markdown.
+**Loops** can be defined using keywords: **while, for, foreach and loop**.
+**Alternative** paths can be sequenced using **if, else** statements. if(blaat) { A.syncMessage(B) }
+**Opt** fragments rendered via `opt { ... }`. This can be useful for optional responses or paths.
+**Parallel** paths can be defined using `par { ... }`.
+**Try/catch/finally** statements are supported as well.
+**@Starter(participant)** to make the line start from a **participant** \ No newline at end of file
diff --git a/3 resources/nix.md b/3 resources/nix.md
new file mode 100644
index 0000000..d407d2e
--- /dev/null
+++ b/3 resources/nix.md
@@ -0,0 +1,58 @@
+# Language
+ `nix repl` to interactively evaluate Nix expressions. `:p` if output is not full.
+ `nix-instantiate --eval <file>.nix` to evaluate a Nix expression from a file. `--strict`.
+
+Nix is like JSON, but with functions.
+Recursive attribute sets can reference values declared earlier in the same set.
+```nix
+rec {
+ one = 1;
+ two = one + 1;
+}
+```
+
+A `let` binding is used to assign names to values just as attribute sets, they can then be used in expressions. Let bindings have a local scope.
+
+A `with` allows referencing attributes of attribute sets without referencing the set.
+# Flakes
+Nix flakes are source trees containing a file `flake.nix` at their root. The file `flake.nix` provides a standardized way to provide [[Zettelkast/Index/Nix]] artifacts. It's like a package manager for [[Zettelkast/Index/Nix]]. A flake can be dependent on other Flakes and it's possible to pin dependencies to exact revisions by using a `flake.lock` file.
+
+Nix flake evaluation is hermetic, meaning that it produces the same result wherever it's built.k
+
+The feature can be enabled in `~/.config/nix/nix.conf`:
+
+```
+experimental-features = nix-command flakes
+```
+
+To initialize in a repo: `nix flake init`.
+
+In flakes dependencies have to be specified explicitly and MUST be locked to specific versions therefore it's no longer allowed to use the nixpkgs found in `NIX_PATH` by referencing it like `<nixpkgs>`.
+
+Output of a Flake is an arbitrary [[Zettelkast/Index/Nix]] value such as a package, [[NixOS]] module or library function.
+Commands `nix build` and `nix shell` will build the output `packages.<system>.default` unless we specify another output, for example: `nix shell .#checks.aarch64-linux.build`.
+
+# Overlays
+[[TODO]]
+
+# Shell.nix
+Can be used to set up per dir environments, e.g using direnv to automatically activate them.
+## Python
+https://nixos.org/manual/nixpkgs/stable/#python
+
+```nix
+{ pkgs ? import <nixpkgs> {}}:
+
+pkgs.mkShell {
+ packages = [ pkgs.virtualenv ];
+}
+```
+
+```nix
+with import <nixpkgs> {};
+(
+let my_toolz = python311.pkgs.buildPythonPackage rec { pname = "toolz"; version = "0.10.0"; pyproject = true; src = fetchPypi { inherit pname version; hash = "sha256-CP3V73yWSArRHBLUct4hrNMjWZlvaaUlkpm1QP66RWA="; }; nativeBuildInputs = [ python311.pkgs.setuptools python311.pkgs.wheel ]; # has no tests doCheck = false; meta = { homepage = "https://github.com/pytoolz/toolz/"; description = "List processing tools and functional utilities"; # [...] }; }; in python311.withPackages (ps: with ps; [ numpy my_toolz ]) ).env
+```
+
+---
+[Flakes Wiki](https://nixos.wiki/wiki/Flakes) \ No newline at end of file
diff --git a/3 resources/note taking system.md b/3 resources/note taking system.md
new file mode 100644
index 0000000..907e2ce
--- /dev/null
+++ b/3 resources/note taking system.md
@@ -0,0 +1,21 @@
+## Why take notes?
+By writing down notes we can relate information about a subject in a very personal way using our own experiences to relate them to.
+
+We can us our notes as inspiration to create. In a centralized note taking system it is possible to easily revisit notes and use them to inspire new ideas.
+
+Another effect of a centralized note system is that it is very easy to search through our notes and use them as reference material.
+
+## How
+Using the para method; a method of note taking by Tiago Forte (Building a second brain)
+
+Projects: Anything that requires the completion of multiple tasks to reach a certain outcome.
+Areas: Something that you are responsible for for a longer period of your live.
+Resources: Notes about resources that you use to do anything, such as tools and programming languages for example.
+Archive: Notes that you feel are nog longer relevant to you. They might end up being useful in unexpected ways
+so don't throw away!
+
+GTD: Getting Things Done
+
+## Quotes
+"If I can't write about something; I don't understand the topic." - Mischa van den Burg?
+"Clear thinking becomes clear writing; one can't exist without the other." - William Zinsser.
diff --git a/3 resources/programming/Elixir - modules.md b/3 resources/programming/Elixir - modules.md
deleted file mode 100644
index e69de29..0000000
--- a/3 resources/programming/Elixir - modules.md
+++ /dev/null
diff --git a/3 resources/programming/Nix.md b/3 resources/programming/Nix.md
deleted file mode 100644
index fca31a8..0000000
--- a/3 resources/programming/Nix.md
+++ /dev/null
@@ -1,16 +0,0 @@
- `nix repl` to interactively evaluate Nix expressions. `:p` if output is not full.
- `nix-instantiate --eval <file>.nix` to evaluate a Nix expression from a file. `--strict`.
-
-Nix is like JSON, but with functions.
-Recursive attribute sets can reference values declared earlier in the same set.
-```nix
-rec {
- one = 1;
- two = one + 1;
-}
-```
-
-A `let` binding is used to assign names to values just as attribute sets, they can then be used in expressions. Let bindings have a local scope.
-
-A `with` allows referencing attributes of attribute sets without referencing the set.
-
diff --git a/3 resources/RabbitMQ.md b/3 resources/rabbitmq.md
index e9c94c5..312bec2 100644
--- a/3 resources/RabbitMQ.md
+++ b/3 resources/rabbitmq.md
@@ -1,2 +1 @@
-**2024-08-21 18:09**
With `rabbitmqctl list_queues` we can add columns to show. So instead of the default layout which shows messages in the Q after the name and is horrible we can specify stuff like: `rabbitmqctl list_queues messages consumers name`. There are more options to be found in `man rabbitmqctl`.
diff --git a/3 resources/taskwarrior.md b/3 resources/taskwarrior.md
new file mode 100644
index 0000000..34fe640
--- /dev/null
+++ b/3 resources/taskwarrior.md
@@ -0,0 +1,4 @@
+`task add something +label`
+`task context none`
+`task add highprio thing +label priority:H`
+`task context define mycontext +label project:blaat`