Archive

All published posts

2518 posts latest post 2026-07-10 simple view
Publishing rhythm
Jun 2026 | 26 posts
The work on image-template [1] by ublue-os [2]. Build your own custom Universal Blue Image! References: [1]: https://github.com/ublue-os/image-template [2]: https://github.com/ublue-os
GitHub - ublue-os/obs-studio-portable: OCI container image of OBS Studio that bundles a curated collection of 3rd party plugins OCI container image of OBS Studio that bundles a curated collection of 3rd party plugins - ublue-os/obs-studio-portable GitHub · github.com [1] Distrobox is so interesting and cool, I’ve only recently started realizing how much it can do especially related to hardware and graphics, this is quite an example that runs obs in a distrobox. I had no idea distrobox would let you connect to cameras and gpus so seemlessly, and give you a gui to work from. And with distrobox you can export so that it just looks like an app on your system. References: [1]: https://github.com/ublue-os/obs-studio-portable
The work on obs-studio-portable [1] by ublue-os [2]. OCI container image of OBS Studio that bundles a curated collection of 3rd party plugins References: [1]: https://github.com/ublue-os/obs-studio-portable [2]: https://github.com/ublue-os
andydunstall [1] has done a fantastic job with piko [2]. Highly recommend taking a look. An open-source alternative to Ngrok, designed to serve production traffic and be simple to host (particularly on Kubernetes) References: [1]: https://github.com/andydunstall [2]: https://github.com/andydunstall/piko
How Ahrefs gets a Billion dollar-worth infrastructure with a 90% discount A holistic comparison of on-prem Ahrefs infrastructure with a cloud alternative Medium · tech.ahrefs.com [1] 2024 has been a wild year for infra with going “back” to on prem being made popular by @dhh [2]. Well it looks like ahrefs saw right through the cloud trends an decided to ride the anti cloud train until it came back around to the station. Being just a bit critical of the article it is impossible to get an apples to apples without actually running something of this scale and spending too much to find out. I cant imagine raw ec2 and ebs being the cheapest route into aws. They used no serverless tech in their article, but I digress, because I like this own your shit and build good product train. What about People?! This follow up does dive into the typical gut reaction that people cost a lot of money, you must account for them. You see when you hire people who are actually good at what they do, and run lean a lot of cost goes away, you have levels of management that disappear, levels of tooling that don’t need to exist, departments of IT don’t need to exist. Colo’s are the new hotness, and will...
Safer Bash Shebang Recipes - Just Programmer's Manual just.systems [1] When using justfiles each line is ran separately from the last, unless you specify the file to be ran by something other than just such as bash. If you want variables to persist you need to set a shebang. Also if you are using your script i a way that you want it to exit when it fails you need to set -e and -o pipefail. This is critical if you are thinking about using just for production scripts like ci/cd. I’ve hit too bugs where ci passes, but no artifacts were created issues for this exact reason. foo: #!/usr/bin/env bash set -euxo pipefail hello='Yo' echo "$hello from Bash!" References: [1]: https://just.systems/man/en/safer-bash-shebang-recipes.html?highlight=pipefail#safer-bash-shebang-recipes
Justfile Cheat Sheet Just is a command runner https://github.com/casey/just Cheatography · cheatography.com [1] This is a dope ass cheat sheet for justfiles. It’s filled with good examples that are short and to the point, probably all from the docs, but anyways I need to do some like this for myself. References: [1]: https://cheatography.com/linux-china/cheat-sheets/justfile/
A quote from Tim Paul I’m no developer, but I got the AI part working in about an hour. What took longer was the other stuff: identifying the problem, designing and building the UI, setting … Simon Willison’s Weblog · simonwillison.net [1] Damn this Tim Paul quote finishes hard and such a good point. None of the stuff around llms just work. Good ui’s, front end, back end, infrastructure, product. All these things still need to exist, and in fact for ai to be good we need to still go hard on them otherwise everything will die in a heaping pile of ai slop [2] I’m no developer, but I got the AI part working in about an hour. What took longer was the other stuff: identifying the problem, designing and building the UI, setting up the templating, routes and data architecture. It reminded me that, in order to capitalise on the potential of AI technologies, we need to really invest in the other stuff too, especially data infrastructure. It would be ironic, and a huge shame, if AI hype sucked all the investment out of those things. — Tim Paul [3] References: [1]: https://simonwillison.net/2024/May/13/tim-paul/ [2]: https://simonwillison.net/2024/May/8/slop/ [3]: https://www.timp...
PopSQL - Collaborative SQL Editor - Bring Order to SQL Chaos PopSQL is a unified SQL collaboration workspace that connects everyone in the data analysis process so you can obtain better insights by asking the right questions, together. PopSQL · popsql.com [1] PopSql looks like a very innovative product to bring collaboration to data exploration and visualization in a way you would expect from something like vscode liveshare. This looks far more appealing than a traditional BI data tool. References: [1]: https://popsql.com/
Pricing | PopSQL PopSQL is a unified SQL collaboration workspace that connects everyone in the data analysis process so you can obtain better insights by asking the right questions, together. PopSQL · popsql.com [1] interesting pricing model from popsql (pronounces Popsicle). At a glance you pay for data retention, want the abiltiy to recall all the queries you ran within the last year, run at a higher frequency, you jump a pricing tier. References: [1]: https://popsql.com/pricing
- such a sick episode with dax. SST’s free tier will be free as long as aws allows a free tier, their free tier literally costs them nothing. They talked about keeping SST small, the limitations that brings, but also the number of problems that just go away when you only have 3 people building. Lots of process disappears, everyone can trust everyone, no one needs to wait for approval, everyone is their own PM and just builds cool shit. They don’t have to worry about big costs and making payroll because they are profitable so much higher than their costs. If they can get through phase one of just being the go platform for a very specific audience of users, and gain marketshare, the ideas of offerings on top of this are endless.
- I had no idea that you could just drop an msi installer right in steam. This worked for me, and was much easier to install pokemon tcg live in 05-2024 on ubuntu 22-04. I added the msi to steam from my downloads, hit start, failed right away like he said it would. changed compatability to proton experimental, and it opened right up. - Download the official installer from pokemon tcg - Add non steam game - click show all file types - navigate to downloaded msi - click gear icon > compatability > proton experimental - click play - profit
The work on datastar [1] by starfederation [2]. The hypermedia framework. References: [1]: https://github.com/starfederation/datastar [2]: https://github.com/starfederation
Fields Pydantic Docs · docs.pydantic.dev [1] exclude=True and repr=False is a good pydantic combination for secret attributes such as user passwords, or hashed passwords. exclude keeps it out of model_dumps, and repr keeps it out of the logs. from pydantic import BaseModel, Field class User(BaseModel): name: str = Field(repr=True) age: int = Field(repr=False) user = User(name='John', age=42) print(user) #> name='John' References: [1]: https://docs.pydantic.dev/2.7/concepts/fields/#field-representation

just has been by go to tool for saving commands in a way that I can replay them and have team members replay them without relying on the shell history of any given machine. This is my go to default step, it lets you pick a just command to run with a fuzzy picker.

default:
  @just --list
Hatch v1.10.0 - Hatch hatch.pypa.io [1] Hatch be flyin. This new release of hatch includes support for the new package installer uv which is just mind blowing fast compared to anything else we have in python right now. [tool.hatch.envs.default] installer = "uv" The other features are cool too, check them out. I’ll probably be using the test runner, but I’ve been waiting for the uv support since uv launched. References: [1]: https://hatch.pypa.io/latest/blog/2024/05/02/hatch-v1100/
External Link loggly.com [1] I had a boot issue on my sons fresh ubuntu 24.04 install and journalctl came in clutch. journalctl -p 3 -xb - -p 3 gives me priority 3 - -x gives me extra catalog information when available - -b gives me the current boot. References: [1]: https://www.loggly.com/ultimate-guide/using-journalctl/
Bug #2006590 “gdm3 crashes with SIGTRAP on startup” : Bugs : gdm3 package : Ubuntu Suddenly this week, my GUI (ubuntu 22.10) does not open, stuck on the console text. I tried to free some space (by uninstall a app), then to check/update the paquets (dkpg). ProblemType: Bug Distr… Launchpad · bugs.launchpad.net [1] This Thread saved my son’s ubuntu 24.04 install. His was failing to start with the following error. Gdm: GdmSession: no session desktop files installed, aborting... https://twitter.com/_WaylonWalker/status/1785825677079441482 sudo apt install --reinstall ubuntu-session References: [1]: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/2006590
GitHub - Alir3z4/html2text: Convert HTML to Markdown-formatted text. Convert HTML to Markdown-formatted text. Contribute to Alir3z4/html2text development by creating an account on GitHub. GitHub · github.com [1] Super neat tool to convert html [2] to markdown >>> import html2text >>> >>> print(html2text.html2text("<p><strong>Zed's</strong> dead baby, <em>Zed's</em> dead.</p>")) <!--markata-attribution--> **Zed's** dead baby, _Zed's_ dead. It even plays nicely with rich. from rich.markdown import Markdown from rich.console import Console import html2text console = Console() md = Markdown(html2text.html2text("<p><strong>Zed's</strong> dead baby, <em>Zed's</em> dead.</p>")) console.print(md) References: [1]: https://github.com/Alir3z4/html2text [2]: /html/
External Link medium.com [1] Imagine waking up to a $1,300 for running an example project! That sounds like peanuts for a cloud bill but for an individual trying to learn that hits my monthly budget real hard. That’s what happened to Marciej, make sure you check out the full article and give them a 👏 on Medium if you have an account. The more I see things come out about aws, the more it makes me sick, and confirm my feelings that I cannot possibly use them for a side project without some real $$ planning to come out of it. Yes, S3 charges for unauthorized requests (4xx) as well[1]. That’s expected behavior. They offer no DDOS protection against 4xx or 5xx requests against your bucket. Absolutely bonkers that you have ZERO control over this. --- This response just feels absolutely gross. I notified the AWS security team. I suggested that they restrict the unfortunate S3 bucket name to protect their customers from unexpected charges, and to protect the impacted companies from data leaks. But they were unwilling to address misconfigurations of third-party products. It sounds like this guy followed some default instructions for an example site, HOW MANY OTHERS have done th...
Media Types iana.org [1] A full list of standard Accept types. This is a handy reference. References: [1]: https://www.iana.org/assignments/media-types/media-types.xhtml#text
![https://docs.pydantic.dev/2.7/api/networks/#pydantic [1].networks.EmailStr](/static/https://docs.pydantic.dev/2.7/api/networks/#pydantic [1].networks.EmailStr) pydantic has a nice built in email validator EmailStr It requires an optional pydantic dependency pip install email-validator Then you can validate email addresses. from pydantic import BaseModel, EmailStr class Model(BaseModel): email: EmailStr print(Model(email='[email protected]')) #> email='[email protected]' References: [1]: /tags/pydantic/
[1] This is my go to rich response container for clis written in python. It creates a nice box around the content on the screen and provides some nice separation in the output. It can be overdone, but comes in clutch when looking for that print statement in a long output. References: [1]: /static/https://rich.readthedocs.io/en/stable/reference/panel.html
Handling Errors - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com [1] This page shows how to customize your fastapi [2] errors. I found this very useful to setup common templates so that I can return the same 404’s both programatically and by default, so it all looks the same to the end user. from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418, content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."}, ) @app.get("/unicorns/{name}") async def read_unicorn(name: str): if name == "yolo": raise UnicornException(name=name) return {"unicorn_name": name} --- This post sat in draft for months. I stumbled upon it again and found great success returning good error messages based on user preferences. the default remains json, but if a user requests text/html it will be an html [3] response, and text for ...
Creating SSH Apps with Charm Wish and Laravel Prompts Building PHP CLI apps with Laravel Prompts is easy, but how can we share them? Charm to the rescue! Charm Wish is an easy-to-use SSH server that allows users to securely log into your server and us... Joe Tannenbaum · blog.joe.codes [1] Joe has a sick cli.labs site for deploying tui applications. ssh cli.lab.joe.codes References: [1]: https://blog.joe.codes/creating-ssh-apps-with-charm-wish-and-laravel-prompts
white-space CSS property - CSS | MDN The white-space CSS property sets how white space inside an element is handled. MDN Web Docs · developer.mozilla.org [1] html [2] can preserve newline \n characters by styling an element with white-space: pre-wrap; pre-wrap Sequences of white space are preserved. Lines are broken at newline characters, at , and as necessary to fill line boxes. References: [1]: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space [2]: /html/
htmx ~ The htmx Response Targets Extension Extension htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypert... htmx.org [1] The htmx [2] response-targets extension allows me to respond to errors from the backend and do normal htmx swaps. Note by default htmx will only swap on 200 and 300 responses Load the extension in head <script src="https://unpkg.com/[email protected]/dist/ext/response-targets.js"></script> Use the extension on an endpoint that might return a 400. <div hx-ext="response-targets"> <div id="response-div"></div> <button hx-post="/register" hx-target="#response-div" hx-target-5*="#serious-errors" hx-target-404="#not-found"> Register! </button> <div id="serious-errors"></div> <div id="not-found"></div> </div> References: [1]: https://htmx.org/extensions/response-targets/ [2]: /htmx/
How to Restart All Pods in a Kubernetes Namespace | Boot.dev Where I work, we use a repo-per-namespace setup and so it often happens that I want to restart all pods and deployments in a single Kubernetes namespace. Maybe I want to see the startup logs, or ma... Boot.dev · blog.boot.dev [1] As of kubernetes 1.15 there is an easy way to restart all pods in a deployment. kubectl -n {NAMESPACE} rollout restart deploy Thanks Lane give him a follow @wagslane [2] References: [1]: https://blog.boot.dev/open-source/how-to-restart-all-pods-in-a-kubernetes-namespace/ [2]: https://twitter.com/wagslane

TIL how to display the list of nfs mounts on your network.

showmount -e

You can even look for mounts of other machines on your network.

showmount -e <hostname>

To allow access only to the , you can pass add the Resource field to the User Policy when you create a new token.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "admin:*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "kms:*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:*"
      ],
      "Resource": [
        "arn:aws:s3:::<bucket>",
        "arn:aws:s3:::<bucket>/*"
      ]
    }
  ]
}

You can inspect sqlite tables with the sqlite shell.

note that you get into the shell with sqlite3 database.db

.tables

I also learned that .tables, .index and .schema are helper functions that query the sqlite_master table on the main database.

Here is an output from my redka database. The sqlite_master table contains all the sqlite objects type, name, tbl_name, rootpage, and sql to create them.

❯ sqlite3 database.db "SELECT * from sqlite_master;"
table|rkey|rkey|2|CREATE TABLE rkey (
    id       integer primary key,
    key      text not null,
    type     integer not null,
        version  integer not null,
    etime    integer,
        mtime    integer not null
)
index|rkey_key_idx|rkey|3|CREATE UNIQUE INDEX rkey_key_idx on rkey (key)
index|rkey_etime_idx|rkey|4|CREATE INDEX rkey_etime_idx on rkey (etime)
where etime is not null
trigger|rkey_on_type_update|rkey|0|CREATE TRIGGER rkey_on_type_update
before update of type on rkey
for each row
when old.type is not new.type
begin
    select raise(abort, 'key type mismatch');
end
table|rstring|rstring|5|CREATE TABLE rstring (
    key_id integer not null,
    value  blob not null,

    foreign key (key_id) references rkey (id)
          on delete cascade
)
index|rstring_pk_idx|rstring|6|CREATE UNIQUE INDEX rstring_pk_idx on rstring (key_id)
view|vstring|vstring|0|CREATE VIEW vstring as
  select
    rkey.id as key_id, rkey.key, rstring.value,
        datetime(etime/1000, 'unixepoch') as etime,
        datetime(mtime/1000, 'unixepoch') as mtime
  from rkey join rstring on rkey.id = rstring.key_id
  where rkey.type = 1
    and (rkey.etime is null or rkey.etime > unixepoch('subsec'))
table|rhash|rhash|7|CREATE TABLE rhash (
    key_id integer not null,
    field text not null,
    value blob not null,

    foreign key (key_id) references rkey (id)
      on delete cascade
)
index|rhash_pk_idx|rhash|8|CREATE UNIQUE INDEX rhash_pk_idx on rhash (key_id, field)
index|rhash_key_id_idx|rhash|9|CREATE INDEX rhash_key_id_idx on rhash (key_id)
view|vhash|vhash|0|CREATE VIEW vhash as
  select
    rkey.id as key_id, rkey.key, rhash.field, rhash.value,
        datetime(etime/1000, 'unixepoch') as etime,
        datetime(mtime/1000, 'unixepoch') as mtime
  from rkey join rhash on rkey.id = rhash.key_id
  where rkey.type = 4
    and (rkey.etime is null or rkey.etime > unixepoch('subsec'))

With the liscense changes to redis there are several new forks out there. One that I am particularly interested in is redka.

curl https://i.jpillora.com/nalgeon/redka | bash
chmod +x redka
./redka database.db

We now have redis running on port 6379 that we can connect to with a redis client. And we have a sqlite database that we can inspect.

❯ sqlite3 database.db "SELECT name FROM sqlite_master;"
rkey
rkey_key_idx
rkey_etime_idx
rkey_on_type_update
rstring
rstring_pk_idx
vstring
rhash
rhash_pk_idx
rhash_key_id_idx
vhash

We can look at the values in the vstring table.

sqlite3 database.db "SELECT * from vstring;"
1|hi|hello there you||2024-04-17 01:46:26

The main system that I am concerned about is my arch BTW machine. I found a great article 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.">paru, and I am good.

paru -Qii zx

AUR.">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
├─bash-language-server
├─blinksocks
├─bower
├─browserify
├─coffeescript
├─dot-language-server
├─emscripten
├─eslint
├─eslint-language-server
├─eslint_d
├─gitlab
├─gnomon
├─grunt-cli
├─gtop
├─gulp
├─hedgedoc
├─jake
├─markdownlint-cli2
├─marked
├─marked-man
├─matrix-appservice-irc
├─modclean
├─node-gyp
├─nodejs-emojione
├─nodejs-material-design-icons
├─nodejs-nopt
├─nodejs-source-map
├─nodejs-yaml
├─npm
├─openui5
├─pm2
├─prettier
├─pyright
├─rapydscript-ng
├─s3rver
├─semver
├─serverless
├─stylelint
├─stylus
├─svelte-language-server
├─tailwindcss-language-server
├─ts-node
├─typescript
├─typescript-svelte-plugin
├─uglify-js
├─vscode-css-languageserver
├─vscode-html-languageserver
├─vscode-json-languageserver
├─vue-language-server
├─vue-typescript-plugin
├─wasm-bindgen
├─web-ext
├─wrangler
├─yaml-language-server
├─yarn
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. ⭐⭐⭐⭐⭐ References: [1]: https://changelog.com/master
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. References: [1]: https://markdowndown.vercel.app/ [2]: /html/
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. References: [1]: https://arstechnica.com/gadgets/2024/04/boston-dynamics-debuts-humanoid-robot-destined-for-commercialization/
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 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-robot-destined-for-commercialization [5]: https://markdowndown.vercel.app/ [6]: /html/

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`.
    -g, --prereleases                  Use prereleases to compare template VCS tags.
    -l, --defaults                     Use default answers to questions, which might be
                                       null if not specified.
    -n, --pretend                      Run but do not make any changes
    -q, --quiet                        Suppress status output
    -r, --vcs-ref VALUE:str            Git reference to checkout in `template_src`. If you
                                       do not specify it, it will try to checkout the
                                       latest git tag, as sorted using the PEP 440
                                       algorithm. If you want to checkout always the
                                       latest version, use `--vcs-ref=HEAD`.
    -s, --skip VALUE:str               Skip specified files if they exist already; may be
                                       given multiple times
    -w, --overwrite                    Overwrite files that already exist, without asking.
    -x, --exclude VALUE:str            A name or shell-style pattern matching files or
                                       folders that must not be copied; may be given
                                       multiple times
![[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
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> References: [1]: https://docs.k3s.io/upgrades/manual

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. References: [1]: https://changelog.com/news/90
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;" 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

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

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) References: [1]: https://15r10nk.github.io/inline-snapshot/

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. References: [1]: https://github.com/nalgeon/redka