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.
Published
All published posts
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.
I had a boot issue on my sons fresh ubuntu 24.04 install and journalctl came in clutch.
ProblemType: Bug Distr…
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
...
Super neat tool to convert html to markdown
>>> import html2text >>> >>> print(html2text.html2text("<p><strong>Zed's</strong> dead baby, <em>Zed's</em> dead.</p>")) **Zed's** dead baby, _Zed's_ dead.
It even plays nicely with rich.
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.
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.
...
A full list of standard Accept types.
This is a handy reference.
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.
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.
This page shows how to customize your fastapi 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...
Joe has a sick cli.labs site for deploying tui applications.
html 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.
The htmx response-targets extension allows me to respond to errors from the backend and do normal htmx swaps.
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.
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
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.
To allow access only to the
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.
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.
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.