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/
Posts tagged: thought
All posts with the tag "thought"
880 posts
latest post 2026-07-21
Publishing rhythm
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/
-
Fantastic interview with Uncle Bob, really it was more of a 2 way conversation. So many of Uncle Bob’s takes have been taken out of context, its cool to hear some of the well actuallys, and the experience behind some of the reasoning.
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
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/
![[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