shortnotes

This commit is contained in:
Lukas 2024-03-24 15:45:15 -04:00
parent 4cafc6373b
commit cb83efaa58
23 changed files with 319 additions and 0 deletions

View File

@ -75,6 +75,7 @@ menu_links = [
{ url = "$BASE_URL", name = "Home" },
{ url = "$BASE_URL/about/", name = "About" },
{ url = "$BASE_URL/posts/", name = "Posts" },
{ url = "$BASE_URL/shortnotes/", name = "Shortnotes" },
{ url = "$BASE_URL/tags/", name = "Tags" },
# { url = "https://github.com/jimmyff/zola-inky", name = "Github" },
{ url = "$BASE_URL/contact/", name = "Contact" },

View File

@ -0,0 +1,17 @@
+++
title = "20240131"
# description = ""
date = 2024-01-31
# updated = 2024-01-31
draft = true
[taxonomies]
tags = ["shortnotes"]
+++
Signal boosting this in case someone *hasn't* seen it:
there's a new flat in glibc (one of, if not *the*, most common library on Linux) that allows local privilege escalation.
The latest versions of Fedora, Debian, and Ubuntu are all affected so update if you can.
Relevant links:
- [https://www.bleepingcomputer.com/news/security/new-linux-glibc-flaw-lets-attackers-get-root-on-major-distros/](https://www.bleepingcomputer.com/news/security/new-linux-glibc-flaw-lets-attackers-get-root-on-major-distros/)
- [https://www.qualys.com/2024/01/30/cve-2023-6246/syslog.txt](https://www.qualys.com/2024/01/30/cve-2023-6246/syslog.txt)

16
content/shortnotes/02.md Normal file
View File

@ -0,0 +1,16 @@
+++
title = "python `or [default]`"
date = 2023-10-02
[taxonomies]
tags= ["shortnotes"]
+++
Did you know that you can use the “or” keyword in python to set a “default” for a variable?
```py
variable_name = value_or_none() or "default value!"
```
Over five years since I started using Python, and Im only learning this now. I wish I knew about it sooner.

10
content/shortnotes/19.md Normal file
View File

@ -0,0 +1,10 @@
+++
title = "Using Vi[m]"
date = 2023-09-19
[taxonomies]
tags= ["shortnotes"]
+++
I'm finally giving Vi[m] a try. It's hard to get used to it after using `nano` for so long. Surprisingly, it's not the `:wq` or insert mode stuff that is catching me, but the fact taht I can't go to the previous/next ling by pressing left/right at the line ends.
(Yes, I realize I can modify this in the .vimrc file but I'm attempting to keep it as close to default as possible since I work on so many different systems.)

View File

@ -0,0 +1,13 @@
+++
title = "20240129"
# description = ""
date = 2024-01-29
# updated = 2024-01-29
[taxonomies]
tags = ["shortnotes"]
+++
Do you ever work on something at work and wish you had a use for it in your homelab?
I'm feeling like that right now with Ceph.
Data storage is such a fun topic, but I can't justify buying all of the network and storage hardware needed to make a decent cluster instead of just buying more storage for my Synology NAS.

View File

@ -0,0 +1,17 @@
+++
title = "20240131"
# description = ""
date = 2024-01-31
# updated = 2024-01-31
draft = true
[taxonomies]
tags = ["shortnotes"]
+++
Signal boosting this in case someone *hasn't* seen it:
there's a new flat in glibc (one of, if not *the*, most common library on Linux) that allows local privilege escalation.
The latest versions of Fedora, Debian, and Ubuntu are all affected so update if you can.
Relevant links:
- [https://www.bleepingcomputer.com/news/security/new-linux-glibc-flaw-lets-attackers-get-root-on-major-distros/](https://www.bleepingcomputer.com/news/security/new-linux-glibc-flaw-lets-attackers-get-root-on-major-distros/)
- [https://www.qualys.com/2024/01/30/cve-2023-6246/syslog.txt](https://www.qualys.com/2024/01/30/cve-2023-6246/syslog.txt)

View File

@ -0,0 +1,9 @@
+++
title = "Shortnotes"
sort_by = "date"
template = "shortnotes.html"
page_template = "post.html"
transparent = true
+++
Shortnotes! Posts that are short enough to not need to be their own post.

View File

@ -0,0 +1,12 @@
+++
title = "Backups and YAML"
date = 2023-10-29
[taxonomies]
tags= ["shortnotes"]
+++
Finally doing something that I should have done a long time ago adding a second (and in some places, first) backup to my systems. BorgBase won over rsync.net for price, and over Backblaze B2 for ease of use with Borg. Bonus points for also making my GUI of choice Vorta.
Additionally, Im automating as much as possible with Ansible. I still loathe YAML for configuring anything, but Ansible nearly makes that worth it. ;p

View File

@ -0,0 +1,11 @@
+++
title = "Bash history search"
date = 2023-10-05
[taxonomies]
tags= ["shortnotes"]
+++
Another useful tip for Linux users and admins: you can search your command history in bash with `Ctrl+r`. Typing something and hitting it again will search backward through commands that match that pattern. It saves a lot of time compared to pressing up repeatedly.

View File

@ -0,0 +1,8 @@
+++
title = "Encryption Flashcards"
date = 2023-07-19
[taxonomies]
tags= ["shortnotes"]
+++
I think I added an extra 80 or so cards today just for encryption algorithms key lengths, block sizes, etc… I dont expect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve them.

View File

@ -0,0 +1,18 @@
+++
title = "Google finally feels worse"
date = 2023-11-06
[taxonomies]
tags= ["shortnotes"]
+++
I didnt really agree with statements about Googles search getting worse until today.
Using search would usually give me what I wanted within the first few results. All Id need to do was skip past the inevitable Amazon link that would show up.
But for the past few days, I feel like Ive had more and more “junk” in it.
- Links that look like they are for a specific post on a forum, but take me to the main page instead.
- Links for blogs that look like they were written by an AI.
- Links that go to entirely different websites than those they appear to be for.
Its admittedly tiring and makes me want to restart my habit of bookmarking more sites.

View File

@ -0,0 +1,8 @@
+++
title = "Happy New Year"
date = 2024-01-02
[taxonomies]
tags= ["shortnotes"]
+++
Happy New Year to those who celebrate using a solar calendar! Only another 24 until we hit a nice, [round-number milestone](https://xkcd.com/1000/).

View File

@ -0,0 +1,8 @@
+++
title = "Mobile Posting Test"
date = 2023-11-26
[taxonomies]
tags= ["shortnotes"]
+++
This post is a test of how easy it is to post from a mobile device using the Jenkins auto-deploy system I set up the other week. I'm currently sitting in a restaurant waiting for a friend to finish their food. GitNex's editor isn't the most impressive, but it isn't bad either.

View File

@ -0,0 +1,15 @@
+++
title = "I have conqured Podman's YAML"
date = 2023-11-18
[taxonomies]
tags= ["shortnotes"]
+++
I decided that I was done with Gitea's weird port mapping, so I tried to fix it.
Several hours of head-bashing later, I was left with a corrupted database and no Gitea instance.
I'm now writing this several hours *after that*.
I've learned a surprising amount about Podman (compared to Docker), Kubernetes, pods, and several other things that I'll probably end up using at work some day.
Expect a post some time this week about deploying a Zola static site with Jenkins.
And maybe some notes on why I switched from Wordpress to Zola.

View File

@ -0,0 +1,13 @@
+++
title = "Some things I've recently learned about Podman (and Docker)"
date = 2023-11-27
[taxonomies]
tags= ["shortnotes","podman"]
+++
- Podman does not require a user to have unique permissions to use it.
- Any user on a docker-enabled system that also is in the docker group can become root with one command
- The "ADD" directive in a Containerfile or Dockerfile is considered more insecure than "COPY" because it can pull remote directories.
- Podman was made with Docker command compatability in mind because the devs knew they'd never get market share otherwise.

View File

@ -0,0 +1,8 @@
+++
title = "\"Prompt Engineering\""
date = 2023-07-28
[taxonomies]
tags= ["shortnotes"]
+++
A small realization just came to me: theres a certain irony to “prompt engineering” being something that people try to teach as if its a programming discipline. Wasnt the goal of the natural language models to make it so that people can speak normally and get the output they want? Shouldnt that mean that “prompt engineering” should be the same as a communications or writing class?

View File

@ -0,0 +1,8 @@
+++
title = "Security Models"
date = 2023-07-14
[taxonomies]
tags= ["shortnotes"]
+++
Im reviewing security models in preparation for taking the CISSP exam. Its something I havent had a lot of reason to think about since I took a class on it in college. Bell-LaPadula, Biba, Clark-Wilson, etc…. Im glad I know what Anki is now.

View File

@ -0,0 +1,11 @@
+++
title = "A surreal blog"
date = 2023-10-31
updated = 2023-11-13
[taxonomies]
tags= ["shortnotes"]
+++
I found a blog by someone who works at a polar research station. [Their post on nights](https://brr.fyi/posts/polar-night) there is surreal. It reminds me of Signalis.
EDIT: I realized while porting this post to Zola that I posted this on Halloween. It wasn't my intention to match that with a horror game reference, but it fits! :D

View File

@ -0,0 +1,13 @@
+++
title = "Trying Out FSRS"
# description = ""
date = 2024-01-15
# updated = 2024-01-15
draft = true
[taxonomies]
tags = ["shortnotes"]
+++
I'm trying out the new FSRS scheduling algorithm for Anki.
I was hesitant to use it when it was first announced because it seemed to be undergoing a lot of fast changes and required a fair amount of manual setup.
But now it's in the main Anki code (though not in AnkiDroid, yet) and it seems like a poor idea to *not* use it.

View File

@ -0,0 +1,50 @@
+++
title = "Why I moved from Wordpress to Zola"
date = 2023-11-21
[taxonomies]
tags= ["shortnotes"]
+++
I've used a few different site generators and blogging platforms over the years, including but not limited to:
- Wordpress
- Google Blogger
- Tumblr
- Pelican
- MediaWiki (yes, it counts)
- DokuWiki (it counts too!)
- Zola
It should go without saying that every system has its benefits and trade-offs.
This post about the *specific* trade-offs that made me switch from Wordpress to Zola.
My primary issue with Wordpress is the writing.
Gutenberg seems like it would be a very useful editor for a more traditional writer or someone who doesn't have an emphasis on technical content.
I couldn't figure out how to easily move from extended code blocks back to normal writing without using my mouse to add a new paragraph block.
(The classic editor doesn't fix this issue.)
With static site generator that rely on Markdown syntax for formatting (like Zola), it's as simple as adding a few backticks at the start and end.
I write enough code or `general monospace text` that this was a dealbreaker for me.
The second major issue was the difficulties I had in customizing the site.
This isn't an issue of Wordpress lacking customization - Wordpress themes are popular enough for entire businesses to be built upon the back of them.
Unfortunately, the graphical editor wasn't behaving for me (primarily not reliably changing link colors to those in my color scheme) and the code side is its own monster.
I don't want to become a web developer to get my theming working.
Zola's Tera templates only require a bit more than basic HTML and CSS.
Of course, there's downsides to moving to Zola.
The largest trade-off - and the reason that I waited so long to do so - is that there are extra steps to deploying the website.
Wordpress is as simple as "write the content and hit publish".
Zola requires you to have the Zola binary, compile the website, and push the content to the web server host.
You can simplify this by writing your content on the same host as the web server, but then you lose the ability to write and publish from anywhere.
In my case, it also means losing the ability to use graphical editors.
The solution to that trade-off was learning to install and use Jenkins.
For the unfamiliar: Jenkins is a CI/CD tool.
I can write my content on any host, push the "source code" to a git repo, and Jenkins will take care of the rest.
In theory, Jenkins will detect and push a new version of this site within 3 minutes of a new commit being pushed to the git repo.
So far this has worked fairly well.
The final question I can imagine someone may ask is "Lukas, Pelican is a static site generator as well. Why did you move to a different one?"
The answer is Rust.
Zola is written in it.
I'm learning it and want to use it more.
If I encounter a bug, I want to be able to fix it.

View File

@ -0,0 +1,12 @@
+++
title = "Wordpress Gripes"
date = 2023-10-30
[taxonomies]
tags= ["shortnotes"]
+++
Late night thought before work maintenance: I dont particularly enjoy WordPress writing interface. It doesnt feel suitable for quick or technical writing. Customizing the site feels like fighting against the tool.
Pelican (the static site generator) felt a lot nicer. Writing in markdown feels much nicer than using Gutenberg or the Classic Editor (plus I can do version control with Git!) and .html.j2 files for customization is easier than WordPress syntax. Im hardly a Python dev I dont wanna be a web dev too.

View File

@ -0,0 +1,9 @@
+++
title = "YouTube Music"
date = 2023-07-24
[taxonomies]
tags= ["shortnotes"]
+++
A funny thing Ive noticed about YouTube Music: it doesnt seem to take your recently-listened-to music into account when showing quick recommendations if you have YouTube history turned off. I can listen to as much blues or j-rock as I want, but it doesnt start showing those as quick recommends until I hit the like button on a track. Unfortunately, this also means that things I liked a while ago dont appear anymore.

32
templates/shortnotes.html Normal file
View File

@ -0,0 +1,32 @@
{% extends "base.html" %} {% block content %}
<h1 class="title">{{ section.title }}</h1>
<article>{{ section.content | safe }}</article>
{% for year, posts in section.pages | group_by(attribute="year") %}
<ul class="posts flat">
<h2 class="archive-year">{{ year }}</h2>
{% for post in posts %}
<li class="post">
<div class="post-header">
<div class="meta">
<div class="date">
<span class="day">{{ post.day }}</span>
<span class="rest">{{ post.date | date(format='%b') }}</span>
</div>
</div>
<div class="matter">
<div class="title small">
<a href="{{ post.permalink | safe }}">{{ post.title }}</a>
{% if post.draft %}<span class="draft">(Draft)</span>{% endif %}
</div>
<div class="shortnotes-content">
{{ post.content }}
</div>
{{ hooks::posts_below_title(page=post) }}
</div>
</div>
</li>
{% endfor %}
</ul>
{% endfor %} {% endblock content %}