On kernel updates I saw a recurring "EFI variables are not supported on this system", so I investigated and learned that the new EFI variables are provided via a file system that needs to be mounted first:
+
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
+
+ Code Artist
+
+
+
+
+
+
+
+ TIL -- Today I learned
+
+
Disallowed Focussed Tests and how it saved my day
+
Today I was about to push a focussed test. A focussed test, you ask?
+
In Jest (and others) one can run only a specific test, by writing it.only(.... Pushing this to production might create some funny or not so funny side effects though. Luckily there is the no-focussed-tests linter rule in eslint-plugin-jest.
diff --git a/now/index.md b/now/index.md
new file mode 100644
index 0000000..76b0934
--- /dev/null
+++ b/now/index.md
@@ -0,0 +1,24 @@
+*This page shows what I'm up to at the moment, following the idea of the [/now page](https://sive.rs/nowff) introduced by [Derek Sivers](https://sive.rs/). You can find more now pages on [nownownow](https://nownownow.com/).*
+
+Last updated: 2024-05-12
+
+## Priorities
+
+> I do a lot of things all the time and have a hard time to focus. Most of my energy right now hopefully flows into the following things:
+
+* This homepage.
+* Keeping up the pace professionally by taking up more management responsibilities.
+* Fleshing out a long form D&D campaign ("Out Of The Cold Shadow").
+* Writing down more short adventures and one-shots and publish them on [tiskifer.dk](https://tiskifer.dk).
+* My wedding and honeymoon in June!
+
+## Book(s)
+
+> I'm not really good with taking time for reading, but when I do, I read:
+
+[Accelerando](https://openlibrary.org/works/OL2465670W/Accelerando)
+by [Charles Stross](https://openlibrary.org/authors/OL343157A/Charles_Stross)
+
+[The Manager's Path](https://openlibrary.org/works/OL19860807W/The_Manager%27s_Path)
+by [Camille Fournier](https://openlibrary.org/authors/OL7564045A/Camille_Fournier)
+
diff --git a/static/extended.css b/static/extended.css
new file mode 100644
index 0000000..8ce0472
--- /dev/null
+++ b/static/extended.css
@@ -0,0 +1,29 @@
+#main-menu {
+ position: fixed;
+ top: var(--header-height);
+ width: 100vw;
+ height: 1.2rem;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 4rem;
+ list-style: circle;
+ background: var(--menu-bg-color);
+ transition: top .3s ease-in-out;
+}
+#main-menu > li {
+ padding: 0;
+}
+body>header.small + #main-menu {
+ top: calc(var(--header-height) * var(--header-multiplier));
+}
+pre {
+ background: var(--emboss-color);
+ padding: .5rem;
+}
+li.active>a {
+ color: var(--highlight-fg-color);
+ font-weight: bold;
+}
diff --git a/static/style.css b/static/style.css
index 422eea4..1ad41bf 100644
--- a/static/style.css
+++ b/static/style.css
@@ -5,6 +5,7 @@
--header-multiplier: .25;
--page-bg-color: #232425;
--page-fg-color: #7e9fbe;
+ --menu-bg-color: #000;
--highlight-fg-color: #eacb8b;
--emboss-color: #000;
}
@@ -21,6 +22,7 @@
:root {
--page-bg-color: #efe9d9;
--page-fg-color: #261b00;
+ --menu-bg-color: #fff;
--header-fg-color: #143373;
--header-bg-color: #a49570;
--emboss-color: #fff;
@@ -208,4 +210,4 @@ blockquote {
100% {
opacity: 1.0;
}
-}
\ No newline at end of file
+}
diff --git a/static/til.css b/static/til.css
new file mode 100644
index 0000000..fd532b5
--- /dev/null
+++ b/static/til.css
@@ -0,0 +1,15 @@
+main#til > header {
+ margin: 0 0 2rem 0;
+ font-size: 1.5em;
+}
+
+article.til {
+ margin: 1rem 0;
+}
+article.til>div {
+ line-height: 2;
+}
+article.til>time,
+article.til>div>a.external {
+ color: gray;
+}
diff --git a/til/2021-08-31.md b/til/2021-08-31.md
new file mode 100644
index 0000000..2c775fd
--- /dev/null
+++ b/til/2021-08-31.md
@@ -0,0 +1,5 @@
+# There is a HTML tag for "Word Break Opportunity"
+
+[source](https://www.w3schools.com/TAGS/tag_wbr.asp)
+
+For example: `Kaufhaus`.
diff --git a/til/2021-09-03.md b/til/2021-09-03.md
new file mode 100644
index 0000000..9008aef
--- /dev/null
+++ b/til/2021-09-03.md
@@ -0,0 +1,3 @@
+# Bush refused offer to discuss Osama Bin Laden handover
+
+[source](https://www.theguardian.com/world/2001/oct/14/afghanistan.terrorism5)
diff --git a/til/2021-09-04.md b/til/2021-09-04.md
new file mode 100644
index 0000000..f775578
--- /dev/null
+++ b/til/2021-09-04.md
@@ -0,0 +1,3 @@
+`git fetch $repo_url $remote_branch:$new_local_branch`
+
+[source](https://twitter.com/lucas59356/status/1433507127570669569)
diff --git a/til/2021-09-05.md b/til/2021-09-05.md
new file mode 100644
index 0000000..d0413dd
--- /dev/null
+++ b/til/2021-09-05.md
@@ -0,0 +1,3 @@
+# E-Mail that isn't spam is called ham!
+
+[source](https://twitter.com/claranellist/status/1433539284779220997)
diff --git a/til/2022-02-22.md b/til/2022-02-22.md
new file mode 100644
index 0000000..a730cdc
--- /dev/null
+++ b/til/2022-02-22.md
@@ -0,0 +1,41 @@
+# Adding aliases in vite with typescript needs the same alias in tsconfig
+
+For example:
+
+The following vite.config.ts:
+
+```ts
+import { fileURLToPath, URL } from "url"
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ plugins: [vue()],
+ resolve: {
+ alias: {
+ "~": fileURLToPath(new URL("./src", import.meta.url)),
+ "~component": fileURLToPath(new URL("./src/components", import.meta.url)),
+ "~composable": fileURLToPath(new URL("./src/composables", import.meta.url)),
+ "~lib": fileURLToPath(new URL("./src/lib", import.meta.url)),
+ }
+ }
+})
+```
+
+will need this in tsconfig.json:
+
+```json
+{
+ "compilerOptions": {
+ "paths": {
+ "~/*": [ "./src/*" ],
+ "~component/*": [ "./src/components/*" ],
+ "~composable/*": [ "./src/composables/*" ],
+ "~lib/*": [ "./src/lib/*" ]
+ }
+ }
+}
+```
+
+The asterixes in the syntax are important (`alias/*` => `./path/*`).
diff --git a/til/2022-03-22.md b/til/2022-03-22.md
new file mode 100644
index 0000000..5131e51
--- /dev/null
+++ b/til/2022-03-22.md
@@ -0,0 +1,9 @@
+# There is a file system for EFI vars now
+
+[source](https://www.kernel.org/doc/html/latest/filesystems/efivarfs.html)
+
+On kernel updates I saw a recurring "EFI variables are not supported on this system", so I investigated and learned that the new EFI variables are provided via a file system that needs to be mounted first:
+
+```sh
+mount -t efivarfs efivarfs /sys/firmware/efi/efivars
+```
diff --git a/til/2022-03-28.md b/til/2022-03-28.md
new file mode 100644
index 0000000..aac9716
--- /dev/null
+++ b/til/2022-03-28.md
@@ -0,0 +1,10 @@
+# pwdx command shows the working path of a process
+
+[source](https://twitter.com/mani_maranp/status/1508476973529825281)
+
+For example:
+
+```sh
+% pwdx 1984
+> 1984: /home/george/ttlctrl
+```
diff --git a/til/2022-04-25.md b/til/2022-04-25.md
new file mode 100644
index 0000000..cc6aae5
--- /dev/null
+++ b/til/2022-04-25.md
@@ -0,0 +1,30 @@
+# Jest mocks are ...different
+
+If you want to mock an imported function in Jest in a way that allows you to check if it has been called, you can not do the seemingly straighforward:
+
+```js
+// mock prefix necessary btw
+const mockThatFunction = jest.fn(() => 'stuff')
+
+jest.mock('@/path/to/module', () => ({
+ thatFunction: mockThatFunction,
+}))
+
+// ...in test descriptions
+expect(mockThatFunction).toHaveBeenCalled()
+```
+
+This way thatFunction will be undefined without anyone telling you why.
+
+What you need to do instead:
+
+```js
+import { thatFunction } from '@/path/to/module'
+
+jest.mock('@/path/to/module', () => ({
+ thatFunction: jest.fn(() => 'stuff'),
+}))
+
+// ...in test descriptions
+expect(thatFunction).toHaveBeenCalled()
+```
diff --git a/til/2022-06-15.md b/til/2022-06-15.md
new file mode 100644
index 0000000..339997a
--- /dev/null
+++ b/til/2022-06-15.md
@@ -0,0 +1,5 @@
+# Disallowed Focussed Tests and how it saved my day
+
+Today I was about to push a focussed test. A focussed test, you ask?
+
+In Jest (and others) one can run only a specific test, by writing `it.only(...`. Pushing this to production might create some funny or not so funny side effects though. Luckily there is the `no-focussed-tests` linter rule in [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest).
diff --git a/til/2024-05-12.md b/til/2024-05-12.md
new file mode 100644
index 0000000..37de2c8
--- /dev/null
+++ b/til/2024-05-12.md
@@ -0,0 +1,13 @@
+# Sort list of strings in Javascript
+
+[source](https://stackoverflow.com/questions/6712034/sort-array-by-firstname-alphabetically-in-javascript)
+
+```ts
+users.sort((a, b) => a.firstname.localeCompare(b.firstname))
+```
+
+or reversed order:
+
+```ts
+users.sort((a, b) => a.firstname.localeCompare(b.firstname) * -1)
+```
diff --git a/til/index.md b/til/index.md
new file mode 100644
index 0000000..115cb0a
--- /dev/null
+++ b/til/index.md
@@ -0,0 +1,79 @@
+
+
+