This commit is contained in:
Phil Bajsicki 2024-11-18 20:09:31 +01:00
parent ef4c2a0ff1
commit 386f08b62f
33 changed files with 93 additions and 33 deletions

View file

@ -1,7 +1,7 @@
+++ +++
title = "Home" title = "Home"
layout = "index" layout = "index"
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
draft = false draft = false
[menu] [menu]
[menu.nav] [menu.nav]

View file

@ -1,7 +1,7 @@
+++ +++
title = "I really, really like Emacs" title = "I really, really like Emacs"
publishDate = 2022-10-01T00:00:00+02:00 publishDate = 2022-10-01T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["orgmode"] tags = ["orgmode"]
categories = ["emacs", "tech"] categories = ["emacs", "tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Note about LLM's and training data" title = "Note about LLM's and training data"
publishDate = 2023-03-09T00:00:00+01:00 publishDate = 2023-03-09T00:00:00+01:00
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["copyright", "thieves"] tags = ["copyright", "thieves"]
categories = ["llm", "tech"] categories = ["llm", "tech"]
draft = false draft = false

View file

@ -1,6 +1,6 @@
+++ +++
title = "Blog" title = "Blog"
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
draft = false draft = false
meta = true meta = true
type = "list" type = "list"
@ -627,6 +627,66 @@ Still, all things considered, I am quite happy, and working on this website has
### Some improvements for my ox-hugo set-up <span class="tag"><span class="hugo">hugo</span><span class="web">web</span><span class="orgmode">orgmode</span><span class="_emacs">@emacs</span></span> {#some-improvements-for-my-ox-hugo-set-up} ### Some improvements for my ox-hugo set-up <span class="tag"><span class="hugo">hugo</span><span class="web">web</span><span class="orgmode">orgmode</span><span class="_emacs">@emacs</span></span> {#some-improvements-for-my-ox-hugo-set-up}
Probably not the most inventive thing I've done, but I slightly improved my set-up quite a bit.
It's all in this little snippet of elisp:
```emacs-lisp
(delete-directory "~/git/phil/bajsicki.com/content" :recursive)
(org-hugo-export-wim-to-md :all-subtrees)
(cd "~/git/phil/bajsicki.com")
(pwd)
(magit-call-git "commit" "-a" "-m" "Update")
(magit-call-git "push")
```
One thing that bothered me somewhat about the way ox-hugo handles straggler files is that if I ever removed, renamed or otherwise messed with the structure that already existed, it wouldn't handle the redundant files for me.
E.g. if I deleted a post in my org-mode file (from which this website is generated), ox-hugo would happily leave it hanging in my \`content/\` directory, damning me to eternal suffering.
However, using this simple elisp, I can easily delete the content directory, and rebuild it from scratch to ensure that my website is _always_ up to date.
I have yet to put it into a function, or do anything. `C-c C-c` works just fine for me, as it's sitting at the top of the file in a \`:noexport:\` block.
Another issue I solved was that the git `post-receive` hook wouldn't run properly. It took me a short bit but eventually I found that I need to run it in a subshell, and unset the \`GIT_\` env variables to ensure that git doesn't get confused about where to pull the updates from.
```sh
#!/bin/bash
# Directory on the server where the website will be mapped.
export GIT_WORK_TREE=/srv/bajsicki.com/
cd $GIT_WORK_TREE
echo "post-receive: Generating https://bajsicki.com with Hugo in $(pwd)"
# Remove any files already in the public directory, a fresh copy will be generated by hugo
echo "post-receive: Cleaning the /public and /content directory to ensure we're in line."
rm -rf public/ && echo "removing /public in $(pwd)"
rm -rf content/ && echo "removing /content in $(pwd)"
# Update the modules in case of changes and pull the new pages
echo "post-receive: pulling git repo and submodules in $(pwd) w/ subshell"
(
unset $(env | sed -ne 's/^\(GIT_.*\)=.*/\1/p')
cd /srv/bajsicki.com
git pull origin main --recurse-submodules --force
)
# Generate the site with hugo
echo "post-receive: running hugo in $(pwd)"
hugo
# Fix any permission problems.
echo "post-receive: fixing permissions in $(pwd)"
find public -type f -print | xargs -d '\n' chmod 644
find public -type d -print | xargs -d '\n' chmod 755
echo "post-receive: Hugo site deployment in $(pwd) complete"
```
This is my current `post-receive` hook, and it works quite well, I think.
Anyway. Things are working, jankily yet so.
Next: I am praying that I find some time/ brainpower to fix up the CSS on this website. The misaligned sidenotes are quite irritating.
## Mind <span class="tag"><span class="_mind">@mind</span></span> {#mind} ## Mind <span class="tag"><span class="_mind">@mind</span></span> {#mind}

View file

@ -1,7 +1,7 @@
+++ +++
title = "A kind view of business" title = "A kind view of business"
publishDate = 2024-01-25T00:00:00+01:00 publishDate = 2024-01-25T00:00:00+01:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["mindset", "rant"] tags = ["mindset", "rant"]
categories = ["business"] categories = ["business"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "A new look: ox-tufte" title = "A new look: ox-tufte"
publishDate = 2023-10-23T00:00:00+02:00 publishDate = 2023-10-23T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["orgmode", "web", "css", "tufte"] tags = ["orgmode", "web", "css", "tufte"]
categories = ["emacs", "tech"] categories = ["emacs", "tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "On Avoidance in Business" title = "On Avoidance in Business"
publishDate = 2023-05-04T00:00:00+02:00 publishDate = 2023-05-04T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["psychology", "riskmanagement", "avoidance", "fear"] tags = ["psychology", "riskmanagement", "avoidance", "fear"]
categories = ["business"] categories = ["business"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Trying out some brain supplements, pt. 2" title = "Trying out some brain supplements, pt. 2"
publishDate = 2022-11-20T00:00:00+01:00 publishDate = 2022-11-20T00:00:00+01:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["supplements", "nootropics"] tags = ["supplements", "nootropics"]
categories = ["mind"] categories = ["mind"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Brain supplements: A two month summary" title = "Brain supplements: A two month summary"
publishDate = 2023-01-06T00:00:00+01:00 publishDate = 2023-01-06T00:00:00+01:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["supplements", "nootropics"] tags = ["supplements", "nootropics"]
categories = ["mind"] categories = ["mind"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Trying out some brain supplements" title = "Trying out some brain supplements"
publishDate = 2022-11-18T00:00:00+01:00 publishDate = 2022-11-18T00:00:00+01:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["supplements", "nootropics"] tags = ["supplements", "nootropics"]
categories = ["mind"] categories = ["mind"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "On the value of calling it a day (and how to get there)" title = "On the value of calling it a day (and how to get there)"
publishDate = 2022-09-30T00:00:00+02:00 publishDate = 2022-09-30T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["psychology", "work", "projectmanagement"] tags = ["psychology", "work", "projectmanagement"]
categories = ["business"] categories = ["business"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Efficient computer use" title = "Efficient computer use"
publishDate = 2022-11-12T00:00:00+01:00 publishDate = 2022-11-12T00:00:00+01:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["ergonomics", "keyboards", "typing", "speed", "efficency"] tags = ["ergonomics", "keyboards", "typing", "speed", "efficency"]
categories = ["tech"] categories = ["tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Considerations on FOSS and subscription models" title = "Considerations on FOSS and subscription models"
publishDate = 2022-10-02T00:00:00+02:00 publishDate = 2022-10-02T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["business", "foss", "vendorlock", "proprietary", "saas", "scam"] tags = ["business", "foss", "vendorlock", "proprietary", "saas", "scam"]
categories = ["tech"] categories = ["tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Heaps of fun (Yakuza)" title = "Heaps of fun (Yakuza)"
publishDate = 2022-10-17T00:00:00+02:00 publishDate = 2022-10-17T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["yakuza", "review"] tags = ["yakuza", "review"]
categories = ["videogames"] categories = ["videogames"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Haxe, heaps, and VSCode (small rant)" title = "Haxe, heaps, and VSCode (small rant)"
publishDate = 2022-10-10T00:00:00+02:00 publishDate = 2022-10-10T00:00:00+02:00
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["proprietary", "vscode", "vendorlock"] tags = ["proprietary", "vscode", "vendorlock"]
categories = ["software", "tech"] categories = ["software", "tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "[Happy Holidays!] On posting lists for self-promotion" title = "[Happy Holidays!] On posting lists for self-promotion"
publishDate = 2022-12-25T00:00:00+01:00 publishDate = 2022-12-25T00:00:00+01:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["badmarketing", "linkedin"] tags = ["badmarketing", "linkedin"]
categories = ["business"] categories = ["business"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Weekend thoughts - Mastering Emacs by Mickey Petersen" title = "Weekend thoughts - Mastering Emacs by Mickey Petersen"
publishDate = 2022-10-08T00:00:00+02:00 publishDate = 2022-10-08T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["emacs", "review"] tags = ["emacs", "review"]
categories = ["books"] categories = ["books"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "MissKey: Resetting Admin Password" title = "MissKey: Resetting Admin Password"
publishDate = 2023-08-11T00:00:00+02:00 publishDate = 2023-08-11T00:00:00+02:00
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["misskey", "admin", "postgres"] tags = ["misskey", "admin", "postgres"]
categories = ["tech"] categories = ["tech"]
draft = false draft = false

View file

@ -1,6 +1,6 @@
+++ +++
title = "Moving to Hugo" title = "Moving to Hugo"
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["hugo", "web", "orgmode", "css", "tufte"] tags = ["hugo", "web", "orgmode", "css", "tufte"]
categories = ["tech", "emacs"] categories = ["tech", "emacs"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "My favorite Factorio mods" title = "My favorite Factorio mods"
publishDate = 2023-07-24T00:00:00+02:00 publishDate = 2023-07-24T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["factorio", "mods"] tags = ["factorio", "mods"]
categories = ["videogames"] categories = ["videogames"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Learning a new keyboard layout" title = "Learning a new keyboard layout"
publishDate = 2022-08-18T00:00:00+02:00 publishDate = 2022-08-18T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["ergonomics", "keyboard", "colemak", "typing"] tags = ["ergonomics", "keyboard", "colemak", "typing"]
categories = ["body"] categories = ["body"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "On Problems" title = "On Problems"
publishDate = 2022-11-21T00:00:00+01:00 publishDate = 2022-11-21T00:00:00+01:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["psychology", "problems"] tags = ["psychology", "problems"]
categories = ["mind"] categories = ["mind"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Overcoming typing-related RSI" title = "Overcoming typing-related RSI"
publishDate = 2022-09-22T00:00:00+02:00 publishDate = 2022-09-22T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["ergonomics", "keyboard", "typing", "rsi", "health"] tags = ["ergonomics", "keyboard", "typing", "rsi", "health"]
categories = ["body"] categories = ["body"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Realistic deadlines" title = "Realistic deadlines"
publishDate = 2022-09-30T00:00:00+02:00 publishDate = 2022-09-30T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["projectmanagement", "work"] tags = ["projectmanagement", "work"]
categories = ["business"] categories = ["business"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Some thoughts on SaaS and business applications of Free Software" title = "Some thoughts on SaaS and business applications of Free Software"
publishDate = 2022-09-28T00:00:00+02:00 publishDate = 2022-09-28T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["saas", "scam", "vendorlock", "interoperability"] tags = ["saas", "scam", "vendorlock", "interoperability"]
categories = ["business"] categories = ["business"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Shared hosting is a scam" title = "Shared hosting is a scam"
publishDate = 2023-03-29T00:00:00+02:00 publishDate = 2023-03-29T00:00:00+02:00
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["sharedhosting", "saas", "scam"] tags = ["sharedhosting", "saas", "scam"]
categories = ["tech"] categories = ["tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Shiny objects, and learning" title = "Shiny objects, and learning"
publishDate = 2024-04-24T00:00:00+02:00 publishDate = 2024-04-24T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:30+01:00
tags = ["mindset", "attitude", "rant"] tags = ["mindset", "attitude", "rant"]
categories = ["business"] categories = ["business"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "VPS is my new friend" title = "VPS is my new friend"
publishDate = 2022-10-07T00:00:00+02:00 publishDate = 2022-10-07T00:00:00+02:00
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["vps", "sysadmin", "servers", "ssh", "sshfs", "foss", "vendorlock"] tags = ["vps", "sysadmin", "servers", "ssh", "sshfs", "foss", "vendorlock"]
categories = ["tech"] categories = ["tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "VPS set-up" title = "VPS set-up"
publishDate = 2022-08-18T00:00:00+02:00 publishDate = 2022-08-18T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["vps", "sysadmin", "servers"] tags = ["vps", "sysadmin", "servers"]
categories = ["tech"] categories = ["tech"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Wisdom from a Satyr" title = "Wisdom from a Satyr"
publishDate = 2023-03-30T00:00:00+02:00 publishDate = 2023-03-30T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["ethics", "suffering", "buddhism"] tags = ["ethics", "suffering", "buddhism"]
categories = ["wisdom", "mind"] categories = ["wisdom", "mind"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Some words in a moment of peace" title = "Some words in a moment of peace"
publishDate = 2023-04-04T00:00:00+02:00 publishDate = 2023-04-04T00:00:00+02:00
lastmod = 2024-11-18T20:00:51+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["language", "words", "meaning", "clarity", "communication"] tags = ["language", "words", "meaning", "clarity", "communication"]
categories = ["mind"] categories = ["mind"]
draft = false draft = false

View file

@ -1,6 +1,6 @@
+++ +++
title = "On Mark Zuckerberg's recent claims" title = "On Mark Zuckerberg's recent claims"
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
tags = ["copyright", "zuckerberg"] tags = ["copyright", "zuckerberg"]
categories = ["tech", "llm"] categories = ["tech", "llm"]
draft = false draft = false

View file

@ -1,7 +1,7 @@
+++ +++
title = "Contact" title = "Contact"
publishDate = 2023-06-20T00:35:00+02:00 publishDate = 2023-06-20T00:35:00+02:00
lastmod = 2024-11-18T20:00:50+01:00 lastmod = 2024-11-18T20:09:29+01:00
draft = false draft = false
hidefromhome = true hidefromhome = true
meta = false meta = false