The main system that I am concerned about is my arch BTW machine. I found a
great article [1]
from the official archlinux site covering it.
For my machine I am concerned with this line.
The xz packages prior to version 5.6.1-2 (specifically 5.6.0-1 and 5.6.1-1)
contain this backdoor.
I checked my xz package with AUR [2].">paru, and I am good.
paru -Qii zx
References:
[1]: https://archlinux.org/news/the-xz-package-has-been-backdoored/
[2]: /aur/
Archive
All published posts
2507 posts
latest post 2026-05-29
Publishing rhythm
AUR [1].">paru has some nice features that I rarely use, and hav to look up when I need
them. Here are two commands to help with dependency management.
❯ paru -Qii nodejs
Name : nodejs
Version : 21.7.2-1
Description : Evented I/O for V8 javascript
Architecture : x86_64
URL : https://nodejs.org/
Licenses : MIT
Groups : None
Provides : None
Depends On : icu libuv libnghttp2 libnghttp3 libngtcp2 openssl zlib brotli c-ares
Optional Deps : npm: nodejs package manager [installed]
Required By : node-gyp nodejs-nopt npm semver
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 46.86 MiB
Packager : Felix Yan <[email protected]>
Build Date : Thu 04 Apr 2024 05:11:09 AM CDT
Install Date : Mon 15 Apr 2024 07:27:02 AM CDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
Backup Files : None
Extended Data : pkgtype=pkg
You can check all the packages depended on by nodejs by running the following.
This is everything from all of the repos you have configured, not what you have
installed.
❯ pactree --reverse --sync --depth 1 nodejs
nodejs
├─acorn
├─ansible-language-server
├─asar
├─babel-cli
├─babel-core
...
Changelog Master Feed
Your one-stop shop for all Changelog podcasts.
Changelog · changelog.com [1]
Jerod (It’s ya boi) and Adam are my favorite tech news nerds, and have the sickest podcasts in tech. Yes plural podcasts they run seven podcasts maybe more. If you want it short and sweet they got the best 15 minutes of tech news each week this is it. My favorite is Ship it, sad to see Gerhard go, but Justin and Autumn are crushing it. Every episode is highly polished and surrounded by the sickest beats in podcasting.
Subscribe to one pod if you want, but I recommend collecting them all with the master feed.
⭐⭐⭐⭐⭐
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://changelog.com/master
[2]: /thoughts/
MarkdownDown
Convert any webpage to a clean markdown w/ images downloaded.
MarkdownDown · markdowndown.vercel.app [1]
Small web app to convert html [2] into markdown. Pretty cool idea. I actually want to look into this for reader and see how well it would work. Right now I am just pulling descriptions, but maybe I can pull full web pages, and keep the full intent of the first 200 words or so in the cards.
Note
This post is a thought [3]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://markdowndown.vercel.app/
[2]: /html/
[3]: /thoughts/
Boston Dynamics’ new humanoid moves like no robot you’ve ever seen
All-electric, 360° joints give the new Atlas plenty of inhuman movements.
Ars Technica · arstechnica.com [1]
Award for the creepiest way to stand up a robot from lying flat.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://arstechnica.com/gadgets/2024/04/boston-dynamics-debuts-humanoid-robot-destined-for-commercialization/
[2]: /thoughts/
Rug pull, not cool! (Changelog & Friends #40)
If Changelog News had an extended edition, this might be it! Jerod & Adam discuss Hashicorp's Cease and Desist letter, Redis getting forked, Boston Dymanics' scary cool new robot, Justin Searls' ex...
Changelog · changelog.com [1]
Five star episode with Jarod and Adam shootin the crap.
The massive Cease and Desist [2]
Sucks that the guest had to back out, what a wild world 2024 is. Filled with license and pricing changes.
From Vim to Zed [3]
Interesting to hear the journey into zed, way to go Thorston diving all the way into working at zed.
Boston Dynamics’ new Atlas [4]
I later saw this through a YT short, and man does it hold up to the creepy level that they described.
MarkdownDown [5]
This is a legit cool service, that converts html [6] into markdown
Note
This post is a thought [7]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://changelog.com/friends/40
[2]: https://opentofu.org/blog/our-response-to-hashicorps-cease-and-desist/
[3]: https://registerspill.thorstenball.com/p/from-vim-to-zed
[4]: https://arstechnica.com/gadgets/2024/04/boston-dynamics-debuts-humanoid...
I recently had to update my copier-gallery command to trust my own templates
because some of them have shell scripts that run afterwards. Be warned that
this could be a dangerous feature to run on random templates you get off the
internet, but these are all mine, so if I wreck it its my own fault.
copier copy --trust <template> <destination>
All the the copier copy api can be found with help.
❯ copier copy --help
copier copy 8.3.0
Copy from a template source to a destination.
Usage:
copier copy [SWITCHES] template_src destination_path
Hidden-switches:
-h, --help Prints this help message and quits
--help-all Prints help messages of all sub-commands and quits
-v, --version Prints the program's version and quits
Switches:
-C, --no-cleanup On error, do not delete destination if it was
created by Copier.
--UNSAFE, --trust Allow templates with unsafe features (Jinja
extensions, migrations, tasks)
-a, --answers-file VALUE:str Update using this path (relative to
`destination_path`) to find the answers file
-d, --data VARIABLE=VALUE:str Make VARIABLE available as VALUE when rendering the
template; may be given multiple times
-f, --force Same as `--defaults --overwrite`...
![[none]]
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kanboard
namespace: argocd
spec:
project: default
destination:
namespace: kanboard
server: 'https://kubernetes.default.svc'
source:
path: kanboard
repoURL: 'https://github.com/waylonwalker/homelab-argo'
targetRevision: HEAD
syncPolicy:
automated:
prune: true
Note
This post is a thought [1]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: /thoughts/
Manual Upgrades | K3s
You can upgrade K3s by using the installation script, or by manually installing the binary of the desired version.
docs.k3s.io [1]
You can give k3s an install channel to install stable, latest, or specific versions like 1.26. This is handy to make sure that you install the same version on all of your workers.
curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=latest <EXISTING_K3S_ENV> sh -s - <EXISTING_K3S_ARGS>
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://docs.k3s.io/upgrades/manual
[2]: /thoughts/
Today I accidentally ran f2 in ipython to discover that it opens your $EDITOR!
I use this feature quite often in zsh, it is bound to <c-e> for me, and since
I have my environment variable EDITOR set to nvim it opens nvim when I hit
<c-e>. Today I discovered that Ipython has this bound to F2. If you know
how to set it to <c-e> let me know I’ve tried, a lot.
export EDITOR=nvim
ipython
<F2>
better yet add export EDITOR=nvim to your .zshrc
# ~/.zshrc
export EDITOR=nvim
Devin's Upwork "side hustle" exposed (Changelog News #90)
YouTuber "Internet of Bugs" breaks down why AI "software engineer" Devin is no Upwork hero, Redka is Anton Zhiyanov's attempt to reimplement Redis with SQLite, OpenTofu issues its response to Hashi...
Changelog · changelog.com [1]
Damn 2024 is such a shit show, now Devin seems to be out as a complete scam. It’s really teaching us to have skepticism for what you find on the internet. Turns out that when broken down frame by frame much of the description in the video was a straight up lie. Personally it seemed quite plausible that it was percentage points better than the competition, but I was not holding my breath for it to be a hands off engineer.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://changelog.com/news/90
[2]: /thoughts/
External Link
stackoverflow.com [1]
I learned about the sqlite_master table from this stack overflow answer. This helps make a lot of sense to how sqlite works. The master table contains all the sqlite objects and the sql to create them.
The .tables, and .schema “helper” functions don’t look into ATTACHed databases: they just query the SQLITE_MASTER table for the “main” database. Consequently, if you used
sqlite3 database.db "SELECT * from sqlite_master;"
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://stackoverflow.com/questions/82875/how-can-i-list-the-tables-in-a-sqlite-database-file-that-was-opened-with-attach#answer-83195
[2]: /thoughts/
I’ve really been enjoying using sqlmodel for my projects that need a database.
One thing that I definitely lacked on for too long was indexing my database. I
hit a point with one database where it was taking 7s for pretty simple
paginated queries to return 10 records.
For every field that you will be querying on, you can create an index, by
setting it equal to Field(index=True)
class Hero(SQLModel, table=True):
id: int | None = Field(default=None, primary_key=True)
name: str = Field(index=True)
secret_name: str
age: int | None = Field(default=None, index=True)
example courtesy of the docs
Note
primary keys are indexed by default.
The docs cover this pretty well, and in quite depth - Optimizing Queries [1]
References:
[1]: https://sqlmodel.tiangolo.com/tutorial/indexes/
Redirecting
15r10nk.github.io [1]
This is a cool snapshot testing tool that automatically creates, and updates test values for you.
Starting with some test code.
from inline_snapshot import snapshot
def something():
return 1548 * 18489
def test_something():
assert something() == snapshot()
now if I run pytest my tests will fail because my assert will fail, but if I run pytest --inline-snapshot=create it will fill out my snapshot values and the file will then look like this.
from inline_snapshot import snapshot
def something():
return 1548 * 18489
def test_something():
assert something() == snapshot(28620972)
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://15r10nk.github.io/inline-snapshot/
[2]: /thoughts/
inline-snapshot is a new tool that I am trying out for python testing. It
takes snapshots of your outputs and places them inline with the test.
Here is the most basic starter.
import inline_snapshot
def test_one():
assert 1 == snapshot()
Now when I run pytest my tests will fail because my assert has no value, but if I
run pytest --inline-snapshot=create it will fill out my snapshot values and the
file will then look like this.
import inline_snapshot
def test_one():
assert 1 == snapshot(1)
It also works with pydantic models.
class MyModel(BaseModel):
name: str
age: int
nickname: str | None = None
def test_my_model_instance():
assert MyModel(name="Waylon", age=1) == snapshot(MyModel(name="Waylon", age=1))
def test_my_model_fields():
me = MyModel(name="Waylon", age=1, nickname='Waylon')
assert me.name == snapshot("Waylon")
assert me.age == snapshot(1)
assert me.nickname == snapshot("Waylon")
nalgeon [1] has done a fantastic job with redka [2]. Highly recommend taking a look.
Redis re-implemented with SQLite
References:
[1]: https://github.com/nalgeon
[2]: https://github.com/nalgeon/redka
GitHub - nalgeon/redka: Redis re-implemented with SQL
Redis re-implemented with SQL. Contribute to nalgeon/redka development by creating an account on GitHub.
GitHub · github.com [1]
Redka a sick new redis compatable api, that uses sqlite as its backend datastore. It feels lightweight to use as it is a single small binary. Data does not have to fit into memory as it uses sqlite to store data.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://github.com/nalgeon/redka
[2]: /thoughts/
Today I learned how to VACUUM a sqlite database and cut its size in about half.
It’s a database that I have had running for quite awhile and has some decent
traffic on it.
Why is it important to do a VACUUM? In short its becuase the file system gets
fragmented with as data is updated. On delete the files are removed from the
database and marked as available for reuse in the filesystem, but the space is
not reclaimed.
To VACUUM a database, run the following sql command. You can do it right form
the sqlite shell by running sqlite3.
You will need about double the current size of the database as free space to
do the VACUUM, you need space for a full copy, journaling or write ahead
logs, and the existing database.
VACUUM;
The docs are fantastic for vacuum [1].
References:
[1]: https://www.sqlite.org/lang_vacuum.html
Arch Linux - News: The xz package has been backdoored
archlinux.org [1]
Check your system to see if you are vulnerable to the xz backdoor.
I found this line most pertanent to me.
The xz packages prior to version 5.6.1-2 (specifically 5.6.0-1 and 5.6.1-1) contain this backdoor.
Also it appears that arch is not vulnerable as it does not directly link openssh to liblzma, so the known attack vecotor is not possible. read to the end of the linked article for more.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://archlinux.org/news/the-xz-package-has-been-backdoored/
[2]: /thoughts/
![[None]]
Install it
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("waylonwalker.plugins.harpoon").setup()
end,
},
harpoon config
local harpoon = require("harpoon")
M = {}
M.setup = function()
-- REQUIRED
harpoon:setup()
-- REQUIRED
vim.keymap.set("n", "<F10>", function() harpoon:list():append() end)
vim.keymap.set("n", "<F9>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<F1>", function() harpoon:list():select(1) end)
vim.keymap.set("n", "<F2>", function() harpoon:list():select(2) end)
vim.keymap.set("n", "<F3>", function() harpoon:list():select(3) end)
-- these are cnext/cprev
-- vim.keymap.set("n", "<F4>", function() harpoon:list():select(4) end)
-- vim.keymap.set("n", "<F5>", function() harpoon:list():select(5) end)
vim.keymap.set("n", "<F6>", function() harpoon:list():select(6) end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set("n", "<F7>", function() harpoon:list():prev() end)
vim.keymap.set("n", "<F8>", function() harpoon:list():next() end)
-- basic telescope configuration
local conf = require("telescope.config").valu...
I learned that tailwind animations are pretty easy to add only needing a few
classes. For some reason though my brain broke, thinking that I could
dynamically change the number and you can’t cause there are only so many pre
compiled classes without using an arbitrary value with brackets.
Here are the classes that I used to transition my colors very slowly.
<div id="square"
class="transition-colors ease-in-out duration-700">
</div>
And the entire square element.
<div id="square"
class="w-16 h-16 bg-rose-500 rounded border border-4 border-rose-800 hover:bg-indigo-600 hover:border-yellow-500 transition-colors ease-in-out duration-700">
</div>
I recently updated ollama [1], and it now installs a systemd
service that I was not expecting. Seems like a great option, but I hadn’t
expeted this and I was able to kill it previously. It was using up gpu, and I
do other things on my machine with a gpu. I tried pkill, kill, and everything,
it was still coming back.
No matter what it comes back
# stop it
systemctl stop ollama.service
# disable it if you want
systemctl disable ollama.service
# confirm its status
systemctl status ollama.service
You can confirm this with the following command.
# checking running processes
ps aux | grep ollama
pgrep ollama
# checking gpu processes
gpustat --show-cmd --show-pid
Next time you want to start you can do it as before with ollama serve.
References:
[1]: https://ollama.com/
-
I found this statement quite intriguing.
multi-cursors are just macros.
This is quite a philisophical video and mostly prime talking about the things that make vim vim, and what prime needs in and editor vs what he can live without.
Note
This post is a thought [1]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: /thoughts/
Typer makes it easy to compose your cli applications, like you might with a web
router if you are more familiar with that. This allows you to build smaller
applications that compose into a larger application.
You will see similar patterns in the wild, namely the aws cli which always
has the aws <command> <subcommand> pattern.
Lets setup the cli app itself first. You can put it in project/cli/cli.py.
import typer
from project.cli.api import api_app
from project.cli.config import config_app
from project.cli.user import user_app
from project.cli.run import run_app
app = typer.Typer()
app.add_typer(api_app, name="api")
app.add_typer(config_app, name="config")
app.add_typer(user_app, name="user")
app.add_typer(run_app, name="run")
Creating an app that will become a command is the same as creating a regular
app in Typer. We need to create a callback that will become our command, and a
command that will become our subcommand in the parent app.
import typer
from rich.console import Console
from project.config import get_config
config_app = typer.Typer()
@config_app.callback()
def config():
"model cli"
@config_app.command()
def show(
):
project_config = get_config(env)
Cons...
I learned not to fear the arbitrary size feature of tailwind. While building
out reader.waylonwalker.com [1] I kept getting
content flowing off the screen, and struggling to keep it on the screen. I
really felt that I should be able to do this with vanilla tailwind, but after
some encouragement from Twitter I decided to lean on arbitrary values and it
worked.
Don’t fear the arbitrary values.
<li class="max-w-[100vw]">
</li>
Learn more about using-arbitrary-values from their docs
docs [2]
References:
[1]: https://reader.waylonwalker.com
[2]: https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values
Use an llm to automagically generate meaningful git commit messages
I
harper.blog [1]
This is pretty sick, I wanted this early on when I was making lockhart. I wanted to do the git [2] hook thing but could not figure it out and did not know that prepare-commit-msg was a hook that I could use.
Git Hooked
Then I remembered! Git hooks! Lol. Why would I have that in my brain - who knows!
I asked claude again, and they whipped up a simple script that would act as a hook that triggers with the prepare-commit-msg event.
This is awesome, cuz if you want to add a git message, you can skip the hook. But if you are lazy, you exclude the message and it will call the LLM.
Simon Willison’s llm cli comes in clutch here, it has such a good intereface to allow a prompt to be piped in, but the system prompt be set by -s.
gpt = "!f() { git diff $1 | llm -s \"$(cat ~/.config/prompts/commit-system-prompt.txt)\" }; f"
I love hacking on projects, but often I am super bad at making commits that make sense.
I completely relate to this statement, and this is why I am trying it.
Note
This post is a thought [3]. It’s a short note that I make
about someone else’s content online #thoughts
Refere...
Each time I go to set up npm I am frustrated by the errors saying that I don’t
have permission to npm i -g <package>, and it’s frustrating. And I forget
what I need to do to tell npm to install packages in a directory I own, and my
shell to look there so that I can use the executables.
mkdir ~/.npm-global
export NPM_CONFIG_PREFIX=~/.npm-global
export PATH=$PATH:~/.npm-global/bin
For the fix to remain persistent you need to put these two lines in your shell
profile like ~/.bashrc or ~/.zshrc.
export NPM_CONFIG_PREFIX=~/.npm-global
export PATH=$PATH:~/.npm-global/bin
One Day Build - Play Outside
Inspired by Adam Savage and his One Day builds on youtube. I often build
things, and want to make them generally useful for others and over configure
out of the gate. This project is purely for me inspired by a need I have.
- play-outside [1]
!How-To # [2]
This post will not directly show how to make a weather app, but document the
process that I went through to make mine. It will show the tools that I used
to make it, and the final result.
The Situation # [3]
It often goes in our house ask dad while he is busy and he will probably just
say yes without thinking much. This happens a lot when kids ask to go
outside. I think sure, go for it, you will figure it out. Then my wife walks
in and asks where they are, followed by, did you even check the weather, its
-11 degrees outside right now.
I need a tool for this decision making process
Lungs # [4]
You we have a family of not the most heathly lungs, we have my wife with lung
cancer, one lung missing, and kids with asthma. We nee...
If you are designing a website in dark mode the scrollbars can be finicky to
match the theme. Here is a pretty sane default that looks nice without being
obnoxiously contrast to the rest of the site.
<style>
::-webkit-scrollbar {
height: 1rem;
width: 1rem;
}
::-webkit-scrollbar-track {
background-color: rgb(24 24 27);
}
body::-webkit-scrollbar-track {
background-color: rgb(39 39 42);
}
::-webkit-scrollbar-thumb {
background-color: rgb(82 82 91);
}
::-webkit-scrollbar-thumb:hover {
background-color: rgb(113 113 122);
}
body::-webkit-scrollbar-thumb {
background-color: rgb(82 82 91);
}
body::-webkit-scrollbar-thumb:hover {
background-color: rgb(113 113 122);
}
::-webkit-scrollbar-corner {
background-color: rgb(39 39 42);
}
</style>
Want a rounded scrollbar thumb? add these styles.
::-webkit-scrollbar-thumb {
border-radius: 0.25rem;
border-radius: 9999px;
}
body::-webkit-scrollbar-thumb {
border-radius: 0.25rem;
border-radius: 9999px;
}
This makes a very nice looking default darkmode scrollbar.
External Link
stackoverflow.com [1]
Its sad that this is not the accepted answer.
mkdir ~/.npm-global
export NPM_CONFIG_PREFIX=~/.npm-global
export PATH=$PATH:~/.npm-global/bin
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo#answer-41395398
[2]: /thoughts/
Before deploying to cloudflare pages with wrangler you need a cloudflare api
token. You can get one at
dash.cloudflare.com/profile/api-tokens [1].
[2]
Install Wrangler # [3]
Next install wrangler using npm.
npm i -g wrangler
Create a Project # [4]
Before you deploy to cloudflare pages you need to create a project. You might
already have one, or you might want to create one in the webui, but you have
the option to create it at the command line with wrangler.
npx wrangler pages deploy markout --project-name reader-waylonwalker-com --branch markout
Deploy # [5]
Now you can deploy your static application using wrangler to cloudflare pages.
In this example I have my application built into the markout directory, and
since the production branch is named markout I need to pass that in here as
well.
wrangler pages deploy markout --project-name reader-waylonwalker-com --branch markout
References:
[1]: https://dash.cloudflare.com/profile/api-tokens
[2]: https://dropper.waylonwalker.com/api/file/7b566e55-98ff-4d96-b0bc-3c4e5b619d68.png
[3]: #install-wrangler
[4]: #create-a-project
[5]: #deploy
External Link
stackoverflow.com [1]
This is how you fix the stupid corner section of a double scroll bar being white on a dark theme site.
::-webkit-scrollbar-corner {
background: rgba(0,0,0,0);
}
The question included an example image where you can see white squares everywhere there are horizontal and vertical scroll bars.
[2]
Note
This post is a thought [3]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://stackoverflow.com/questions/35968553/webkit-scrollbar-css-always-a-white-box-in-corner
[2]: https://i.stack.imgur.com/P6b7f.png
[3]: /thoughts/
For my reader app I am using cronjobs to schedule my a new build and upload to
cloudflare pages every hour. In this example I have built a docker image
docker.io/waylonwalker/reader-waylonwalker-com and pushed it to dockerhub.
It uses a CLOUDFLARE_API_TOKEN secret to access cloudflare, and the
entrypoint itself does the build and upload.
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: reader
namespace: reader
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: reader-cronjob
namespace: reader
spec:
schedule: "0 * * * *"
successfulJobsHistoryLimit: 6
failedJobsHistoryLimit: 6
jobTemplate:
spec:
template:
spec:
containers:
- name: reader-container
image: docker.io/waylonwalker/reader-waylonwalker-com:latest
env:
- name: CLOUDFLARE_API_TOKEN
valueFrom:
secretKeyRef:
name: cloudflare-secret
key: cloudflare-secret
restartPolicy: OnFailure
-
This is an interesting problem. I want to make a solution for this on htmx [1]-patterns. I would make user specific routes with an hx-get rather than serving the whole page, serve a partial with hx-oobs to fill in user specific data with a no cache on the cdn level.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: /htmx/
[2]: /thoughts/
-
So cool to see ROX build this over the course of a day.
Note
This post is a thought [1]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: /thoughts/
Looking for inspiration? DigitalHarbor [1] by DigitalHarbor7 [2].
No description available.
References:
[1]: https://github.com/DigitalHarbor7/DigitalHarbor
[2]: https://github.com/DigitalHarbor7
I’m really excited about fastapi-observability [1], an amazing project by blueswen [2]. It’s worth exploring!
Observe FastAPI [3] app with three pillars of observability: Traces (Tempo), Metrics (Prometheus), Logs (Loki) on Grafana through OpenTelemetry and OpenMetrics.
References:
[1]: https://github.com/blueswen/fastapi-observability
[2]: https://github.com/blueswen
[3]: /fastapi/
I am working on a page for
htmx-patterns [1] and I ran into a
situation with lots of duplication. Especially when i am using tailwind I run
into situations where the duplication can get tedious to maintiain. The
solution I found is macros.
Now I can use the same code for all of my links, and call the macro to use it.
{% macro link(id, text, boosted=false) -%}
<a
class="
{% if id is none %}
pointer-events-none bg-terminal-950 text-terminal-900 ring-terminal-900
{% else %}
bg-terminal-950 hover:bg-terminal-900 hover:text-terminal-400 text-terminal-500 shadow-lg shadow-terminal-300/20 hover:shadow-terminal-300/30 ring-terminal-300
{% endif %}
cursor-pointer block text-center font-bold py-2 px-4 rounded w-full ring-1
"
{% if id is not none %}
href="{{ url_for('boosted', id=id) }}"
{% endif %}
{% if boosted %}
hx-boost="true"
{% endif %}>
{{ text }}
</a>
{%- endmacro %}
<h2 class='text-3xl font-light mt-0 max-w-xl text-center prose-xl mt-8 text-terminal-500'>
Boosted Links
</h2>
<div class='flex flex-row gap-4'>
{{ link(prev_id, 'Previous', boosted=True) }}
{{ link(next_id, 'Next', boosted=True) }}
</div>
<h2 class='text-3xl font-light mt-0 max-w-xl text-center...
If you’re into interesting projects, don’t miss out on taipy [1], created by Avaiga [2].
Turns Data and AI algorithms into production-ready web applications in no time.
References:
[1]: https://github.com/Avaiga/taipy
[2]: https://github.com/Avaiga
jinja has a loop variable that is very handy to use with htmx [1]. Whether you
want to implement a click to load more or an infinite scroll this loop variable
is very handy.
{% for person in persons %}
<li
{% if loop.last %}
hx-get="{{ url_for('infinite', page=next_page) }}"
hx-trigger="intersect once"
hx-target="#persons"
hx-swap='beforeend'
hx-indicator="#persons-loading"
{% endif %}
{{ person.name.upper() }} -
{{ person.phone_number }}
</li>
{% endfor %}
Now for every chunk of contacts that we load we will trigger the infinite
scroll by loading more once the last one has intersected the screen.
References:
[1]: /htmx/
Out of the box FastAPI [1].">Starlette does not support url_for with query params. When
trying to use url_for with query params it throws the following error.
starlette.routing.NoMatchFound: No route exists for name "infinite" and params "page"
In my searching for this I found starlette issue #560 [2] quite helpful, but not complete, as it did not work for me.
import jinja2
if hasattr(jinja2, "pass_context"):
pass_context = jinja2.pass_context
else:
pass_context = jinja2.contextfunction
@pass_context
def url_for_query(context: dict, name: str, **params: dict) -> str:
request = context["request"]
url = str(request.url_for(name))
if params == {}:
return url
from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
# Parse the URL
parsed_url = urlparse(url)
# Parse the query parameters
query_params = parse_qs(parsed_url.query)
# Update the query parameters with the new ones
query_params.update(params)
# Rebuild the query string
updated_query_string = urlencode(query_params, doseq=True)
# Rebuild the URL with the updated query string
updated_url = urlunparse(
(
parsed_url.scheme,
parsed_url.netloc,
parsed_url.path,
parsed_url.params,
updated_...
Kind (Kubernetes in Docker) is a tool that makes it easy to create and tear
down local clusters quickly. I like to use it to test out new workflows.
Argocd is a continuous delivery tool that makes it easy to setup gitops
workflows in kubernetes.
Here is how you can setup a new kind cluster and install argocd into it using
helm, the kubernetes package manager.
kind create cluster --name argocd
# your first time through you need to add the argocd repo
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
# install argocd into the cluster
helm install argo argo/argo-cd --namespace argocd --create-namespace
# deploy the app of apps
kubectl apply -f apps/apps.yaml
If you want to add repos and apps to your cluster you can use the argo cli to
do that, but first you will need forward the argocd port and login.
# Wait until Argo CD API server is available
echo "Waiting for Argo CD API server to be available..."
while ! kubectl wait --for=condition=available --timeout=60s deployment/argo-argocd-server -n argocd; do
echo "Waiting for Argo CD API server to be ready..."
sleep 10
done
kubectl port-forward svc/argo-argocd-server -n argocd 8080:443 &
argocd_admin_pa...
External Link
dotesports.com [1]
Damn this button had me stuck for way too long. It definitely looks like a button once I see it, but I don’t recall coming into contact with many buttons in the game, I tried to set it ablaze, pull it, fly it, nothing.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://dotesports.com/hp/news/hogwarts-legacy-argyllshire-map-what-does-the-button-do
[2]: /thoughts/
External Link
help.socialbee.com [1]
YouTube makes finding rss feeds way too hard. Hats off to them for still supporting it, allowing you to find content outside the algorithm, and consuming content you asked for. But i had no idea you had to search the source code to get it.
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://help.socialbee.com/article/129-how-can-i-add-my-youtube-videos-via-rss
[2]: /thoughts/
feeds
I have several feeds that you can consume my content with. Many posts will
cross between them, so if you would like to follow a certain stream of content
in your rss reader thats what this is for. This one might feel like it has some
extra noise with multiple posts per day, including starts, and instagram style
posts, for a bit less look at the [[ main ]] feed.
TLDR
If you are looking for everything look here <https://waylonwalker.com/archive/rss.xml>
All # [1]
This is a feed of everything that I have published on my site to date
including Posts tagged: blog [2], [[ til ]], Thoughts [3], [[ stars ]], Posts tagged: shots [4],
[[ pings ]].
- web [5]
- rss [6]
Main # [7]
Like the All feed, but drops the shots (instagram style posts) and stars
(github stars).
- web [8]
- rss [9]
til - daily(ish) # [10]
think gist with a tweet
This is a feed of all of my TIL’s (Today I Learned). These are generally short
single topic posts that I write up quickly. They are generally things t...
External Link
stackoverflow.com [1]
Another interesting option for slow count queries in sqlite.
If you haven’t DELETEd any records, doing:
SELECT MAX(ROWID) FROM "table" LIMIT 1;
Note
This post is a thought [2]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: https://stackoverflow.com/questions/8988915/sqlite-count-slow-on-big-tables
[2]: /thoughts/
Optimizing SQLite for servers
SQLite is often misconceived as a "toy database", only good for mobile applications and embedded systems because it's default configuration is optimized for embedded use cases, so most ...
Sylvain Kerkour · kerkour.com [1]
Very interesting article by Sylvain, suggested by Simon Willison.
Definitely some things that I want to come back and try later on.
Here is the TLDR of the whole post
PRAGMA journal_mode = WAL;
PRAGMA busy_timeout = 5000;
PRAGMA synchronous = NORMAL;
PRAGMA cache_size = 1000000000;
PRAGMA foreign_keys = true;
PRAGMA temp_store = memory;
This is interesting, and something I need to consider. I definitely have an application with slow count queries. I am not sure how to make it better as its not a full count(*) so a count table doesn’t work, nor does counting by index.
I might need to have a table of cached results, and if a write matches the counter increase it, or update all counters on write.
COUNT queries are slow
SQLite doesn’t keep statistics about its indexes, unlike PostgreSQL, so COUNT queries are slow, even when using a WHERE clause on an indexed field: SQLite has to scan for all the matching records.
One solution...
-
Inspiring story transitioning into tech from nursing. I also came to tech through a set of circumstances that made it difficult for me to excel at my current job. Looking back it is something that I was always interested in and I was just unsure how to get in, I am so glad that I figured it out, it has been such a great benefit to my family.
I really enjoyed listening to trshpuppy’s journey in through building projects, and choosing tech not based on what she wanted to learn, but what fit the project the best.
Note
This post is a thought [1]. It’s a short note that I make
about someone else’s content online #thoughts
References:
[1]: /thoughts/
Thoughts
These are generally my thoughts on a web page or some sort of url, except a
rare few don’t have a link. These are dual published off of my
thoughts.waylonwalker.com [1] site. It’s a
fully dynamically rendered site 2000’s style. Posts are stored in a database
and instantly available. Almost all of the posts were written in a small
<textarea> field within a chrome extension that I built for it.
These posts are intended to in two ways. One, link building for the author. I
hope that I give the people helping me out along the way just a little bit of a
boost. Two, they serve as a permanant commented bookmark for me to search, and
come back to later when I have forgotten where I have seen something.
- web [2]
- rss [3]
All thoughts posts cross posted to my site are prefixed with a thought balloon 💭.
The tech # [4]
Since this blog is mostly a tech blog about software development, and my
journey as I learn, lets talk tech.
- python
- fastapi [5]
- htmx [6]
- sqlite
- docker
- ht...
I’m impressed by til [1] from jbranchaud [2].
📝 Today I Learned
References:
[1]: https://github.com/jbranchaud/til
[2]: https://github.com/jbranchaud