Automated commit at Sat Mar 30 08:10:09 CET 2024

This commit is contained in:
Mischa van den Burg 2024-03-30 08:10:09 +01:00
parent fafe50b0c5
commit 7524d53fe9
34 changed files with 605 additions and 8 deletions

View File

38
content/CKS.md Normal file
View File

@ -0,0 +1,38 @@
## To watch
[[What Have Namespaces Done for You Lately?]]
# Notes
[[Containerized applications can do syscalls directly to the Linux Kernel]]
[[Linux Kernel also has namespaces for isolation]]
[[Container Isolation]]
[[Podman and docker commands are exactly the same]]
# Networking
[[Network Policies]]
[[Generating TLS certificate for testing on Kubernetes]]
[[CKS Tips from Sander]]
## Content
[[I'm better at Network Policies than I thought]]
Links:
202307250907
[[Kubernetes]]
[[certification goals]]

View File

@ -0,0 +1,28 @@
Mounting configmaps is super useful. I've used it to mount scripts for execution within containers.
```yaml
apiVersion: v1
kind: Pod
metadata:
name: configmap-pod
spec:
containers:
- name: test
image: busybox:1.28
command: ['sh', '-c', 'echo "The app is running!" && tail -f /dev/null']
volumeMounts:
- name: config-vol
mountPath: /etc/config
volumes:
- name: config-vol
configMap:
name: log-config
items:
- key: log_level
path: log_level
```
## Links:
202403300534

View File

@ -0,0 +1,14 @@
Containers can be isolated using Linux namespaces or cgroups.
Linux namespaces serve to limit what the containers can see. Isolation happens on the user, filesystem or process level.
[[cgroups]] are used to limit resource usage.
## Links:
**implemented by**:: [[Linux Kernel also has namespaces for isolation]]
:::**part of**:: [[CKS]]
202403241200

View File

@ -0,0 +1,16 @@
Every pod (and therefore container) can do direct syscalls to the kernel of the node.
If there are security bugs in the kernel, these can be exploited by the containers directly.
## Links:
[[CKS]]
**from**:: [[CKS Video Course]]
**contributes to**:: [[Container Isolation]]
**related research**:: [[What Have Namespaces Done for You Lately?]]
[[security]]
202403241148

View File

@ -0,0 +1,8 @@
emptyDir volumes are only deleted when the pod is removed from a node. If you have a pod where containers are constantly crashing, the data will still persist on the emptyDir volume.
## Links:
202403300538

View File

@ -0,0 +1,14 @@
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
This generates a cert.pem and key.pem
Then run
`k create secret tls secure-ingress --cert=cert.pem --key=key.pem`
## Links:
202403291923

View File

@ -0,0 +1,16 @@
Luhmann used Maps of Content! They are referred to as indexes in the book. The MoC's were entry points to strings of notes (thought).
The index of the Zettelkasten is very insightful in how he created structure and divided things up in subtopics.
## Links:
[Inhaltsübersicht ZK II - Niklas Luhmann-Archiv (niklas-luhmann-archiv.de)](https://niklas-luhmann-archiv.de/bestand/zettelkasten/inhaltsuebersicht#ZK_2_editor_I_9)
202401302046
**developed by**:: [[Niklas Luhmann]]
**applicable to**:: [[Zettelkasten]]
**from**:: [[How to Take Smart Notes]]
**leads to**:: [[The Zettelkasten facilitates a bottom-up approach where areas of interest emerge organically]]

View File

@ -0,0 +1,10 @@
In Chapter 1 of [[Why We Sleep]], [[Matthew Walker]] writes that lack of sleep increases concentrations of hunger hormones and suppresses hormones that regulates food satisfaction.
I've always struggled with feeling hungry all the time, even during the past couple of years where I made sleep a higher priority.
## Links:
**related to**:: [[hunger-and-suffering]], [[caloric restriction]], [[weight-loss]]
202403290856

View File

@ -0,0 +1,14 @@
[[Containers can share volumes in the same pod]]
[[Configmaps are always mounted as read only]]
[[Ephemeral storage is not deleted when containers crash]]
[[Testing note]]
## Links:
[[kubernetes-storage-pvc-pv]]
202403300532

13
content/Kubernetes.md Normal file
View File

@ -0,0 +1,13 @@
#moc #index
[[CKS]]
[[Kubernetes Storage]]
[[Network Policies]]
## Links:
202302121114

View File

@ -0,0 +1,18 @@
The Linux Kernel has a way to isolate processes, which can be used to isolate containers.
You can limit PID from seeing other processes. This is called the PID namespace.
The mount namespace restricts access to /mnt and root filesystem.
Networking can be isolated in the networking namespace. Can be configured to only access certain network devices and limit the visibility of traffic or endpoints.
User IDs can be different between namespaces. The root user (0) can be different between namespaces.
## Links:
**from**:: [[CKS Video Course]]
**related research**:: [[What Have Namespaces Done for You Lately?]]
**related to**:: [[Container Isolation]]
202403241155

7
content/MacOS.md Normal file
View File

@ -0,0 +1,7 @@
[[Running scripts with Launchd]]
## Links:
202403291505

View File

@ -0,0 +1,10 @@
Considered if I needed to try this, but this statement convinced me it is not necessary at this point. Might experiment with it later when I have a good baseline after I received my [[Oura ring]]
## Links:
**from**:: [[Dr. Matthew Walker The Science & Practice of Perfecting Your Sleep Huberman Lab Podcast 31]]
**Parent**:: [[Sleep]]
202403281827

View File

@ -0,0 +1,13 @@
For [[Bryan Johnson]], sleep is the number one priority in life. It's more important than anything else. When his sleep is on point, life feels amazing and possible. When he has bad sleep, everything feels challenging and miserable.
I completely agree with this and I am making modifications to my life to realize this. I'm removing any social obligations that happen after 7pm. 8pm is my new wind-down time and it is simply non-negotiable.
If people require my presence then they must schedule something during the day or before my bedtime. I won't participate in anything that happens after that. Of course life will require some exceptions to this sometimes, that is unavoidable.
But I will do my best to structure my life around this and make sleep my number one priority. I have experienced myself that everything feels better when I sleep well.
## Links:
https://youtu.be/Z7veiyN4LqU?t=96
202403291155

View File

@ -0,0 +1,11 @@
## Links:
**supports**:: [[Sleep]], [[Oura ring]]
[[Matthew Walker]]
**from**:: [[Dr. Matthew Walker The Science & Practice of Perfecting Your Sleep Huberman Lab Podcast 31]]
202403281828

View File

@ -0,0 +1,21 @@
[[2024-03-29]]
This week I started experimenting with becoming more intentional about falling asleep instead of waiting for it to happen. I've also been listening to podcasts and audiobooks to help me drift off to sleep and that never sat very well with me. Sometimes I get engrossed with the material and it prevents me from falling asleep.
I'm a side sleeper but I will start by lying on my back and doing progressive relaxation of the body. Starting with the forehead and eyes and face, relaxing each and every muscle. Then moving down towards the torso and arms.
I heard a queue somewhere "spread warm energy from your head to your fingers" and that is a very pleasant one to do.
When the torso and legs are completely relaxed I continue body scanning up and down the body. During this process the mind will wander off to worldly concerns but then I bring back to the body.
After a while of this I move over to my side and do anapanasati: mindfulness of breathing. Focusing on the breath at the nose tip while simultaneously holding the body in the mind as well. Then the mind usually becomes bright and I keep focussing on making the breath smaller and lighter and then I fall asleep.
It has worked well for a couple of nights now and I wonder how this is going to progress when I make it into a regular routine. It would be amazing to be able to fall asleep very quickly and regularly.
## Links:
**related topic**:: [[Sleep]], [[meditation]]
202403290553

View File

@ -0,0 +1,27 @@
By default all pods can communicate with each other.
If you apply a policy rule, ONLY that traffic is allowed.
![[Pasted image 20240324130258.png]]
In this image, they are two separate rules because they are two arrays.
The second to: applies to the same namespace because no namespaceSelector is given here.
# Multiple Network Policies
If you have multiple network policies targeting the same pods:
- The order does not matter
- Policies will be merged
[[Alleviating confusion about the to field in network policies]]
## Links:
[[Kubernetes]]
[[networking-computers]]
**part of**:: [[CKS]]
202403241249

View File

@ -0,0 +1,36 @@
At least as far as I've seen up until now:
These commands run two containers in the same PID namespace.
Can check if they are running in the same namespace by running the exec.
```bash
podman run --name app1 -d nginx:alpine sh -c 'sleep infinity'
podman run --name app2 --pid=container:app1 -d nginx:alpine sh -c 'sleep infinity'
```
```bash
controlplane $ podman exec app2 ps aux
PID USER TIME COMMAND
1 root 0:00 sleep infinity
2 root 0:00 sleep infinity
3 root 0:00 ps aux
controlplane $ podman exec app1 ps aux
PID USER TIME COMMAND
1 root 0:00 sleep infinity
2 root 0:00 sleep infinity
4 root 0:00 ps aux
```
The sleep command appears twice in each container with a different PID.
Also note that there are multiple processes running as root.
## Links:
[[Podman]]
[[docker]]
202403241224

15
content/Quartz.md Normal file
View File

@ -0,0 +1,15 @@
This will be my version of rwxrob's zet repo. Although I keep a division between tech topics for Hugo and personal topics, I still want to publish my personal notes in a low-threshold fashion. The personal wordpress blog does not serve that need. It's still a bit of a hassle. I want to integrate it in the Zettelkasten method and that doesn't work with the wordpress setup, so I'll just use the personal blog for long-form content, discoverability and travel blogging when I do that.
Actually that complements very nicely. The quartz can be pure zettelkasten, short form notes.
The personal blog is the output of those notes: the more refined processed form.
## Links:
**resulted in**:: [[Starting Quartz blog]], [[Thoughts on Quartz for website or blogging]]
**related to**:: [[pkm]], [[PKM Tools]], [[Zettelkasten]], [[writing]], [[blogging]]
202403290626

View File

@ -0,0 +1,10 @@
2024-03-29 Received my Oura ring today and I'm excited to start tracking my sleep properly.
Been setting up a new, better sleep rhythm these past few days and it will be a good baseline to start from.
## Links:
[[Oura ring]]
202403291938

View File

@ -0,0 +1,38 @@
created com.mischa.zksync.plist in /Users/mischa/Library/LaunchAgents
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mischa.zksync</string>
<key>ProgramArguments</key>
<array>
<string>/Users/mischa/Repos/github.com/mischavandenburg/dotfiles/scripts/autopush</string>
</array>
<key>StartInterval</key>
<integer>1800</integer>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
```
This runs every 30 minutes
# Problems
Had a lot of problems due to rsync permissions. Had to do something crazy to give rsync full disk access, which I would never have come up with myself. Found it here:
[Mojave rsync full disk access failure - Apple Community](https://discussions.apple.com/thread/250165035?answerId=250419395022&sortBy=best#250419395022)
## Links:
[Mojave rsync full disk access failure - Apple Community](https://discussions.apple.com/thread/250165035?answerId=250419395022&sortBy=best#250419395022)
[Backing up your iCloud Drive files using rsync · Jesse Squires](https://www.jessesquires.com/blog/2019/09/27/icloud-backup-using-rsync/)
202403291506

21
content/Sleep.md Normal file
View File

@ -0,0 +1,21 @@
[[Becoming more intentional about sleep]]
[[Willpower is directly related to the amount of sleep]]
[[Making sleep the number one priority in life]]
[[Magnesium supplementation for sleep is not supported by evidence]]
## Sleep Tracking
[[Matthew Walker uses an Oura ring]]
[[Received my Oura ring today]]
Links:
[[Walker-Why We Sleep]]
[[Bryan Johnson]]

View File

@ -0,0 +1,9 @@
I started tinkering with Quartz yesterday and I think it will be a great option for the publication of personal notes from my Zettelkasten. By moving them to a symlinked directory in The Garden they will be picked up by Quartz and published and I still remain full Obsidian and Neovim compatibility.
## Links:
202403290616

9
content/Testing note.md Normal file
View File

@ -0,0 +1,9 @@
#refine
Testing for Quartz
## Links:
202403300652

View File

@ -0,0 +1,45 @@
Last evening I started tinkering a bit with Quartz (jzhao.xyz)](https://quartz.jzhao.xyz/) after a tip from this community. It was fairly easy to set up by following the documentation.
I now have my public Zettelkasten available here:
https://zettelkasten.mischavandenburg.net
For a while I've been thinking of the direction of my blog and Zettelkasten and felt like I needed a nice way to share my more personal notes as well. Quartz is definitely the solution for this. It's meant for use with Obsidian so the linking works great and the visualization of the links on the website is phenomenal.
However, now that I know how Quartz works, I actually don't recommend it for starting your tech blog or building a personal website. It should really be used as a way to publish parts of your Obsidian vault or Zettelkasten but I don't recommend building an actual personal website or blog using this engine.
I say this for the following reason: navigation. Your personal website will be your second CV which means it will be read by recruiters and hiring managers. From my experience so far with Quartz, it seems it will be hard to create a meaningful navigation structure that will be useful to people who aren't aware of Zettelkasten / Obsidian / Digital Gardens. Hugo or Wordpress is much more suited to that because it offers a traditional menu in the top right corner and a feed of blog posts that can be scrolled through, and sorted by tags.
That being said, it's a perfect tool for maintaining a public Zettelkasten. I will be publishing everything there which I feel is safe to have publicly available. Initially I needed an outlet for publishing my notes on non-technical topics such as health, sleep and running, but I think I might also move my technical notes there as well as I go along.
I like it because it provides a nice way for people to follow what I'm currently obsessed with or working on by subscribing to the RSS feed that's generated by the website. That's the way I follow people.
# My setup
In my Zettelkasten directory I now have a symlink to the content directory of the Quartz repo, mischavandenburg/zettelkasten on GitHub.
Every time I write a note and deem it fit for publication, I just move it to that directory by pressing cmd M followed by zp (zp being the name of the symlink).
Then I have a cronjob that pushes this repo every 30 minutes through a script:
*/30 * * * * /Users/mischa/Repos/github.com/mischavandenburg/dotfiles/scripts/autopush
#!/bin/bash
cd /Users/mischa/Repos/github.com/jackyzha0/quartz || exit
git add .
git commit -m "Automated commit at $(date)"
git push
I'm using Cloudflare Pages to publish the public/ directory containing the generated HTML files. The Quartz documentation guides you through it and it's extremely easy to set up.
Every time the zettelkasten repo gets a new commit it will trigger a pipeline at Cloudflare which builds your new website and publishes it. Super smooth.
I highly recommend getting a domain with Cloudflare because you get to use these pages and also Cloudflare tunnels for free. In the upcoming homelab courses I will be suggesting you to get a domain there so this might be a good reason to do it as well if you're thinking of starting a blog or Quartz site. It will also work well with Hugo.
## Links:
**related to**:: [[Zettelkasten]]
202403290948

View File

@ -0,0 +1,32 @@
```yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: my-app-network-policy
namespace: default
spec:
podSelector: {} # select all pods in the same namespace
policyTypes:
- Ingress
- Egress
ingress:
- from:
- podSelector: {}
egress:
- to:
- podSelector: {}
```
If no other policies are applied, this is the only allowed traffic. Therefore, this policy will deny all other traffic.
We are targeting all pods within the same namespace with the first podSelector.
Then, under the from and to elements, we are only allowing pods in the same namespace because we use the podselctor for all pods
## Links:
**part of**:: [[Network Policies]]
[[CKS]]
202403251057

View File

@ -0,0 +1,8 @@
In this podcast Brian speaks about having a greater ability to resist cravings when his sleep is on point.
## Links:
**related to**:: [[Hunger is related to the amount of sleep]]
https://youtu.be/1YbcB6b4A2U?t=6984
202403290854

View File

@ -0,0 +1,29 @@
Writing is thinking. Translating concepts to your own words forces you to think about it, and if you find that you cannot put your thoughts into writing, it is a sign that you don't understand the subject matter clearly.
This is exactly why I keep a tech blog. I write notes about the stuff I learn and try to explain the topics in my own words. This may help others, but it also helps myself, because it is a great test for my own understanding.
![[On Writing Well, 30th Anniversary Edition#^ref-36760]]
![[How to Take Smart Notes#^ref-10430]]
>["It isn't enough to read, you also have to write, and if you're going to go to graduate school you should write every day. It's a good idea for anyone who wants to develop themselves intellectually. Even a half an hour a day, that's 180 hours a year. That's a lot of thinking, because writing is thinking."](https://www.bing.com/ck/a?!&&p=4498d06252fbdf03JmltdHM9MTcwNjc0NTYwMCZpZ3VpZD0wNGFhOTJhZi1iZTBmLTYxYjMtMGQwNy04MTU4YmYwMjYwMmMmaW5zaWQ9NTg4Ng&ptn=3&ver=2&hsh=3&fclid=04aa92af-be0f-61b3-0d07-8158bf02602c&psq=jordan+peterson+quote+about+writing&u=a1aHR0cHM6Ly9qb3JkYW5wZXRlcnNvbnF1b3Rlcy5jb20vdGFnL3dyaXRpbmcvcGFnZS8yLw&ntb=1)
[(20) Dr Jordan B Peterson on X: "If you can think, and speak, and write, you are absolutely deadly. Writing is thinking formalized. You gain the ability to think by first learning to write very, very carefully. Then, when you can write effectively, you can do anything you want, and no one will stop you. https://t.co/uVvrPdC5n5" / X (twitter.com)](https://twitter.com/jordanbpeterson/status/1413182150984208394)
> If you can't say it clearly, you don't understand it yourself." - John Searle
## Links:
202401310611
**developed by**:: [[Niklas Luhmann]]
**applicable to**:: [[Zettelkasten]]
**from**:: [[How to Take Smart Notes]]
**nurtures**:: [[Do everything with the purpose of writing about it]], [[writing]]
**contributes to**:: [[Tech Blog]]

23
content/Zettelkasten.md Normal file
View File

@ -0,0 +1,23 @@
#moc
>"The slip box can become a haven for our restless minds"
# What is a Zettelkasten?
Zettelkasten is a system of note taking and personal knowledge management. [Zettelkasten](https://en.wikipedia.org/wiki/Zettelkasten) means "slip box" in German. Traditionally it is a physical box of slips of paper or index cards containing smaller notes. Each of these cards have a unique identifier, and these identifiers are used to create links between the cards.
It was invented by [Niklas Luhmann](https://en.wikipedia.org/wiki/Niklas_Luhmann) who was one of the most prolific scholars in history. He wrote 70 books and nearly 400 academic articles, and he credited the Zettelkasten with making his productivity possible. It contained around 90,000 index cards.
I first came across this concept by reading the book [How to take Smart Notes](https://amzn.to/49Pcimg) by Sönke Ahrens.
## Links:
202301041437
[[rwxrob's approach to Zettelkasten]]
[[Writing is thinking and understanding]]
**developed by**:: [[Niklas Luhmann]]
**implemented by**:: [[Revising my PKM]]
**from**:: [[How to Take Smart Notes]]

21
content/index.md Normal file
View File

@ -0,0 +1,21 @@
---
title: Home
---
Welcome. I've been keeping a Zettelkasten for about 3 years now, and I've accumulated nearly 2500 notes. And I enjoy reading other people's Zettelkasten too, such as rwxrob's. It shows me what they're currently obsessed with or working on, and I like to follow their journeys in that way.
Publishing my writing to the world started with my [tech blog](https://mischavandenburg.com). I wrote about my journey into DevOps and what I was learning along the way, and found it to be an enjoyable practice. Later I approached it more like a Zettelkasten too, including personal notes and writing about my non-technical hobbies and obsessions. But eventually I felt it was better to keep it more accessible and readable for people interested in reading my technical content and for recruiters and hiring managers to have a good browsing experience.
Quartz seems like a fun way to publish my personal Zettelkasten to the world. I think the publication aspect will help me to keep a more strict Zettelkasten methodology. My notetaking system has always been based on Niklas Luhmann's method of Zettelkasten, but after recently re-reading [How to Take Smart Notes](https://amzn.to/49Pcimg) I realized I had drifted farther than I liked. Publishing my Zettels will also force me to start keeping an index or maintaining Maps of Content, because they will be the only way to provide some useful initial structure to the reader. I don't really need them for my own notetaking and retrieval experience, but Luhmann kept elaborate indexes of his Zettelkasten, mainly because he didn't have the luxury of digital search like I have. (See [[How Luhmann Organized his Zettelkasten]])
However, if you are interesed in following me I suggest you [add this blog to your preferred RSS reader ](https://zettelkasten.mischavandenburg.net/index.xml) instead so you get regular updates. That's how I follow the people I'm most interested in.
If you wish to get in touch with me, take a look at https://mischavandenburg.com
# Topics
[[Sleep]]
[[Kubernetes]]
[[Zettelkasten]]

View File

@ -0,0 +1,24 @@
## limits
- Title less than 50 unicode characters
- Body of about 25-30 lines
- references including URLS section after body
- hashtags on last line after 4 space indent
- stick with single level lists
- avoid subheadings which are more for articles
When you start adding subheadings, you know you are heading on an interesting path
## why Github?
- built in search
## convention
- link to searches, not to content
## Links:
https://www.youtube.com/watch?v=T2D3uO3oEM8&list=PLrK9UeDMcQLpkdoPTNG7nSBA6Bb4AoJX1&index=2
202403291255

View File

@ -8,16 +8,16 @@ import * as Plugin from "./quartz/plugins"
*/
const config: QuartzConfig = {
configuration: {
pageTitle: "🪴 Quartz 4.0",
pageTitle: "Mischa's Zettelkasten",
enableSPA: true,
enablePopovers: true,
analytics: {
provider: "plausible",
},
locale: "en-US",
baseUrl: "quartz.jzhao.xyz",
baseUrl: "zettelkasten.mischavandenburg.net",
ignorePatterns: ["private", "templates", ".obsidian"],
defaultDateType: "created",
defaultDateType: "modified",
theme: {
fontOrigin: "googleFonts",
cdnCaching: true,
@ -54,7 +54,7 @@ const config: QuartzConfig = {
transformers: [
Plugin.FrontMatter(),
Plugin.CreatedModifiedDate({
priority: ["frontmatter", "filesystem"],
priority: ["git", "frontmatter", "filesystem"],
}),
Plugin.Latex({ renderEngine: "katex" }),
Plugin.SyntaxHighlighting({

View File

@ -7,8 +7,7 @@ export const sharedPageComponents: SharedLayout = {
header: [],
footer: Component.Footer({
links: {
GitHub: "https://github.com/jackyzha0/quartz",
"Discord Community": "https://discord.gg/cRFFHYye7t",
"Visit My Main Website": "https://mischavandenburg.com"
},
}),
}
@ -26,7 +25,7 @@ export const defaultContentPageLayout: PageLayout = {
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
Component.DesktopOnly(Component.RecentNotes({ limit: 10 })),
],
right: [
Component.Graph(),
@ -43,7 +42,7 @@ export const defaultListPageLayout: PageLayout = {
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer()),
Component.DesktopOnly(Component.RecentNotes({ limit: 10 })),
],
right: [],
}