After first setting up a new k3s instance your kubeconfig file will be located in /etc/rancher/k3s/k3s.yaml.
You cans use it from here by setting $KUBECONFIG to that file.
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Or you can copy it to ~/.kube/config
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
If you have installed k3s on a remote server and need the config on your local machine then you will need to modify the server address to reflect the remote server.
scp user@<server-ip>:/etc/rancher/k3s/k3s.yaml ~/.kube/config
Warning
only do this if you don’t already have a ~/.kube/config file, otherwise copy it to a new file and set your $KUBECONFIG env variable to use it.
Now you will need to open that file and change the server address, making sure to keep the port number.
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: ****
server: https://<server-ip>:6443
name: default
Today I gave n8n a try using podman, their docs gave me docker commands, but it ran fine on my machine using podman.
podman volume create n8n_data
podman run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
New-caps-for-porta-john
Vim has a handy feature to format text with gq. You can use it in visual
mode, give it a motion, or if you give it gqq it will format the current line.
I use this quite often while writing in markdown, I do not use softwraps in vim,
so gqq quickly formats my current line into a paragraph. Once I have done
this for a single line one time I typically switch to the motion for around
paragraph gqap to format the whole paragraph and not just the current line.
before formatting #
after formattting #
A slug is the part of the url that comes after the domain. Commonly matches the file name of a markdown file many blogging systems. These are typically human readable, unique identifiers for pages within the site.
Wikilinks are a core concept within obsidian to link to documents by Slug wrapped in double square brackets. These are commonly used within wiki site generators.
[[slug]]
Obsidian gives you a keybinding alt+enter to go to that file, but if it does not exist it will create the file for you in the root of the project. It’s a nice way to quickly make new documents.
blogging in 2024
It was not obvious to me, but if you have a wikilink such as Trying Obsidian, you can jump to the file in obsidian, just like you can with lsp go to definition, the keybinding is alt + enter.
I’ve long used copier to create all of my posts for my blog, and it works really well for my workflow. I think of a title, call a template, and give it a title. out of the box obsidian did not seem to work this way. It seems like it wants me to right click a file tree and make a new file using the tree, this is not my jam.
Here is what I came up with to replace my til template.
---
date: <% tp.file.creation_date() %>
templateKey: til
title: <%*
const originalFileName = await tp.system.prompt("Enter file name");
const toTitleCase = str => str.replace(
/\w\S*/g,
txt => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
);
const title = toTitleCase(originalFileName);
tR += title + '\n'; // Add the title to the template result
-%>
published: true
tags:
-
---
<%*
const fileName = originalFileName.toLowerCase().replace(/\s+/g, '-');
const newFilePath = `pages/til/${fileName}`;
await tp.file.move(newFilePath);
-%>
<% tp.file.cursor() %>
tRis a return value, and it gets placed directly into the place it is in the fileto.file.cursor()creates a tab-index point so I can tab into the content