nice dataset to use for example / test projects. I'm using it to play with duckdb currently.
-
@waylonwalker
Yesterday
hotel_bookings.csv
https://www.kaggle.com/datasets/ahmedsafwatgb20/hotel-bookingscsv?reso ... -
@waylonwalker
2 days ago
The State of Secrets Sprawl 2025
https://blog.gitguardian.com/the-state-of-secrets-sprawl-2025/Good report, make notes later
-
@waylonwalker
3 days ago
Mill-Max Hotswap Sockets (0305, 7305, & 3305) ...
https://keeb.io/products/mill-max-hotswap-sockets?variant=323771675116 ...looking into trying these Mill-Max pins on a handwired 3d printed build to see if I can get away from specialty hot swap sockets. Damn they aren't exactly cheap, I really want the nice short ones but they start at $20 per 60ct and you need two per key, that adds up quick.
-
@waylonwalker
3 days ago
r.jina.ai
https://r.jina.ai/jina reader is a pretty sweet tool to convert a site to ai compatible text. There are other web to markdown types of tools, but the convenience of just adding r.jina.ai to the front of any page makes it so easy to grab for one page of docs.
-
@waylonwalker
4 days ago
Why did Framework build a desktop? - YouTube
https://www.youtube.com/watch?v=zI6ZQls54Msthe racked up 4 framework mainboards sound wild. connected with usb4 and 5gig ethernet. they said they can run big models quantized down from 600Gb to within the 512GB limit they have. This seems wild to bring this level of capability to such a low price point. It will be really cool to start to see demos come out.
-
@waylonwalker
14 days ago
PyApp
https://ofek.dev/pyapp/latest/I think I'm getting really close to having a good workflow setup for using pyapp. Such an amazing project to allow developers to create applications in python without passing on the hassle of python and managing installs to the user.
-
@waylonwalker
15 days ago
(154) CSS Battle - Re-create an Image with CS ...
https://www.youtube.com/watch?v=B32NKRKJ_CcWatching Wes fiddle through this with what a sane person would write in a normal day application and not applying the tricks for this kind of battle is how I feel when trying to do leetcode.
-
@waylonwalker
16 days ago
Ergonomic Laptop — Evan and Katelyn
https://www.evanandkatelyn.com/blog/ergotopThis is such a cool idea, I tend to not use laptops at all because they are so uncomfortable I just wait till I'm back at my desk. This solves two main issues I have with laptops, the posture to use them is shit, the keyboards that come on them is not what I want to use. I've solved the latter with my own custom keyboard.
-
@waylonwalker
21 days ago
OpenTools | The open MCP server registry
https://opentools.com/OpenTools is an index for mcp servers to work with new agentic workflows like roo code and windsurf.
-
@waylonwalker
21 days ago
(149) I Made My Own JBOD Enclosure For CHEAP ...
https://www.youtube.com/watch?v=QGkqwdM0L6g&t=781sI really like this idea for a homelab jbod. Hardware Haven builds out Just a Bunch Of Disks using some pretty affordable hardware and has up to 16 disks added to his homelab with the os having full access to use with zfs.
-
@waylonwalker
23 days ago
XCMKB: ZMK/Bluetooth Boards
https://xcmkb.com/pages/zmk-bluetooth-boardsNice overview to getting started in zmk
-
@waylonwalker
26 days ago
Mantis Clamp by zuberio | Download free STL m ...
https://www.printables.com/model/48505-mantis-clamp/filesZuberios Mantic clamp, would ya look at it. This thing looks like a handy tool for soldering. Excited to give it a try.
-
@waylonwalker
26 days ago
(144) The 3D Printed Mantis Clamp! #3dprintin ...
https://www.youtube.com/shorts/a8uzENYZ72kDamn this looks good, I've been casually keeping my eye out for something like this for quite awhile, I think this will come in handy for keeb builds. Printing one out as I post this, damn I love 3d-printing.
-
@waylonwalker
27 days ago
There are many Style Guides but this is Mine— ...
https://www.zachleat.com/web/style-guide/Zach's site looks sick colors are all on point, the fonts are so good. I really like the idea of a style-guide. I think I might be renaming my [[ sample ]] post to style-guide now.
-
@waylonwalker
27 days ago
python-build-standalone/.github/workflows/rel ...
https://github.com/astral-sh/python-build-standalone/blob/main/.github ...Astral uses just in CI, kinda cool to stumble into this setup in the wild.
run: just release-run ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.sha }} ${{ github.event.inputs.tag }}
And her is the accompanying justfile. you can see how it accepts arguments, and starts calling out to other just recipes.
release-run token commit tag: #!/bin/bash set -eo pipefail rm -rf dist just release-download-distributions {{token}} {{commit}} datetime=$(ls dist/cpython-3.10.*-x86_64-unknown-linux-gnu-install_only-*.tar.gz | awk -F- '{print $8}' | awk -F. '{print $1}') just release-upload-distributions {{token}} ${datetime} {{tag}} just release-set-latest-release {{tag}}
-
@waylonwalker
27 days ago
fix double slash in url · WaylonWalker/waylon ...
https://github.com/WaylonWalker/waylonwalker.com/commit/93ca7da6dd3710 ...fixing more ahrefs issues on the road to fixing all major issues within my control I found a ton of urls pointed to an url with a double slash, turns out I wasn't properly referencing slug with post.slug.
-
@waylonwalker
27 days ago
fix json schema · WaylonWalker/waylonwalker.c ...
https://github.com/WaylonWalker/waylonwalker.com/commit/deebd400e638bf ...I found that I had Structured data has schema.org validation error on essentially every single page on my blog, turns out I had made some changes and have never tried to validate it. Damn json and its hatred towards trailing commas.
-
@waylonwalker
27 days ago
Weblogging: Part 1 – David Bushell – Web Dev ...
https://dbushell.com/2024/12/09/weblogging-1/Long live RSS! Rss is not dead David, you are right there. I really agree with David that learning a topic well enough to form thoughts and write about it really help learning. You don't need to be an expert, but forming your own thoughts, putting ideas in words takes a lot more than surface level knowledge. When you try to write or speak about something you quickly realize where your holes in understanding are.
Blogging helps me learn. When I commit knowledge to writing it reinforces what I know and shines a spotlight on what I don’t. Most topics require additional research. Even then, I occasionally get things wrong, or miss different ways of thinking, and I welcome corrections. I’ll often update and enrich my posts based on feedback. Without my blog I’d miss other points of view.
As they say, the best way to get an answer on the internet is not to pose a question, but to assert the wrong solution! Most feedback I get is constructive. Sometimes it’s blunt but I try not to read into unspoken sentiment. Some people are more direct. If the end result is positive learning, I can take a hit or two.
-
@waylonwalker
27 days ago
fix: Open Graph URL not matching canonical · ...
https://github.com/WaylonWalker/waylonwalker.com/commit/0fd994b0101f72 ...In fixing a bunch of meta tags, I introduced Open Graph URL not matching canonical on every page by having trailing / on canonical and not on the
og:url
.This commit will fix the error.
-
@waylonwalker
28 days ago
Cotton Coder – David Bushell – Web Dev (UK)
https://dbushell.com/2024/01/24/cotton-coder/I like Davids idea for cotton coder here, reminds me a lot of [[ thoughts ]], which turns out to be mroe commonly called a linkblog. I can relate to David heavily on gathering too many side projects and soem collecting more digital dust than you would really like them to. I use thoughts for quick publishing, very similar to David's notes. I have tags and titles, but the titles are a reflection of the post I'm taking a note on. They are short and sweet, I put just enough thought into them without overthinking them. They live as a separate server hosted website, but the data gets pulled into my blog at build time, so they end up in the same place eventually.
-
@waylonwalker
28 days ago
valkey-io/valkey: A flexible distributed key- ...
https://github.com/valkey-io/valkeyvalkey appears to be the largest open source fork of redis that was forked just before their transition to the new source available licenses.
One notable thing missing from the readme is how to run with docker, which I saw in the valkey-py docs.
docker run -p 6379:6379 -it valkey/valkey:latest
You can install the python library with
python -m venv .venv . ./.venv/bin/activate pip install "valkey[libvalkey]"
-
@waylonwalker
28 days ago
valkey · PyPI
https://pypi.org/project/valkey/python bindings for valkey, forked from redis.
one notable difference I see from redis is that you can install with libvalkey to autmatically get faster parsing support.
For faster performance, install valkey with libvalkey support, this provides a compiled response parser, and for most cases requires zero code changes. By default, if libvalkey >= 2.3.2 is available, valkey-py will attempt to use it for response parsing.
pip install "valkey[libvalkey]"
-
@waylonwalker
29 days ago
Fragmentions - linking to any text
https://www.kevinmarks.com/fragmentions.html#%22eventually%20every%20U ...I can't believe I've never see this Tim Berners-Lee quote, but I can't unsee it and will be required to reference it from now on.
eventually every URL ends up as a porn site
I had a friend let his blog domain expire, within a short period it was scooped up and was hosting porn. I don't know why, but my best guess is that they were holding it ransom with the most embarrassing content to have your personal site replaced with.
-
@waylonwalker
29 days ago
hype cp | Hypermedia Copy & Paste
https://hypecp.com/This is a super cool reference for htmx snippets. I really like how he has a couple of errors on the page as examples with examples that fix these common errors.
-
@waylonwalker
30 days ago
Chris Coyier
https://chriscoyier.net/2024/03/03/11148/Interesting thoughts here on blog post titles, do we need them? They are so ingrained into everything.
It makes me think about markata.dev. I don't require you to add any meta data to your post, you don't need a title at all, but you do have to name a markdown file, and this does end up being your title if you don't set one.
Titles are a lot of pressure! I think there is a reason that the big text-based social networking sites (Mastodon, X, Facebook, Threads, LinkedIn, Bluesky, etc.) don’t have titles. Especially for short posts, the title just isn’t necessary. Just say the thing.
Interesting observation what rss readers do without one.
My own favorite[rss reader], Feedbin, shows the author of the post as the title if it’s missing. Eh, not great not horrible.
Hilariously he puts a title on the OG image for the post. I was interested in seeing what would happen in signal, it appears to be showing the author name as well.
Confirmed the page has no title
or does it?
It makes me wonder where Signal gets this title is it from the title block or the site_name meta data
-
@waylonwalker
30 days ago
AI workloads on Talos Linux - Sidero Labs
https://www.siderolabs.com/blog/ai-workloads-on-talos-linux/cool article for setting up talos linux with an nvidia gpu. What a wild world it we are living in where these devices that started out being only for hardcore gamers are becoming commonplace in servers and slowly entering the homelab space.
-
@waylonwalker
30 days ago
(141) Proompted Kiddies Learning The Hard Way ...
https://www.youtube.com/watch?v=eNIBie_uYMIDamn prime makes an interesting point near then end of this video. He's seen a bunch of people able to just throw down charts and shit at their company and end up being "the coding guy" cause they proompted something once. In a way I can relate, I got into software in a similar way, but at a time that it took a lot more hard work, understanding , and copy past from the right stack overflow. Based on some of the people around me at the time I can only imagine how some people must feel like they got pushed into it without wanting it, and now are building something they don't know anything about with no care about it or care to build any expertise. Is the future proompted charts from enterprise chatgpt or do we only continue growing more need for software from here.
-
@waylonwalker
35 days ago
Colors - Core concepts - Tailwind CSS
https://tailwindcss.com/docs/colorsTailwind has the best color system, very well done. Even if you don't use it, it serves as a great color picker.
-
@waylonwalker
35 days ago
Don't Starve Together Forever world
https://wyattbubbylee.com/dst-forever-world/So proud of Wyatt for writing in his own blog!
-
@waylonwalker
36 days ago
(131) Developer Productivity, v2 with ThePrim ...
https://www.youtube.com/watch?v=03KsS09YS4EBig fan of Primes setup. I was not far off of his setup before he really came on the scene, but I've picked up a ton of nuggets from him and how he operates. I took his first developer productivity course on Front End Masters as it came out.
It is interesting to see him roll back his ansible scripts for bash scripts here. I converted my setup to ansible after watching his first, but have also since rolled back to bash scripts for quite similar reasons. Ansible is great for remote tasks that need to be done on a fleet of machines, but like he says here overkill for this purpose and ends up something that you need to read the docs for every change to your dotfiles.
Unlike prime I've really leaned harder on installing everything in a docker image and developing out of a docker image. I've long built docker images of my dotfiles with the idea that its nice to be able to just use them on other machines, but it rarely happened.
In the past year I've moved bazzite, an immutable distro. It comes with podman and distrobox, so I install very little on it, a few flatpaks from the store for brave and signal, but most of what I really use day to day comes from my devtainer. It's nice that I really have one install target for all of my scripts so they become quite stable. I don't need to worry about arch vs ubuntu vs fedora, no matter where I am its the same base image.
I've also really started to lean on kubernetes, it is so useful to just be able to start a pod in k8s using the same exact develop setup as I would have locally. Nothing needs installed, I can just bring my dev setup to the cluster where the network and data I might need to debug is.
-
@waylonwalker
38 days ago
Jhey ʕ·ᴥ· ʔ: "breakin' down classics CSS back ...
https://bsky.app/profile/jhey.dev/post/3lgoev36hps2hJhey has the coolest webdev demos!
-
@waylonwalker
39 days ago
Fix VERSION_OR_CIPHER_MISMATCH · Cloudflare S ...
https://developers.cloudflare.com/ssl/troubleshooting/version-cipher-m ...Today I learned that cloudflare free tier universal certs do not support multilevel subdomains.
By default, Cloudflare Universal SSL certificates only cover your apex domain and one level of subdomain.
-
@waylonwalker
39 days ago
Migration guide for config loaders — kedro 0. ...
https://docs.kedro.org/en/stable/configuration/config_loader_migration ...Migrating from kedro 0.18.4 to the latest version involves handling the deprecated OmegaConf loader. Switching over does not look as bad as I originally thought.
- installing kedro 0.18.5+
- set the CONFIG_LOADER_CLASS in settings.py
- swap out import statements
- config must be yaml or json
- getting values from config must be done with bracket
__getattr__
style not with.get
- any Exceptions caught from Templated config loader will need to be swapped to OmegaConfig exceptions, similar to #3
- templated values must lead with an
_
- Globals are handled different
- OmegaConfig does not support jinja2 sytax, but rather a
${variable}
syntax
-
@waylonwalker
41 days ago
Search: 5 results found for "box white" – Kai ...
https://www.kailh.net/search?q=box+white&_pos=2&_psq=white&_ss=e&_v=1. ...Prime mentioned on stream that Whites were his favorite switch. I tend to like lighter switches and want to give it a try. I really like my Durock lupine's at 55g, the box whites are 45g, that feels like it would take quite a bit more control, floating over the keys.
-
@waylonwalker
43 days ago
A Cinematic Aspect Ratio Guide for Every Film ...
https://nofilmschool.com/cinematic-aspect-ratioA good reference of common screen ratios. I just realized that 16:9 is also 1.78:1. I've been putting some images on my blog again, and thinking about using some 2.39:1 ratio on them.
-
@waylonwalker
43 days ago
(124) I Think I Love Deepseek R1 - YouTube
https://www.youtube.com/watch?v=GNHuJE_GARcThere is a glimmer of hope out there that normal people can scrap together enough gpu to really run the latest models themselves. The ui really appears to be having huge leaps forward such that doing things like rag is no longer such a research project that it was just a few years ago. So excited to see Prime go through this homelab exercise.
-
@waylonwalker
44 days ago
(124) RSS is dead - YouTube
https://www.youtube.com/shorts/epQr2kF-1bUOh, this kills me to hear it. RSS is the OG way to subscribe and share content out to others. It gives you control of what you subscribe to and reminds you when new content lands on your favorite sites. It is a huge component of web 1.0 and I feel is the most decentralized social media can ever hope to be.
-
@waylonwalker
44 days ago
Behold, the Steam Brick | Rock Paper Shotgun
https://www.rockpapershotgun.com/behold-the-steam-brickI fully believe in our right to repair, ewaste reduction, and bringing a second life to still good hardware that is not up for it's originally intended purpose. This is a sick console like experience you can strap to the back of a tv, throw in your back to take on a trip, or leave stuffed in your vehicle to game in the backseat. Sucks that it cant do 4k, but I've used mine on large screens, and it does quite well for a lot of games, maybe not AAA, but the cartoony multplayer games I play with my kids do quite well.
-
@waylonwalker
45 days ago
(123) OpenAI Is Actually Terrible - YouTube
https://www.youtube.com/watch?v=2D9ON1ZQhnA&t=359sDamn these deepseek memes go hard. Wild to see openai get played by their own game.
It's crazy that the normie news that I have seen on deepseek shows that the Chinese made what the Americans did at a fraction of the price, without taking notice that they are building on the shoulders of openai.
-
@waylonwalker
45 days ago
(123) AI Is Making You An Illiterate Programm ...
https://www.youtube.com/watch?v=cQNyYx2fZXw👏👏👏 This one is really good. I'm right there with him on most of this. I am very hesitant on subscription models, and all the ai tools feel like they are getting ready to be the next round of death by a thousand cuts, this time with pretty limited free tier and relatively high prices to run. I'm sure we will see companies get taken by huge bills soon by building off of someone else's service.
On the flip side I'm definitely the guy that gets in a rut of just copy paste to the ai, wait for codeium to to inject. I feel like I have issues of momentum more than anything. When I'm on one side or the other I tend to stick it out for too long, but less so on going without because that llm drug is calling you when you hit a hard problem.
I'm excited to see him build out a homelab for llm stuff that he mentioned at the top. I'm interested, but probably not building one out for myself until we start to see some cheaper maybe used hardware to do it.
-
@waylonwalker
46 days ago
(122) Why is Kubernetes everywhere? | Kelsey ...
https://www.youtube.com/watch?v=MQbkN99eBD8Kelsey says several times in this interview, you don't need kubernetes. If you are running one node you don't need kubernetes. My question though is, would you use kubernetes? Ya I get it if you are a web developer, data scientist, backend dev, but if you are looking to bee a whole ass engineer, or infrastructure engineer, you know kubernetes, Should you use kubernetes on single node?
-
@waylonwalker
47 days ago
Models - Pydantic
https://docs.pydantic.dev/latest/concepts/models/#rebuilding-model-sch ...I came accross from_attributes today it allows creation of pydantic models from objects such as a sqlalchemy
Base
Model or while nesting pydantic models. I believe in the past I have ran into some inconsistencies with nesting pydantic models and I'll bet one had from_attributes set and another did not.Arbitrary class instances¶ (Formerly known as "ORM Mode"/from_orm).
Pydantic models can also be created from arbitrary class instances by reading the instance > attributes corresponding to the model field names. One common application of this functionality is integration with object-relational mappings (ORMs).
To do this, set the from_attributes config value to True (see the documentation on Configuration for more details).
The example here uses SQLAlchemy, but the same approach should work for any ORM.
-
@waylonwalker
47 days ago
(120) If Mitchell Hashimoto succeeds, Tmux & ...
https://www.youtube.com/watch?v=o-qtso47ECkDang strong stance that tmux and zellij should not exist. I really do get his point though. Theres a good number of terminal features I often miss out on because I run tmux. Its an app that runs apps, and doesn't let all of the signals back to the host. But its fantastic at what it does, and brings so much to the table that the little bit of downside it brings is well worth it to me. The other thing missing in this discussion is that I can take my hotkeys and session workflow to any machine just by running tmux. I do not need to run a certain terminal, or install it headlessly on a server to get special features just for it.
-
@waylonwalker
53 days ago
Top Python libraries of 2024 | Tryolabs
https://tryolabs.com/blog/top-python-libraries-2024Really good listicle of new modern top python libraries from 2024. Very well done article with images, links, and an actually quality listicle with many things I've never even heard of.
-
@waylonwalker
53 days ago
Choosing color palettes — seaborn 0.13.2 docu ...
https://seaborn.pydata.org/tutorial/color_palettes.htmlGood overview of seaborn color palettes. They have all sorts of different types, some designed to purposfully give each color the same weight for catecorization. Some designd to give linear differences in value, some have a parabolic feel with a diverging nature.
-
@waylonwalker
54 days ago
poolers.postgresql.cnpg.io CRD metadata.annot ...
https://github.com/cloudnative-pg/charts/issues/325I've never seen or needed to use a serversideapply in kubernetes before, but I ran into this same issue in my k3s homelab while installing cloudnative-pg.
You can do it with argo
apiVersion: argoproj.io/v1alpha1 kind: Application spec: syncPolicy: syncOptions: - ServerSideApply=true
and you can do it with kubectl
kubectl apply --server-side --force-conflicts -f cnpg-1.25.0.yaml
-
@waylonwalker
55 days ago
Nerd Fonts - Iconic font aggregator, glyphs/i ...
https://www.nerdfonts.com/cheat-sheetNerdfont cheatsheet is a fantastic way to copy paste icons into your shell. I just used it to juice up my starship prompt with my current
$NVIM_APPNAME
managed by [[ nvim-manager ]] -
@waylonwalker
56 days ago
Manufacturer Recertified Drives | Enterprise ...
https://serverpartdeals.com/collections/manufacturer-recertified-drive ...For my next drive upgrade in my homelab I am gong to be using one of these factory recertified drives from serverpartdeals.com. Found them on an LTT video awhile back. They are some lightly used and recertified, fully burnt in drives.
Shop for drives that are certified once again by the manufacturer to work like new. Factory ReCertified drives are cost-effective alternatives compared to factory-sealed new counter parts. Additionally, unlike in mass production, the re-certification process involves closer attention to the overall operation of the hardware so that the re-certification will not have to happen a 2nd time
-
@waylonwalker
56 days ago
Releases · bootandy/dust
https://github.com/bootandy/dust?tab=readme-ov-filedust is one of my favorite rust rewrite tools. Its so useful for narrowing down file system bloat and cleaning up some disk space on your nearly full disks. It runs right in your terminal and gives you a nice bar graph on the top directories in use.
-
@waylonwalker
57 days ago
Keycloak
https://www.keycloak.org/Keycloak looks like an interesting way to setup sso. It's part of the cncf so it's got a good backing. I want something better for argo workflows and this might be it. I'm curious what else I can tie into it.
-
@waylonwalker
58 days ago
The Worst Thing You Can Do For Your Career - ...
https://www.youtube.com/watch?v=CVG6f1N0VT8Don't stop learning! Stop trying because you have a doomer outlook on ai, llms, industry and think they are taking over. If you have no hope for the future, if you stop now you are cementing in that you will be no good and the ai will be better. Many, maybe most of us in this industry go here by hard work, long nights of learning, trying to solve problems that our job had. If llms take over then the world is going to be a whole lot different, it will be a world you cannot predict or plan for. For now put your head down and succeed in the world we have today.
TEEJ has some great thoughts on this whole sentiment, put this on for you morning walk or whatever you do.
-
@waylonwalker
63 days ago
(110) The Future of HTMX - YouTube
https://www.youtube.com/watch?v=0rtpsJSLb44&t=624sI like the charts that Theo brings to to these videos. Shout out for a positive k8s reference and not shitting on it.
Htmx brings html/css just a bit further down the complexity graph with little to no extra effort, while react allows us to go all the way full complexity at the cost of build and dev complexity to go from zero to 100 as soon as its introduced.
htmx brings us back to the ease of jquery ajax without any complex swapping or json parsing, all of the object parsing and html templating is done in the backend, the front end just tracks where to put it. HTMX couples the frontend and backend much tigher, since all of the front end html is generated in the backend, done correctly it is not possible for the front end to get out of sync and try to do things that the back end does not know how to handle, vice versa.
-
@waylonwalker
63 days ago
Why I Write
https://brittanyellich.com/why-i-write/It's interesting how many people in tech maintain a blog. I think part of this brings us back to web 1.0 days when so many individual websites owned the web it was a free for all unindexed land and you got to own a small piece of it.
I agree with most of Brittany's points here I write a lot to keep my skills sharp, and to refer back to. Brittany mentions keeping all her old posts, even the cringy ones. I'm all with you here, I'm just wodering how you look back at anything you wrote in the past and not get a bit of that feel, maybe its just me, but I see cringe and mistakes gallore, but it all makes me better moving forward.
-
@waylonwalker
63 days ago
Availability
https://brittanyellich.com/note/availability/nice overview of availability measurements and what they really mean. The crazy world we live in today depends on so many things runnig, its also so hard to measure your uptime, The uptime metrics can mean a lot of different things. The site is up and accepting traffic, but can users make changes or submit orders, there is a lot more to it than just up or down. I really appreciate Brittany's story from Nike nested in there.
-
@waylonwalker
63 days ago
SuperMini nRF52840 Wireless Controller Develo ...
https://kriscables.com/supermini-nrf52840/The SuperMini nrf52840 is a sick controller for building keyboards, affordable, easy to get, and compact. Bluetooth and wired setup just works in zmk. This page has a nice image of the pinout.
-
@waylonwalker
64 days ago
Quick Start - kotaemon Docs
https://cinnamon.github.io/kotaemon/interesting UI for RAG based workflows, i.e. chatting with your documents. It looks like it can run a number of models, feels like ollama with RAG and a nice web ui.
-
@waylonwalker
65 days ago
Bluesky is more like Twitter than X is
https://joelhooks.com/blueskyBluesky is almost excatly like twitter was when I joined years ago. It's gone crazy lately bogged deep in politics, bots, and ads. I've seen like two scroll pages of ads in a row, its nuts. What I did not know before Joel pointed out here is that the feed I am looking at is my following feed, its only feed of people I follow in descending order. On bluesky you get to pick your feed!!! This feels like tweetdeck did back when we were able to run that. You could tune in search terms and save them it was glorious. Bluesky has some really interesting ones that you can use like popular with friends, only posts, my bangers, that have a pre defined algorithms.
-
@waylonwalker
65 days ago
(107) Why You Should Game on Linux (feat. Glo ...
https://www.youtube.com/watch?v=QwpTAk_IiyU&t=28sThis man is responsible for making gaming on linux what it is today. Such a heartfelt story to hear that reviving his dad's machine was at the core of what drove him to do what he has done for the wider gaming on linux community. Update on your schedule, remove all the tracking and bloatware, this is what drove him to start using linux before making it accessible for his Dad.
But really do update, this is not your 2002 PHP box, things need updated and regular updates help the process.
-
@waylonwalker
66 days ago
V2 suddenly getting client-not-enrolled today ...
https://devcommunity.x.com/t/v2-suddenly-getting-client-not-enrolled-t ...Just tried using my twitter api key for the first time in quite awhile. Apps now need to be tied to projects in order to work. It looks like projects are where pricing comes into play. Thankfully they still give a free tier for doing small time things for myself. You can really see the effect that llms have on these things though as it is 5x more expensive to read posts than to make posts currently. Data is the new gold for these kind of companies.
-
@waylonwalker
66 days ago
containers/podman-compose: a script to run do ...
https://github.com/containers/podman-composeWild that the podman-compose github readme calls out k3s as an alternative.
compose definitely has its place, especially for local development on a developers machine, its so much easier to stand up and get things like hot reload up and running smooth.
-
@waylonwalker
66 days ago
bic | Static blog generator, in bash
https://bic.sh/Intereresting someone built a blog generator in bash. it comes with normal markdown to html, static content, robots.txt, sitemap, rss, and tags. It uses pandoc to take markdown to html and mustache for page templates.
-
@waylonwalker
66 days ago
Animate to height: auto; (and other intrinsic ...
https://developer.chrome.com/docs/css-ui/animate-to-height-auto/Css is getting so good, new things like interpolate-size are making things that use to require some deep expertise and hacks intuitive and easy.
/* Opt-in the whole page to interpolate sizes to/from keywords */ :root { interpolate-size: allow-keywords; /* 👈 */ }
-
@waylonwalker
66 days ago
awesome-cursorrules/rules/py-fast-api/.cursor ...
https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/py-fa ...Looks like a great start to a rules file for fastapi.
- Place the happy path last in the function for improved readability.
I have never heard anyone say this. It feels weird to me. The other early return, find and handle errors early all make sense to me, but happy path last is new to me.
-
@waylonwalker
66 days ago
Generate Custom .cursorrules for Your Project ...
https://egghead.io/generate-custom-cursorrules-for-your-project-based- ...Really interesting way to generate a rules file for agentic workflows based on your current repo. John uses gitingest here, looks like a fantastic tool, but probably not useful for most private repos. I'm sure you can replicate the same thing in a private repo wtih a small amount of effort the few times you need to do it. gitingest looks like a great way to pull in some extra context for some open source dependencies that you have though.
-
@waylonwalker
66 days ago
cyclotruc/gitingest: Replace 'hub' with 'inge ...
https://github.com/cyclotruc/gitingestGitingest has a python package on pypi that you can run with uvx, and it accepts the same arguments as the web version, right in your terminal
⬢ [devtainer] ❯ uvx gitingest --help Usage: gitingest [OPTIONS] SOURCE Analyze a directory and create a text dump of its contents. Options: -o, --output TEXT Output file path (default: <repo_name>.txt in current directory) -s, --max-size INTEGER Maximum file size to process in bytes -e, --exclude-pattern TEXT Patterns to exclude -i, --include-pattern TEXT Patterns to include --help Show this message and exit.
-
@waylonwalker
66 days ago
Gitingest
https://gitingest.com/Replace hub with ingest in any github and get a prompt friendly codebase ready to feed into any llm. It combines the entire codebase, based on a gitignore style glob that you pass in, into a single TXT file.
-
@waylonwalker
67 days ago
olimorris/codecompanion.nvim: ✨ AI-powered co ...
https://github.com/olimorris/codecompanion.nvimDefinitely need to give codecompanion.nvim a try, it looks like a competitor to windsurf but in nvim. It looks so feature complete that its hard to grasp all of what it does.
-
@waylonwalker
67 days ago
(106) Cracking the Code | Open Sauce 2024 - Y ...
https://www.youtube.com/watch?v=9vSiP_ftyuQGreat panel of software folks at open sauce. It was interesting hearing from all these creators from the perspective of an open sauce panel.
-
@waylonwalker
67 days ago
WaylonWalker/nvim-manager: manage dotfiles wi ...
https://github.com/WaylonWalker/nvim-manager/releases/tag/v0.0.2New release out for nvim-manager that supports installing pre-configured distros. It's such a breeze to install these now, its been fun to go through each of them. The currently included distros are.
- LazyVim
- AstroVim
- kickstart
- NvChad
- LunarVim
-
@waylonwalker
68 days ago
Releases · WaylonWalker/nvim-manager
https://github.com/WaylonWalker/nvim-manager/releasesFirst release of
nvim-manager
is out. Your dotfiles change a lot, sometimes it's hard to manage all of the places you have installed them and potentially made hand edits to. nvim-manager allows you to easily make static releases of your dotfiles, and keep your nvim install from breaking by leveraging NVIM_APPNAME and pinned releases of your dotfiles stored in ~/.config. In this directory you might have many nvim configurations installed, nvim-manager automates the process of installing and updating from your dotfiles, while keeping previous pinned versions untouched. -
@waylonwalker
69 days ago
URL escape codes
https://docs.microfocus.com/OMi/10.62/Content/OMi/ExtGuide/ExtApps/URL ...Nice list of url escape codes. I did not actually know that to get a literal sequence like %2D you can use $2D.
-
@waylonwalker
69 days ago
GitHub - ngalaiko/tree-sitter-go-template: Go ...
https://github.com/ngalaiko/tree-sitter-go-templateThis setup fixed my nvim syntax highlighting in helm templates.
-
@waylonwalker
69 days ago
imagegenius/docker-immich: Monolithic (Single ...
https://github.com/imagegenius/docker-immich/imagegenius has made an immich all in one setup that looks much easier to use than immich.
-
@waylonwalker
69 days ago
Owning It · Matthias Ott
https://matthiasott.com/notes/owning-itI can say I had the same kind of feelings when I first saw something called "Own Your Web" being run in Buttondown. I totally get it. It takes time and effort to build your own stuff, email sending is hard, not done right ends you in the spam folder. There is something about the name though that I think needs to set an example and self host as much as it possibly can.
The changelog has covered this several times, do they need to go to the crazy lengths they do to run their site, no probably not, but it keeps them in the loop. They are using the tech they talk about in a very real and production critical way to run the show.
Cant wait to see more from ownyourweb.site
-
@waylonwalker
71 days ago
The weirdest controller I've ever used
https://www.youtube.com/watch?v=OrucAJknMysGyroscope better than a mouse?? Nerd nest really sells how having two gyros in the way they have done for noise cancelling changes the game on it, and makes it a contender to replace a mouse.
It really makes me want to try it. I love how repairable this controller looks. I've got to imagine that the fact that it comes as a kit, and all the parts are available that this hits S tier repairability. My current controller of choice is a PS5 and I've had stick issues I wish I could fix.
No analog triggers, I'm out. Maybe they will make it an option in the future idk. I don't play shooters where I need a hair trigger, this won't work on session or driving games.
micro usb, seriously, that kinda kills it for me too.
edit I looked on their website and they have usb c in the latest version
-
@waylonwalker
71 days ago
Postiz: The All-in-One Social Media Managemen ...
https://postiz.com/postiz looks like a very polished way to automate and schedule posts to all the social services.
-
@waylonwalker
71 days ago
gitroomhq/postiz-helmchart: Helm for Postiz
https://github.com/gitroomhq/postiz-helmchartReminder to myself, look into self hosting postiz with this helm chart later.
-
@waylonwalker
71 days ago
Realign – Chris Coyier
https://chriscoyier.net/2025/01/03/realign/Chris Coyier had a small re-align on his site, some good nuggets in here.
I like the idea of having a photo of myself prominently on the site, so you know who you’re dealing with here.
I really like this after thinking about it and I think I am going to make sure I get my face back on my posts. I do have my 8bit style pixel art image of me that I use on social media, but no real picture.
I feel like a lot of people redesign their entire website when it’s time to update to the latest list of social networks and I’m no different. Once you touch it you gotta keep going.
I can totally relate to this, once you open the thing, you get the build tools greased up, and your confidence high that re-deploying isn't going to mess something up, I tend to start digging in to other things.
-
@waylonwalker
72 days ago
About Me – Harry Roberts – Web Performance Co ...
https://csswizardry.com/about/#section:colophonI've only recently learned what colophon means, and I really like to read through site that use it. If you don't know its about how the site is built. I've always liked peeking under the hood of things to understand how they work, it's what turned me towards an engineering degree.
I love how he mentions that he chose the name when he was 17 and he is stuck with it. I particularly like the name, it has something special to it. Hats off to you for doing something that has lasted so long for you. I fully understand though, I have projects that I made a year ago that I think why did I name it that. At the same time when I try to think of a name I end up with the I don't have anything good and I'd rather build the thing so fuck it, its going to be what it is.
-
@waylonwalker
72 days ago
Using Obsidian as a Gaming Backlog Library
https://bryanhogan.com/blog/obsidian-gaming-backlogVery interesting way to catalog games, I need to make a catalog of mine, I'll probably start adding some blog entries for games I'm in and have completed. Wonder if there is a way to hook into steam with python to get achievements and progress live.
-
@waylonwalker
72 days ago
Harry Roberts: "📡 I’ve been writing a lot lat ...
https://bsky.app/profile/csswizardry.com/post/3lckq4qo6zs22Tons of cool people came out with their rss feeds here, again will need to browse more closely later.
-
@waylonwalker
72 days ago
myRSS/personal-blogs.xml at master · sturobso ...
https://github.com/sturobson/myRSS/blob/master/personal-blogs.xmlSturobson has a ton of rss feeds here, I recognize quite a few, will definitely need to poke at some of these later.
-
@waylonwalker
72 days ago
Own Your Web • Buttondown
https://buttondown.com/ownyourwebI'm a sucker for good own your own shit on the web blogs, and Matthias Ott has a top notch one here. The archive has been a great read so far, I've discovered things like slashpages.net.
-
@waylonwalker
72 days ago
Fork Around And Find Out | Remaining Authenti ...
https://share.transistor.fm/s/a9e41e15What a great first guest for FAFO. Kelsey is always such a great listen. He talks about killedbygoogle and how engineers get no incentive to work on old projects, google had no incentive, and you got the thing for FREE in the first place. He talks about end of career and having love you money, having so much in the bank you can say no. If you are presented with a project that does not align with your values you can say no.M
Justin even mentions how Google has more killedbygoogle projects than Amazon has total projects.
If we knew how hard it would be, we would never build it.
Autumn's Fav quote from ep1 of shipit
-
@waylonwalker
73 days ago
Changelog • Robb Knight
https://rknight.me/log/Well done changelog with some really good inspirational nuggets. Many slash pages I want to check out and an 11ty contribution graph.
-
@waylonwalker
73 days ago
slash pages
https://slashpages.net/A nice list of slashpages you might want to consider including / aliasing / 301ing. These feel like nice things to setup and keep in the back pocket for obsidian style wiki link to easily. I get kinda bad at wiki-linking as much as I would like to, mostly because it does require some amount of work to make the page, and keep it up to date over time, then remember that you even have it.
Some are serious, some very common, some quite useful.
-
@waylonwalker
74 days ago
(102) We need to have a talk... - YouTube
https://www.youtube.com/watch?v=_VQl_HTk9PM&t=2607sTheo does a fantastic history of serverless here.
Kubernetes shit
Theo can't have an infra video without shitting on k8s. Specifically people who have never touched k8s pushing fear of k8s to large audiences of people who have never touched k8s. If you are a webdev who solely lives in webdev space and never touches as much as a dockerfile listen to him. If you touch infra at all try it before you take his opinion at face value.
Serverless shines in high variance
If you plan on having traffic spikes 10x your regular traffic for something like black friday, serverless might be right for your use case.
stateless programming
He argues that targeting a stateless deployment of serverless leads to better code. I'd like to see more examples here. Maybe most of the code bases I work on already do this. I've never targeted a serverless deployment, but I've targeted horizontally scaled deployments many times and they feel like they have the same targets. For instance if I spin up 8 pods for my application or uvicorn with 3 workers I have to target statelessness, all of the state must live in the database and cannot live in memory. Even if I target 1 instance in a containerized environment I have to be ready for restarts at any point in time.
I might be missing something here, but I don't see how this point applies to serverless.
Scale to Zero Services
https://www.youtube.com/watch?v=_VQl_HTk9PM&t=2607s
Companies that can run on scale to zero can allow your shitty side projects that have no users run for free indefinitely because it costs them nothing. He compares planetscale running mysql vs Turso running SQLite stored in s3.
Everything he covers is really cloud to cloud
He compares early deployments of LAMP and MEAN stack running on one server then jumps to serverless. It feels like he is missing the angle of owning your own hardware. This might just be the experience difference between theo and DHH. DHH works on one focused company, Theo is jumping around between startups.
Ok I get some of it
At the end he covers a dumb side project that has branch deploys. It had a 100s of deploy still running, some very old, some never even touched, vercel can do this because it costs them nothing if its not running. What I didn't think about right away is that there is probably a backend component to this.
In my python backends I often have deploy environments, but since they don't scale to zero they have at least some cost even if its small, with this I cannot just keep hundreds of them running because that cost would add up.
I would argue that this is hardly useful, because you can checkout any old version and run it locally, and you rarely are going to need to poke through these old branch deploys. But in that case that you need to quickly do this serverless is definitely superior.
-
@waylonwalker
74 days ago
linkding | linkding
https://linkding.link/linkding looks like an interesting alternative to thoughts. Thoughts is focused on the note being a value add tweet length blog post that you share to the public. This seems more focused on fire and forget with some note taking and search ability. I should definitely level up the search and tag discovery in thoughts.
-
@waylonwalker
2024
Wrapping your favorite CLI in neovim - YouTub ...
https://www.youtube.com/watch?v=rerTvidyz-0&t=160scool video on expanding vim with cli.
piping commands into vim
write a healthcheck
-
@waylonwalker
2024
Why Your Backend Shouldn't Serve Files - YouT ...
https://www.youtube.com/watch?v=aybSXT9ZJ8wLane from boot.dev madde this fantastic video about serving files on the internet. It has me wondering if I need to rethink a few of my things that I have built. I have a few things I am serving media from, but I have very aggressive cloudflare cache rules on them, so each file should only be uploaded about once per year.
My problem going straight out of minio right now is how do i set headers for cache control on it. If I can't set the cache control and everything is coming out of minio this does not solve my problems.
I went back and played with presigned urls and you can in fact control and set response headers, this is definitely the way and I have been wrong.
-
@waylonwalker
2024
curl with partial files | daniel.haxx.se
https://daniel.haxx.se/blog/2024/12/30/curl-with-partial-files/This is a cool new feature coming to bash, I can't think of a use case I have out of the gate, but it looks cool. I'm thinking this might be good to keep in the back pocket for something like CI where I don't have a hightly tuned bashrc file, and I want a dynamic curl request based on some state that exists as a fille.
-
@waylonwalker
2024
The beautiful sentence that is the web
https://cassidoo.co/post/web-dev-sentence/Nicely worded Cassidy! Javascript can be too much, it can bog down low powered devices, we can ship so much that its untenable on poor connections. It can be argued that its a bad language and putting it on the server is a mistake, but it brings sites to life. It makes it possible to extend the static nature of html/css with just a little special spice only your site needs.
I'd add to the argument that a lot of js should go away over time. Over time libraries such as jquery have fallen out of use, not because they are bad, or have been replaced by new libraries, but because the browser has adopted most of the functionality that jquery brought.
As a primarily python dev I'd really like to see htmx die a very similar graceful death. There have been several iterations on this idea, and the crux of it is very similar, give the ability to use HTTP verbs right inside html with some instruction of when to apply them and what to apply them to.
No js should not go away, it never will, we will always find new patterns that the browser should take, sites will always need a small bit of spice to bring them to life.
-
@waylonwalker
2024
Teleport to coop partner | Hypixel Forums
https://hypixel.net/threads/teleport-to-coop-partner.2250505//p warp will warp your party to your current server in hypixel skyblock
-
@waylonwalker
2024
How to configure base url for all requests us ...
https://stackoverflow.com/questions/69456875/how-to-configure-base-url ...Today I learned how to configure the baseurl for htmx using the
tag. This is pretty handy to be able to configure different baseurls. <base href="<scheme>://<netloc>/api/v1/"> <button hx-post="clicked" hx-trigger="click" hx-target="#parent-div" hx-swap="outerHTML"> Click Me! </button>
-
@waylonwalker
2024
Addy Osmani: "Tip: Chrome DevTools can overri ...
https://bsky.app/profile/addyosmani.bsky.social/post/3lei5jhkgdk2kWTF, you can just change a server response from devtools and update a vuejs app? Just tried with htmx, and my GET requests are not showing up in the sources tab. I'll keep this in my back pocket for next time I'm supporting a vuejs app though.
-
@waylonwalker
2024
Gary Vaynerchuk: "2025 : the year of action … ...
https://bsky.app/profile/garyvee.com/post/3leidcd6xjk2yGary Vee, is the goat. leaving this image as a reminder for myself
-
@waylonwalker
2024
Ellie Huxtable: "Atuin v18.4 is out now! Incl ...
https://bsky.app/profile/ellie.wtf/post/3lecj36r5ps2xAtuin v18.4 is out with an atuin wrapped command.
Here's Ellie's Wrapped.
This is a pretty sick command, I've only been using Atuin about as long as I've been on bazzite, so maybe 4 months, but here is my wrapped.
Comparing to Ellie, I'm surprised that I even have 126 package related commands, being on an immutable distro most of my packages come from the container, I don't need to run packaging commands. My cd is also super low, I use tmux sessions to take me where I need to be most of the time, which is a project's root directory, It's pretty rare to see me outside of a project root directory.
I'd venture to guess that nvim would be higher if it didn't auto start on every tmux session as well.
-
@waylonwalker
2024
(100) Hybrid Cloud Show – Episode 20 - YouTub ...
https://www.youtube.com/watch?v=IXUtIXYjFDMRed Hat has donated the whole open alternative to docker to the CNCF, the hosts weigh in with thier opinions all being pretty positive as they seem to be a legitimate donation and not dumping crap on open source.
- podman
- podman-desktop
- buildah
- compose-fs
- podman
- bootc
- scopio
Personally I've been running podman exclusively at home since switching to Bazzite in August. I'd like to use buildah in ci. I gave it a try, but was unable to swap out my use of kaniko for buildah, I will get there, but it was not quite as drop in as I wanted.
-
@waylonwalker
2024
are we cooked w/ o3? - YouTube
https://www.youtube.com/watch?v=kjOxkPl3RGoHoly shit these AGI models are incredibly expensive to run, require lots of wild hardware that there is not enough to go around, and requires shit tons of power to run.
Now more than ever is time to distinguish yourself with deep expertise, jack of all trades is being eaten by ai. People with deep expertise are getting a jack of all trades bump from ai, not o3, just the regular stuff.
-
@waylonwalker
2024
Getting a Dev Job in 2025 - YouTube
https://www.youtube.com/watch?v=2PiM2e4RtTgTheo weighing in on the 2025 job market. It's no 2018 out there right now, the ratio of jobs to engineers in the market has flipped big time. Theo as usual really focuses on community, being in a community, and being a good citizen. At the end of the video Theo weighs in on his experience hiring, and generally it starts with we need someone to do x does anyone know someone, then goes to a more formal internal post, then more formally asking internally does anyone know someone, then maybe to his community, and if he really still needs the person it might become an external post. These days there are so many good engineers on the market that very few good jobs actually get a posting for in his opinion.
-
@waylonwalker
2024
kitze 🚀 on X: "holy fk I thought package.json ...
https://x.com/thekitze/status/1872267874842063223?t=zxq6-kA9atVuXJeWnt ...kitze hating on python packaging in new ways. Python packaging has a lot of quirks that can make it infuriating. Not once have I thought "you know what this needs, quotes and braces"
-
@waylonwalker
2024
(98) Custom Gridfinity Bins For ANYTHING! - Y ...
https://www.youtube.com/watch?v=_TtkaIe0ZKU&t=409sThis tip of using tinkercad to do boolean operations on an stl of a solid gridfinity bin and an outline is absolute fire 🔥🔥🔥. This feels like a relatively simple operation, but to do it to a generated stl proves hard to do in most modeling software, at least harder than it needs to be. Somehow tinkercad got it right and made it a very basic operation to do.
It took me a minute to find the Merge button that Uncle Jessy mentioned, they call it a group in TinkerCAD.
-
@waylonwalker
2024
(98) Ubuntu Summit 2024 | UMU - A unified too ...
https://www.youtube.com/watch?v=iuBzGked-JU&t=559sDamn Glorious Eggrolls is still making gaming on linux better. Of course its containerization that drives everything on linux these days. This is a pretty badass talk. Umu is already running in steam and bazzite. Bazzite gamemode uses this to get a gamescope session running.
-
@waylonwalker
2024
(98) 4 Tips for Building a Production-Ready F ...
https://www.youtube.com/watch?v=XlnmN4BfCxwGreat list of 4 tips for running fastapi applications.
Keep routes small
Fat routers with all of the logic built in makes them hard to test, hard to refactor, causes lots of duplication, and makes it hard to reuse the business logic code later in something like a cli application.
Deploy Early
I really like this advice! He reccommends deploying as early as you can get a healthcheck live in your application. I've found too many times developers build something that is really hard, or impossible to deploy, when if they had tried to deploy early they would have spotted some easy to fix issues. This is less important if you are building out of a template that your team commonly deploys from, but very important with new patterns.
-
@waylonwalker
2024
Building Python tools with a one-shot prompt ...
https://simonwillison.net/2024/Dec/19/one-shot-python-tools/This is really interesting, the lazy uv scripts are really becoming quite appealing, especially for something like this to just pop out of an llm ready to run. The article features several examples of these one-shot prompt ideas that I suggest you give a try, and a prompt for creating them.
-
@waylonwalker
2024
Status | Depot
https://status.depot.dev/Depot's uptime seems to be great. I definitely hit some issues with it this afternoon 12/24/24 that were not reported. I wonder if my issues were with the fly integration. Maybe fly ran out of credits to depot or something.
-
@waylonwalker
2024
Deploy to Fly using a Depot builder
https://depot.dev/blog/how-to-build-with-depot-on-flyHere the integration to depot appears to be opt in using the
--depot
flag onfly deploy
. This must have changed over time though because today it was giving me issues and I had to opt out usingfly deploy --depot='false'
. Looks like a great service and I just learned about them on their bad day. -
@waylonwalker
2024
Depot
https://depot.dev/Just learned about depot today ironically because it seems to be down and fly is using them under the hood to do the container builds, seems like a really great service for fast builds accross your team.
-
@waylonwalker
2024
(91) Cursor + Windsurf Settings to 5x AI's Ou ...
https://www.youtube.com/watch?v=aG-utUqVrb0This was an eye opening video into agentic editing workflows.
setting rules
Dfferent ai tools use different rules files, windsurf uses .windsurfrules.
testing out rules
Test out your rules file by having it say something at the beginning of the output to verify that the rules are being applied correctly.
First line
He suggests to use this key rule for debugging purposes, otherwise you are guessing to what rules if any it is following.
Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.
-
@waylonwalker
2024
Dedicated Servers | Intel Servers | AMD Serve ...
https://www.reliablesite.net/dedicated-servers/Dax talked about this in a recent How about tomorrow podcast https://thoughts.waylonwalker.com/post/461. He is using it as his dev machine, he just ssh's in and devs on it. Feels like quite an interesting workflow, their prices seem competitive, but as a cheap ass homelabber I see their prices and think I could grab a used optiplex for the cost of a month or two of these and probably wouldn't know the difference. DAX mentions longer compile times so maybe he does notice.
-
@waylonwalker
2024
(98) Talking with Typecraft - YouTube
https://www.youtube.com/watch?v=qEykeKfAnJQ&t=1068sThis is a pretty great episode talking shop with typecraft. They talk setups, cameras, content creation. I found them talking about their linux setups particularly interesting. Dax talked about his flow from building his own machines to using reliablesite.com.
tmux default leader
Dax hates on c-a, both typecraft and dax use c-s, which normally freezes a terminal, we can all agree that is useless. I use the default c-b, it seems fine for me.
type crafts setup
- Ubuntu
- Ghosty
- Tmux
- Nvim
- Ruby
Selling coffee without a web front end
Dax talks about terminal.shop and how they originally planned to have a web front end, but after they had so much success they stuck with it. now they are leaning harder into it and are building out integrations with a bunch of languages and an api, but no front end.
-
@waylonwalker
2024
PEP 723 – Inline script metadata | peps.pytho ...
https://peps.python.org/pep-0723/PEP 723 is what is inspiring all of these lazy self installing python scripts, Authored by the author of hatch and pyapp. This is a really cool thing that uv has picked up and made python packaging just a bit easier.. maybe... dependency resolution still sucks.
-
@waylonwalker
2024
Switching from virtualenvwrapper to direnv, S ...
https://treyhunner.com/2024/10/switching-from-virtualenvwrapper-to-dir ...I've kinda fallen out of using direnv now that a lot of my projects use hatch, I generally just hatch shell into them. I just need to make sure I go through all of them and make my installer uv. Now I've been thinking about making uv my only needed dependency to run a python project and leaning more to something like
uv run --with . uvicorn myapp --reload
-
@waylonwalker
2024
Lazy self-installing Python scripts with uv
https://treyhunner.com/2024/12/lazy-self-installing-python-scripts-wit ...I really like Trey's steps to making an executable python script with uv
his old process seems to be the same with a new shebang
- Add an appropriate shebang line above the first line in the file (e.g. #!/usr/bin/env python3)
- Aet an executable bit on the file (chmod a+x my_script.py)
- Place the script in a directory that’s in my shell’s PATH variable (e.g. cp my_script.py ~/bin/my_script)
And here is the new format the the shebang followed by the metadata comment block defined in PEP 723.
#!/usr/bin/env -S uv run --script # /// script # requires-python = ">=3.12" # dependencies = [ # "ffmpeg-normalize", # ] # ///
-
@waylonwalker
2024
My approach to running a link blog
https://simonwillison.net/2024/Dec/22/link-blog/#atom-everythingI still cannot believe I thought I had such a unique idea with thoughts only to find out shortly thereafter that Simon beat me to the punch by about 20 years!
Simon put a lot of work into this post please check it out. Its not only filled with tons of little nuggets about blogging, it has just a ton of links to other posts I'm itching to read now.
https://simonwillison.net/2024/Dec/22/link-blog/#thoughts.waylonwalker.com
a linkblog proves that you read
Simon mentions it in the post as well, but one thing about having a link blog does is that it proves that you actually read articles that you share. This is really more about proving to myself, and reminding myself that anyone else, it's a good feeling.
Trying to add soemthing extra
- include names of people, and add tags for common people
- something extra - the whole point is to bring something to the post without stealing thunder, but rather linkbuilding for the author that put the hard work in.
- copious amounts of quotes
- It should bring the author up not put them down
A post a day
well .98 posts per day
Simon mentions starting in Nov 2003, which puts that at 7722 days since then. That is so close to a post a day for 21 years, even though they are often as short as one sentence that is impressive to keep up over time.
So far I’ve published 7,607 link blog posts and counting.
What's my rate
I just check and I am at 513 days in with 413 posts (0.8 posts/day). Not quite up to Simon, but close enough to be proud of. My only grief is that I didn't start sooner.
My stack
I have a full post explaining more about how I do mine and the stack behind it here.
https://waylonwalker.com/thoughts/
See Images are hard!
This is one of the main reasons that I built dropper for myself, and plan to include it in fokais as a product to help others with their blog. This is definite evidence that I am not the only one with this issue!
I've made images easy form myself
I've tried half a dozen or so easy techniques from obsidian to various github repos and none have really hit me with inspiration to really add screenshots like I do with dropper. I write all of my thoughts posts in a chrome extension drop down local first style and when i hit paste it uploads and gives me a markdown image link, it cannot be easier for me.
When I store them I compress them and convert them to webp. I serve them by streaming them out of an s3 bucket with fastapi and some very generous cloudflare cache headers, so I should only get a request for that image about once a year.
Warning, I built dropper for me, no guarantees that it works forever, foakis will be for more users.
Bluesky does not penalize for links
I am loving bluesky more and more, learning this just gave it another level up.
Series
I just noticed that Simon has Series on his blog in a very elegant way. One I need to get back to blogging more, I did not do so good in 2024, and two this is awesome and I want it.
test
-
@waylonwalker
2024
How I use Obsidian Templater
https://thoughts.waylonwalker.com/post/455Ok, second post on this one. I am sending only head requests, so I want to see the first request for the image, which happens in the chrome extension after pressing submit. It will not yet come from cloudflare so I am interested in what it looks like just streaming out of object sorage. This time I have the inspector open on the tab.
As expected I got a cloudflare cache miss on first hit.
But the overall performance of 351ms to get the image was not bad considering it takes several seconds to get the image fresh.
Now closing the chrome extension popup, and hitting the main thoughts page again gives me a cache hit from Cloudflare's CDN.
And the total request time goes from 351ms to 21ms with the Cloudflare CDN, quite impressive!
Sorry with how meta these last two posts were, I needed a second post to get that fresh request graph from.
-
@waylonwalker
2024
How I use Obsidian Templater
https://thoughts.waylonwalker.com/post/454This is a test post. I just updated the chrome extension for thoughts to take a the thumbnail image on open of the chrome extension so that it is ready when i publish it. let's see what happens.
-
@waylonwalker
2024
How I use Obsidian Templater
https://cassidoo.co/post/obsidian-templater/I really like this idea of keeping a set up contacts in a markdown repo, and being able to wikilink them to different tickets / meetings and what not. I'm imagining the graph you can build, it feels quite interesting. Even more relevant as we see things like teams rolling out retention limits to messages.
Here is Cassidy's format, I like it but I'm probably not going to track the birthday of most people I work with, thats just not the relationship I tend to have with work friends. It might be a midwest or non tech thing, but I am not even aware if any of my co-workers have social media, and I assume that if they did it would not include anything work related but more football and other sports.
-
@waylonwalker
2024
docker context (and an issue to question your ...
https://pype.dev/docker-context-and-an-issue-to-question-your-sanityDang context can really cause you to pull your hair out. Context seems so freaking convenient, but I've avoided it and just ssh in for these reasons. Maybe I'll come around eventually but for now ssh is my friend.
-
@waylonwalker
2024
(88) Styling better custom inputs with Dave R ...
https://www.youtube.com/watch?v=azUEOy8_GHoReminder to tune in later, can't watch now, but saw a link on Dave's blog.
-
@waylonwalker
2024
I got the ADHD, too - daverupert.com
https://daverupert.com/2024/12/adhd/Cheers to the Unique brains dave. I can say I am 100% with Dave on all of these, except the clean environment thing, lucky Dave. If I have enough room to see what I am doing and walk around a mess, I probably wont even notice it. I'm so hyper focused on what is right in front of me that mess could be a huge pile of cash and i'd never see it.
-
@waylonwalker
2024
Damn, I love dropper already
https://thoughts.waylonwalker.com/post/448Damn I'm loving using dropper already, I am able to copy paste images right into posts on thoughts. This is my first post that really utilizes them heavily to show how different styled rss feeds look in the post. These were super quick to screenshot and paste in, this is a DREAM workflow for me.
When I paste an image into my thoughts chrome extension it automatically uploads it to dropper, and places a markdown image tag in its place. Ya, I know the alt text could be better, but it feels fine for quick and dirty posts like this.
check out https://thoughts.waylonwalker.com/post/448 for some sweet styled rss
-
@waylonwalker
2024
How to make your RSS feed pretty
https://cassidoo.co/post/prettify-rss/I love me some styled rss, it's how the OG internet was made to be. You choose what you want to read and when. There is no middleman aggregator inflating the reach of things they want you to see or suffocating things against them. It's just you and your internet friends.
Cassidy's Styled rss
Cassidy has a quite lovely and easy to read rss feed, with an open source style sheet, that is part of her open source blog template for astro blahg, love that name by the way!
Dave Rupert's Feed
I first learned of styled rss feeds from shoptalkshow.com, specifically from Dave Rupert.
Dave uses a pretty bog standard styled rss feed with pretty-feed-v3. This repo is probably the best place to start if you are looking to style your rss feed.
https://github.com/genmon/aboutfeeds/blob/main/tools/pretty-feed-v3.xsl
My RSS Feed
My feed comes from my static site generator markata, a plugins all the way down static site generator written in python, made for customizing, lacking just about any and all docs so you are on your own.
-
@waylonwalker
2024
Dropper
https://dropper.wayl.one/Dropper is a place for me to drop files for quick posts like this.
-
@waylonwalker
2024
Add a healthcheck to your FastAPI app | Pype. ...
https://pype.dev/add-a-healthcheck-to-your-fastapi-appNice example of adding a healthcheck to fastapi, and integrating it with docker. Don't forget to include curl in the install, nice touch.
-
@waylonwalker
2024
casey/just: 🤖 Just a command runner
https://github.com/casey/just?tab=readme-ov-file#constantsnew versions of just now come with color variables already set.
[group('manage')] version: #!/usr/bin/env bash version=$(cat version) echo current version {{BOLD}}{{GREEN}}$version{{NORMAL}}
-
@waylonwalker
2024
pipedream/justfile at main · thechangelog/pip ...
https://github.com/thechangelog/pipedream/blob/main/justfileI found this nugget in thechangelogs justfile, it lets you add color to your justfile with variables quite easily.
# https://linux.101hacks.com/ps1-examples/prompt-color-using-tput/ _BOLD := "$(tput bold)" _RESET := "$(tput sgr0)" _BLACK := "$(tput bold)$(tput setaf 0)" _RED := "$(tput bold)$(tput setaf 1)" _GREEN := "$(tput bold)$(tput setaf 2)" _YELLOW := "$(tput bold)$(tput setaf 3)" _BLUE := "$(tput bold)$(tput setaf 4)" _MAGENTA := "$(tput bold)$(tput setaf 5)" _CYAN := "$(tput bold)$(tput setaf 6)" _WHITE := "$(tput bold)$(tput setaf 7)" _BLACKB := "$(tput bold)$(tput setab 0)" _REDB := "$(tput setab 1)$(tput setaf 0)" _GREENB := "$(tput setab 2)$(tput setaf 0)" _YELLOWB := "$(tput setab 3)$(tput setaf 0)" _BLUEB := "$(tput setab 4)$(tput setaf 0)" _MAGENTAB := "$(tput setab 5)$(tput setaf 0)" _CYANB := "$(tput setab 6)$(tput setaf 0)" _WHITEB := "$(tput setab 7)$(tput setaf 0)"
Usage
echo: echo {{_BOLD}}{{_GREEN}}hello there{{_RESET}}
-
@waylonwalker
2024
Hurl - Run and Test HTTP Requests
https://hurl.dev/Hurl was mentioned by @gerhard on the latest changelog and Friends. Looks like a feature rich easy to use testing tool that is tested via what looks like a config file.
Hurl is a command line tool that runs HTTP requests defined in a simple plain text format. It can chain requests, capture values and evaluate queries on headers and body response. Hurl is very versatile: it can be used for both fetching data and testing HTTP sessions. Hurl makes it easy to work with HTML content, REST / SOAP / GraphQL APIs, or any other XML / JSON based APIs.
-
@waylonwalker
2024
watchfiles
https://watchfiles.helpmanual.io/Simple, modern and high performance file watching and code reload in python.
-
@waylonwalker
2024
hostnamectl to easily change hostname | Pype. ...
https://pype.dev/hostnamectl-to-easily-change-hostnameFor some reason the ublue ecosystem does not prompt you to set your hostname on install and you get a hostname like bazzite showing up. Looks like this is the fix.
hostnamectl --static hostname babyblue-aurora
-
@waylonwalker
2024
Ansible Galaxy - amazon.aws
https://galaxy.ansible.com/ui/repo/published/amazon/aws/content/module ...Great examples for working with s3 buckets with ansible.
-
@waylonwalker
2024
Using OPNsense with Tailscale · Tailscale Doc ...
https://tailscale.com/kb/1097/install-opnsenseOn reboot of my opnsense router it did not tailscale up. I'm not sure if a key expired or what happened. The fix was to first enable ssh, then ssh in and run tailscale up.
enable ssh
In opnsense System > Settings > Administration > Secure Shell > Enable Secure Shell
tailscale up
ssh <opnsense ip> 8 # to select shell tailscale up
Follow the link to log in.
disable ssh
now uncheck secure shell to lock down the opnsense machine.
In opnsense System > Settings > Administration > Secure Shell > Enable Secure Shell
-
@waylonwalker
2024
Fitting two hard drives and an SSD in a Dell ...
https://willj.net/posts/fitting-two-hard-drives-and-an-ssd-in-a-dell-o ...This guy fit 2 3.5" drives and an sdd in a dell 7050 SFF. It looks tight, and there it probably not much airflow running in it, but its an impressive project.
-
@waylonwalker
2024
How To Fix An Office Chair Popping Noise? Wit ...
https://toergonomics.com/office-chair-popping-noise/I tried this fix on my secretlabs chair, but unfortunately it did nothing for me. Mine ended up being an issue in the tilt mechanism and not the hydraulic piston. I greased the crap out of it, it can only help the longevity. I did notice that the two washers on either side of my bearing were quite worn in.
-
@waylonwalker
2024
If anyone else is having sound clicking with ...
https://www.reddit.com/r/secretlab/comments/s6ayop/if_anyone_else_is_h ...This is definitely happening to my secretlabs chair. I did the fix this morning, its still not perfect, but it's better now than it has been in a long time. Mine use to be so bad that it would pop and creak every time I sat down or moved the smallest bit. It's now quiet through the mid range of its motion with the occasional pop when I sit down.
-
@waylonwalker
2024
Changelog on X: "🗣️@dhh on Kubernetes' migrat ...
https://x.com/changelog/status/1860697708463378497switching cloud providers, theres no easy way. K8s was supposed to get us there, haha, the deep integrations with each vendor just keep locking us in
-
@waylonwalker
2024
How to make a good first impression in busine ...
https://www.youtube.com/shorts/dq0p_APdNMEDang, love this guys branding. Hooks to get stuff offDaBench, what a freaking cool name.
-
@waylonwalker
2024
Inside Argo: Automating the Future - YouTube
https://www.youtube.com/watch?v=ox3Gx3eCTCsThis is a really amazing documentary of argocd. I got into k8s pretty late in the game. Which is pretty typical for me. As I went to use k8s for the first time i was using workflows, then cd. both of these tools had a level of polish that made them seem like they had been there forever and not quite as young as they actually are.
I thought it was interesting how they focused on how the name must be two syllables or less, start with a or b, logo needs to be cutesy funny and recognizable seemed interesting, but puts them at the top of lists and makes them look like they've been there forever.
-
@waylonwalker
2024
Introduction - bootc
https://containers.github.io/bootc/bootc is the underlying technology that enables OS's like bazzite, and Aurora from the uBlue ecosystem.
-
@waylonwalker
2024
Saghen/blink.cmp: Performant, batteries-inclu ...
https://github.com/Saghen/blink.cmpA new completion plugin that I might give a try. Readme makes it sound like its built on some fast teck that allows them to handle a lot of items and run more frequently. The videos look like they don't have some of the same issues cmp does for me. Maybe its my configuration, but I'm pretty sure it does not update when you backspace and things like that.
-
@waylonwalker
2024
Wes Bos on X: "CSS Anchors: flip a tooltip to ...
https://x.com/wesbos/status/1856724739336859713These css anchors are crazy that you can do this with html and not a bunch of js, probably requiring a library or framework.
-
@waylonwalker
2024
statically makes OG images **easy** (2048×117 ...
https://cdn.statically.io/og/statically%20makes%20OG%20images%20**easy ...Staically makes creating OG images so easy, you can just pop this in your
section with some og tags.<meta name="og:image" name="og:image" content="https://cdn.statically.io/og/{{post.title}}" /> <meta name="twitter:image" name="twitter:image" content="https://cdn.statically.io/og/{{post.title}}" /> <meta name="og:image:height" content="640" /> <meta name="og:image:width" content="1280" />
-
@waylonwalker
2024
E576: Error while reading ShaDa file: there i ...
https://github.com/neovim/neovim/issues/6875I hit an interesting error after updating my nvim plugins today. I'm sti not even quite sure what a ShaDa file is, but I found min in my nvim state directory, unlike this issue that mentions it being in share.
The Error.
Error while reading ShaDa file:
The Fix
mv ~/.local/state/nvim/shada/main.shada ~/.local/state/nvim/shada/main.shada.bak
-
@waylonwalker
2024
Production-ready Python Docker Containers wit ...
https://hynek.me/articles/docker-uv/Hynek has a sick dockerfile setup for using uv in python projects.
-
@waylonwalker
2024
Proper handling of None in WHERE condition · ...
https://github.com/fastapi/sqlmodel/issues/109#issuecomment-1046223225SQLModel models ship with an
is_
, andis_not
that you can use to compare to None without pesky linters complaining.This comment summed it up quite well.
I believe this is concerned entirely with SQLAlchemy, not with SQLModel, and has to do with the required semantics to construct a BinaryExpression object. Hero.age == None evaluates to a BinaryExpression object which is eventually used to construct the SQL query that the SQLAlchemy engine issues to your DBMS. Hero.age is None evaluates to False immediately, and not a BinaryExpression, which short-circuits the query no matter the value of age in a row. From a cursory search, it does not seem that the is operator can be overridden in Python. This could help explain why the only possibility is by using the == operator, which can be overridden.
so rather than using
Team.heros == None
we can useTeam.seros.is_(None)
which checks for itentity not equality. -
@waylonwalker
2024
Rugged Storage Box, Parametric and Customizab ...
https://www.printables.com/model/637028-rugged-storage-box-parametric- ...Non Gridfinity Rugged boxes
-
@waylonwalker
2024
Gridfinity Rugged Storage Box, Parametric and ...
https://www.printables.com/model/757297-gridfinity-rugged-storage-box- ...gridfinity rugged box openscad
-
@waylonwalker
2024
Cluster API book
https://cluster-api.sigs.k8s.io/reference/providersCluster API book
-
@waylonwalker
2024
Gridfinity Generator
https://gridfinity.perplexinglabs.com/pr/gridfinity-extended/0/0Gridfinity generator uses open scad, so you can make rugged boxes, bins and base plates with form input. not fully custom fit to things, but you can custom size square bins, hole cut out sides and all. From what I can tell, no bento box either. so as long as what you are looking for is square this generator has you pretty well covered. I'm definitely using this for simple bins and rugged boxes.
-
@waylonwalker
2024
Framework Portable handheld Case (Beth Deck) ...
https://www.printables.com/model/1051411-framework-portable-handheld-c ...The BethDeck is a sick looking DIY steam deck competitor built on top of the framework 13" mainboard. No soldering needed, lt with all off the shelf parts. Controllers appear to be an off the shelf controller with the shell removed and plugged into a usb hub.
-
@waylonwalker
2024
My Favorite Fingerboard Obstacles & WHY - You ...
https://www.youtube.com/watch?v=fDCmiL3qaL0I really like how Spencer walked through how to make quite a few unique setups with only a few simple obstacles. It does not take anything fancy to have a cool setup.
-
@waylonwalker
2024
Document how to provide a negative number as ...
https://github.com/fastapi/typer/discussions/798Today I learned that you cannot pass negative integers as values to typer. in this case
context_settings={"ignore_unknown_options": True}
is required so that the-
does not look like a flag.# script name: main.py import typer app = typer.Typer() @app.command() def failing(value: float): print(f"{value=}") @app.command( context_settings={"ignore_unknown_options": True} ) def working_good(value: float): print(f"{value=}") if __name__ == "__main__": app()
-
@waylonwalker
2024
Aaron Francis on X: "📣 We're excited to annou ...
https://x.com/aarondfrancis/status/1833533150674268469Aaron Francis is a database master, pumped for thsi dude and all that he is able to accomplish.
-
@waylonwalker
2024
Will McGugan on X: "New Version of #Textual r ...
https://x.com/willmcgugan/status/1849831271289012463This new demo of textual is wildly awesome, so many widgets and features being added into the main library. The themes and animations are on point and far surpass my expectations of a tui.
-
@waylonwalker
2024
ticklemykeys on X: "Porta john got some pink ...
https://x.com/XTicklemykeys/status/1850361138791195069Loving this 6 pink with blueforward multicolor combo the porta john has going right now. Also my son printed me a cute black pumpkin.
-
@waylonwalker
2024
Not a split keyboard, but perhaps a companion ...
https://www.reddit.com/r/ErgoMechKeyboards/comments/1g5phts/not_a_spli ...ploopy just dropped a trackpad that runs qmk. This sounds so cool. I'm excited to see some videos on it. It would be sick to get this incorporated into a porta john running zmk, one bluetooth device to run all the peripherals.
-
@waylonwalker
2024
Install a Zulip server — Zulip 9.2 documentat ...
https://zulip.readthedocs.io/en/stable/production/install.htmlZulip was just featured on a changelog clip as a self-hosted chat offering. I'm interested to give this a go and see how it compares to matrix. glancing at it, it looks a lot like slack.
-
@waylonwalker
2024
Pin versions of dependencies · Issue #2200 · ...
https://github.com/Kozea/WeasyPrint/issues/2200weazyprint was throwing me some errors, turns out that it's currently not compatible with the latest pydyf package.
my error
TypeError: __init__() takes 1 positional argument but 3 were give
I fixed it by locking in pydyf at 0.8.0
pydyf==0.8.0
-
@waylonwalker
2024
These are SICK, gonna be using this a lot. (T ...
https://github.com/jesseleite/dotfiles/commit/49794006cbc9dc0e743925ec ...helix inspired treesitter select outwards and select inwards.
-
@waylonwalker
2024
add helix · WaylonWalker/devtainer@71b9b29
https://github.com/WaylonWalker/devtainer/commit/71b9b29baf14f3714601d ...Helix officially made it in my devtainer. I am installing the binary right out of the github release with wget and tar. I can't use installer because their release format does not match what installer is looking for.
!!! note: I also move the runtime over to /usr/local/share/helix/runtime.
!!! note: I use /usr/local/bin rather than my home directory as it works better with distrobox.
-
@waylonwalker
2024
helix-vim/config.toml at master · LGUG2Z/heli ...
https://github.com/LGUG2Z/helix-vim/blob/master/config.tomlHere are some really great keybinds to make helix vim-like. It feels very antithetical to use this whole sale and forego the helix motion-verb language, but there are some nuggets like G in here that I find useful.
-
@waylonwalker
2024
Support regex substitution command · Issue #2 ...
https://github.com/helix-editor/helix/issues/2232#issuecomment-1250371 ...helix multicursor has the ability to do what vims
:s/hello/world/gc
does by using)
to cycle through cursors, andn
to discard unwanted cursors. -
@waylonwalker
2024
Support regex substitution command · Issue #2 ...
https://github.com/helix-editor/helix/issues/2232#issuecomment-1228632 ...Here is a really good vim substitute with regex capture groups, saving this one for a rainy day.
* Reading 1: This is a title to a link * Reading 2: This is another title
:%s/\v(: )(.+)$/\1\[\2\]\(
* Reading 1: [This is a title to a link]( * Reading 2: [This is another title](
-
@waylonwalker
2024
Support regex substitution command · Issue #2 ...
https://github.com/helix-editor/helix/issues/2232#issuecomment-1107644 ...Interesting take on refactoring the whole codebase from your editor. In this thread the-mikedavis suggests multicursor as a replacement for substitute, and later in the thread takes the side that larger workspace wide edits are outside the scope of helix and he would reach for a refactoring tool like fastmod to do the job.
-
@waylonwalker
2024
Support regex substitution command · Issue #2 ...
https://github.com/helix-editor/helix/issues/2232I am a heavy user off substitutions in vim, helix does not substitutions built in, rather it leans on multicursor support.
to replace every instance of hello with world in vim
:%s/hello/world/g<CR>
and in helix you would
%shello<CR>cworld<ESC>,
-
@waylonwalker
2024
Background Image | Wallpaper · Issue #3059 · ...
https://github.com/helix-editor/helix/issues/3059How to make helix themes transparent. You can make any built-in theme transparent in helix with one line, a few extras and you can make all the pop ups, help menus and status line trransparant as well.
mkdir -p ~/.config/helix/themes hx
:o ~/.config/helix/themes/dracula_transparant.toml
# ~/.config/helix/themes/dracula_transparant.toml inherits = "dracula" "ui.background" = { fg = "foreground" } "ui.menu" = { fg = "white" } "ui.popup" = { fg = "white" } "ui.window" = { fg = "white" } "ui.help" = { fg = "light-gray" } "ui.statusline" = { fg = "gray" } "ui.statusline.inactive" = { fg = "black" }
:config-edit
# ~/.config/helix/config.toml theme="dracula_transparant"
-
@waylonwalker
2024
help on setting up ruff formatter + ruff + py ...
https://www.reddit.com/r/HelixEditor/comments/17gglgm/help_on_setting_ ...This post shows how to set up multiple LSP's in helix, the example uses pyright and ruff-lsp for python.
Add this to your
~/.config/helix/languages.toml
a[[language]] name = "python" auto-format = true language-servers = [ {name = "pyright"}, {name = "ruff-lsp"}, ] [language-server.pyright] command = "pyright-langserver" args = ["--stdio"] config = {} [language-server.ruff-lsp] command = "ruff-lsp" args = [] config = {}
-
@waylonwalker
2024
configuring pylsp · helix-editor/helix · Disc ...
https://github.com/helix-editor/helix/discussions/6623How to set your python formatter to black with helix. The following snippet lays out how to set the helix editor to auto-format on save with the black formatter.
[[language]] name = "python" language-servers = ["pylsp"] [language-server.pylsp.config.pylsp] plugins.pyls_mypy.enabled = true plugins.pyls_mypy.live_mode = true plugins.flake8.maxLineLength = 88 plugins.pycodestyle.maxLineLength = 88 [language.formatter] command = "black" args = ["--line-length", "88", "--quiet", "-"]
-
@waylonwalker
2024
Database Remote-Copy Tool For SQLite (draft)
https://simonwillison.net/2024/Oct/4/sqlite-rsync/Simon shared a really cool new utility tool for sqlite ispired by rsync. It checks hashes of each sqlite page and syncs pages. So if nothing in the database has changed it will only require 0.5% the bandwidth as a copy would.
-
@waylonwalker
2024
ticklemykeys on X: "working on a new model. * ...
https://x.com/XTicklemykeys/status/1840104423508312273porta-john design update, working on moving the seams to line up with an edge to eliminate long noticable seams. These seams are required because I don't have a printer big enough to print this in one shot.
hotswaps are going in. I'm getting really excited for hotswaps as they will make keebs more repairable, and users can self change out the switches if they want. I can also pre-build them ready to go, and drop in switches at the time of order. I did learn today that these are hyper specific to gateron, damn all these switch manufacturers and their special pinouts.
Last thing I gotta make more room for wiring the microcontroller and running wires out to the rows and columns, my first prototype build took waay to long to build.
-
@waylonwalker
2024
Elwin Ransom 👽 on X: "Help, I'm being Helix p ...
https://x.com/jesseleite85/status/1841547565575086448Is Jesse going to get sniped by the helix community?
-
@waylonwalker
2024
ticklemykeys on X: "New cap of my own design ...
https://x.com/XTicklemykeys/status/1841646323939864871This low profile design almost made it to 9. I think blending together the custom brim to make them all one piece really made the final difference here. The custom brim is two layers thick, only touching on the top layer making it very easy to peel off, but gives better adhesion to the bed, and does not loose one like this print did.
-
@waylonwalker
2024
ticklemykeys on X: "Full size MX caps, printi ...
https://x.com/XTicklemykeys/status/1841860763960377732really excited for how these caps of my own design are working out. Having the extra control is the first time I've been able to print more than one at a time without some hacky gcode. I've got a set of nine here that I have printed 4 times without a single failure.
-
@waylonwalker
2024
Cherry 8 mm keycap mount
https://telcontar.net/KBK/Cherry/images/MX/Cherry_8_mm_mount.svgzMX keycap stem dimensions. I used these to create my new caps and all these dimensions worked great. The one dimension I had issues with was the outer diameter off the cap stem, not shown here. 5.3mm ended up being a good outer diameter for me. I print them at an angle and the bottom of the stem can get a bit of sag, pressing out on the outer wall of the switch and can actually stick the key.
-
@waylonwalker
2024
distrobox/docs/usage/distrobox-assemble.md at ...
https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-a ...This page is gold. It lays out all of the distrobox assemble api with some good examples of how to get access to things like podman and kind from inside of containers.
Especially this example.
[tumbleweed_distrobox] image=registry.opensuse.org/opensuse/distrobox pull=true additional_packages="acpi bash-completion findutils iproute iputils sensors inotify-tools unzip" additional_packages="net-tools nmap openssl procps psmisc rsync man tig tmux tree vim htop xclip yt-dlp" additional_packages="git git-credential-libsecret" additional_packages="patterns-devel-base-devel_basis" additional_packages="ShellCheck ansible-lint clang clang-tools codespell ctags desktop-file-utils gcc golang jq python3" additional_packages="python3-bashate python3-flake8 python3-mypy python3-pipx python3-pycodestyle python3-pyflakes python3-pylint python3-python-lsp-server python3-rstcheck python3-yapf python3-yamllint rustup shfmt" additional_packages="kubernetes-client helm" init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest; init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install github.com/onsi/ginkgo/v2/ginkgo@latest; init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install golang.org/x/tools/cmd/goimports@latest; init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install golang.org/x/tools/gopls@latest; init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install sigs.k8s.io/kind@latest; init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/conmon; init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/crun; init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker; init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose; init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/flatpak; init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/podman; init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/xdg-open; exported_apps="htop" exported_bins="/usr/bin/htop /usr/bin/git" exported_bins_path="~/.local/bin"
-
@waylonwalker
2024
urob/zmk-config: Personal ZMK firmware config ...
https://github.com/urob/zmk-config?tab=readme-ov-fileThis is a very well thought out zmk config featuring many macros, numword, and timeless homerow mods. The build system to build locally looks on point, I really need to give that a try!
-
@waylonwalker
2024
add init hooks and exported bins · WaylonWalk ...
https://github.com/WaylonWalker/devtainer/commit/2e4c6da537f5672209d1b ...Today I learned that you can use init_hooks to access host machine commands from inside a distrobox container. This is super handy for things that you cannot get to from inside the container and need ran outside (docker, podman, flatpak, xdg-open).
init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/podman;
-
@waylonwalker
2024
Taildrop · Tailscale Docs
https://tailscale.com/kb/1106/taildrop?tab=linuxTailscale comes with a feature called taildrop that lets you easily share files between machines on your tailnet. If you have tailscale on ios/android it shows up as a share target when you try to share something, and you can pick the machine to share with.
What was not obvious to me was how to receive the file on linux. The linux tailscale service does not automatically receive the file, which can be kinda nice that you can put it where you want, but was not obvious to me at first. Use this command to receive files.
sudo tailscale file get .
-
@waylonwalker
2024
triliu/Heawood42: Files for the Heawood42 ort ...
https://github.com/triliu/Heawood42The Heawood42 is an interesting diodeless keyboard that is not direct wired. According to the repo this is the only keyboard to be diodeless and not direct wired. It does this through the use of a graph.
-
@waylonwalker
2024
Leveret v2 & lever keycaps
https://kbd.news/Leveret-v2-lever-keycaps-2380.htmlThis is a wild key cap that uses a lever to convert horizontal key presses to vertically press the switch down. The leveret v2 uses two of these on thumbs, one to press outward, and what appears to be one straight forward which feels like it would have to be a wrist motion, but who am I to judge without having it in person.
-
@waylonwalker
2024
Alternatives to Using Pure Black (#000000) fo ...
https://uxplanet.org/alternatives-to-using-pure-black-000000-for-text- ...A nice set of blacks to use in web design. Subtle variants off of black or white like this can really make your design look nice and modern.
-
@waylonwalker
2024
Wes Bos on X: "Are you using position: absolu ...
https://x.com/wesbos/status/1834242925401694490This is a pretty incredible use of css grid to overlay items overtop of each other without needing to resort to
position: absolute
and the side effects that it brings..wrap { display: grid; & > * { grid-row: 1; grid-column: 1; } }
-
@waylonwalker
2024
Buttery icons
https://www.buttery.so/iconsSome sick looking icons no attribution needed.
-
@waylonwalker
2024
NOT - LTT Screwdriver - Fancy by Erer2001 | D ...
https://www.printables.com/model/580045/filessomeone has created a knock off of the ltt screwdriver and made it printable
-
@waylonwalker
2024
Installing Python - uv
https://docs.astral.sh/uv/guides/install-python/uv
now can install python for you.uv
is inspired by rust's cargo, an all in one fast package and installation manager.uv
is so fast and becoming feature complete, it's really changing the python packaging ecosystem.uv python install uv python install 3.12 uv python list
-
@waylonwalker
2024
Switching Configs in Neovim • Michael Uloth
https://michaeluloth.com/neovim-switch-configs/Switching between nvim configs can be really easy to do since they implemented the
NVIM_APPNAME
Environment Variable.NVIM_APPNAME=nvim-lazyvim nvim
Now config will be loaded from
~/.config/nvim-lazyvim
Michael lays out some aliases in the full article.
alias v='nvim' # default Neovim config alias vz='NVIM_APPNAME=nvim-lazyvim nvim' # LazyVim alias vc='NVIM_APPNAME=nvim-nvchad nvim' # NvChad alias vk='NVIM_APPNAME=nvim-kickstart nvim' # Kickstart alias va='NVIM_APPNAME=nvim-astrovim nvim' # AstroVim alias vl='NVIM_APPNAME=nvim-lunarvim nvim' # LunarVim
-
@waylonwalker
2024
Keyboard Build Log | Halfwit’s Dev Blog
https://halfwit.github.io/2017/05/08/keyboardblog.htmlThis is the coolest scrappy build, no printer or modeling required, no fancy tools, just straight chisel and claw hammer in soft pine. Im here for it, create the thing that you want to create.
-
@waylonwalker
2024
Hotkey to open link under at the text cursor ...
https://forum.obsidian.md/t/hotkey-to-open-link-under-at-the-text-curs ...Obsidian has a go to definition like feature, the keybind is alt+enter, I would have never guessed this one.
-
@waylonwalker
2024
Make your own luck (do this to stand out in a ...
https://www.youtube.com/watch?v=YKeVeG6h4AAVery inspiring video Jason, these people faced adversity and crushed it. The market is so hard right now, its not easy to get a job, move around, and recover from a layoff. Everyone in this video just showed that you can make it in this industry right now, you just have to be willing to work harder than the rest. The bar is raising, a lot of great people are already putting in hard work to make it.
Community is Key, Theo mentioned that a lot of the companies he works with don't even post openings, they go to their community first and are often filling spots through lower risk community hires.
-
@waylonwalker
2024
(8) I Invented Airless Cornhole Bags - YouTub ...
https://www.youtube.com/shorts/lLNfJb3OG9YThis is such a cool 3d printed cornhole game.
-
@waylonwalker
2024
The Tank - YouTube
https://www.youtube.com/shorts/6Wo4brRqkz0Thor always comes in hard with fire takes in his shorts. Especially if you are early in our career take this in. If you dont yet have kids, but plan to, double take this in.
-
@waylonwalker
2024
How Fly.io uses Docker (without Docker) - You ...
https://www.youtube.com/watch?v=7iypMRKniPU&t=3sDocker no Docker, what!!!
So fly.io uses Dockerfiles to deploy your app, but no docker. They use containerd to download your docker images into firecracker microvms to run your app. Firecracker is the same tech that runs aws lambda functions.
Fascinating short post on the beans under the hood at fly.io and how they scale your app globally.
-
@waylonwalker
2024
Ultimate Modular Macro Keyboard "Kibly" : r/M ...
https://www.reddit.com/r/MechanicalKeyboards/comments/1dyf0d8/ultimate ...This is a pretty sick design, touch screen macropad, trackball, ring, and knobs for days. I just want to play with it and see what I can make it do.
As I'm typing I think I just realized that its modular, each rectangle is it's own section!
-
@waylonwalker
2024
This is Goodbye? - YouTube
https://www.youtube.com/watch?v=YfwlM-fw-awDamn Johnny is always such a positive vibe, just getting steamrolled by this braille shit. WTF are these brand sleeping on. Happy to hear that Andy and Brian are supporting him well.
Also kinds shows what shoes are good when he goes to buy shoes cause no one will send him any and he goes with Etnies.
Johnny keep it going!
-
@waylonwalker
2024
he's back again
https://thoughts.waylonwalker.com/post/368Wyatt is again inspired to leave his thoughts on the world while watching me take notes on the zettelkasten method.
-
@waylonwalker
2024
Note-taking with Zettelkasten - An Introducti ...
https://www.youtube.com/watch?v=o1NJYnZCfmYNiklas Luhmann created the Zettelkasten method of notetaking, He was the Da Vinci of writing, holding a high standard that we can take inspiration from even today in this digital era.
As many times as I have seem the Zettelkasten covered, I never knew that it roughly translated to little cards in a box.
Four Principles
Mischa lays out four principles of Zettelkasten.
- Atomic - each card conains one idea
- Link - cards are linked together
- Structure - comes from the links
- Own Words - You write the note in your own words
My blog, tils, and thoughts make up my own zettelkasten. I am not going to say that mine is a perfect representation of his method, but the components are here. rather than building books, my thoughts and tils build up to blog posts. The rate of blog posts I write definitely changes with the seasons of life, as seasons change it becomes a bigger or smaller part of the season.
I really like Mischa's most important note to Write in your own words, this is what really promotes learning, and proves to yourself that you can form a thought around the topic. Up until recently I've wrote everything, but lately I've taken to copy pasting some quotes into my thoughts posts, but I think this is fine, because generally its used to build on the narrative and give me a place to talk about the linked post.
-
@waylonwalker
2024
add quick-tap-ms and require-prior-idle-ms · ...
https://github.com/WaylonWalker/zmk-config-42block/commit/cb2cda4cf7b3 ...Even after switching to my hm and ht behaviors I am running into some issues where sometimes I am still accidentally hitting mods(&hm) and layers(&ht) while typing and it's been getting frustrating. My main issue has been on &ht, they are configured the same so I suspect that my pinkies just move a bit slower over the keys than my pointer/middle finger.
I just added
quick-tap-ms
andrequire-prior-idle-ms
to my &hm and &ht behaviors, and a few intentionally sloppy passes through monkeytype seem to show that its working well. A few days of trying this will tell whether it was a good fix or if I have maybe gone too far the other way.The end goal here is to be able to roll over keys faster without worrying about hitting other layers or mods.
-
@waylonwalker
2024
Tickle My Keys
https://ticklemykeys.com/I've been working on something, I'm gong to combine my mechanical engineering skills with my love of great keyboards and start a custom keyboard shop for building custom keyboards for exactly what people need with an emphasis on portability.
-
@waylonwalker
2024
Git Fork vs Git Clone (Animated) - YouTube
https://www.youtube.com/watch?v=rxh6MhK6TbsDamn Prime covers this so well from all angles. Can't overstate the importance of that last step. Look at the issues, and raise an issue if there is not one before putting in a bunch of hard work. Make sure that the maintainers are open for your changes and no one else is already working on it.
-
@waylonwalker
2024
Sqlite-jiff
https://simonwillison.net/2024/Jul/23/sqlite-jiff/Sqlite is getting rust extensions now, and datetimes make it totally worth if if they work well and and fast, two things that don't always go together in datetime libraries
-
@waylonwalker
2024
There’s a TUI for that with Nick Janetakis (C ...
https://changelog.com/friends/5350 minutes into this episode they start a discussion on seo, and naming posts. They give Jerod the task of googling for tmux and see how high up the ranking they find Nick, expecting a number one post, and he cant even get to Nick.
The problem? Jerod is such a beginner he doesn't even know what to search, he starts with a long query about getting started with tmux, but all of Nick's videos are why you should use advanced features of tmux, but Jerod has yet to discover that these exist.
As experts we often come up wtih a post title for the exact thing that we are trying to teach someone how to do, but yet, they haven't discussed that they need that feature yet, they just want the getting started guide, or tell me why I should start using tmux. Not why sessions are better than windows, and tabs suck all together.
Definitely an eye opening conversation listening to two experts sit in shock as the beginner just gets dropped big tech articles, and Nick Jani-freakin-takis doesn't even hit the query page after page.
Also hats off to Nick for keeping a 2014 machine alive, I got you beat by a few years on my 2011 free give away machine, but I stopped daily driving that two years ago, and its purely a homelab now.
-
@waylonwalker
2024
The Verge on X: "Stress testing a snack-proof ...
https://x.com/verge/status/984764889754456065This is a wild keyboard test. This is exactly what I want to see from ticklemykeys.com. I want to make ergomechanical boards that you can use and abuse. I want you to not be afraid to take them with you or to eat a nutrigrain bar in the same room (cough 2015 mac). And If something does go out, I want users to be able to repair it themsleves, key caps, switches, batteries, and microcontrollers should be replacible parts they can get at a good cost from the shop if they have paid for a board.
-
@waylonwalker
2024
all lt keys to hl · WaylonWalker/zmk-config-4 ...
https://github.com/WaylonWalker/zmk-config-42block/commit/ce25356e88eb ...Today I swapped out all of my keys that are used dual purpose for letters and layers to homerow layers. This prevents goofy things happening when rolling, and prefers-tap makes it so that keys that are rolled over get hit as letters instead of as layers. This was one of my biggest hurdles jumping into zmk, lt as a homerow key just does not behave the same as the ht/hm behaviors with tap-preferred set.
!!! seealso See previous commit where I added the hl https://github.com/WaylonWalker/zmk-config-42block/commit/9522c859cdf024a2c2b73931c130ddc907c09ffc
hl: homerow_layer { compatible = "zmk,behavior-hold-tap"; label = "HOMEROW_LAYER"; bindings = <&mo>, <&kp>; #binding-cells = <2>; tapping-term-ms = <150>; flavor = "tap-preferred"; };
-
@waylonwalker
2024
/Tips-for-Being-Happier--Healthier--More-Prod ...
https://podcasters.spotify.com/pod/show/garyvee/episodes/Tips-for-Bein ...Deep breath, the deepest you can take in
Smile, a real fukin smile not some pansy bullshit
Say I'm not going to give a shit about this when I'm 90
-
@waylonwalker
2024
Can't use System update - invalid signature w ...
https://github.com/ublue-os/bazzite/issues/1316This fixed my bazzite update issues after the signing key was rotated recently. This team is killing it with such a great user experience.
curl -sL https://fix.universal-blue.org/ | sudo bash
-
@waylonwalker
2024
Update Kconfig.shield rec by bravekarma · Way ...
https://github.com/WaylonWalker/zmk-config-ninepad/commit/8b76b76e2f09 ...This one space killed my whole config and held me back from learning zmk.
-
@waylonwalker
2024
DragonFruit
https://kbd.news/DragonFruit-2178.htmlThe trackball spinner looks sick here. I can imagine using that spinner like a scroll wheel.
-
@waylonwalker
2024
NEC M-System
https://kbd.news/NEC-M-System-1729.htmlThey had split ergo boards back in 1983??? WTF who the heck keeps these row stagger boards going. This board looks like endgame material, If this thing was more normal, it'd kill a whole section of the ergo mechanical keyboard industry for good reason.
-
@waylonwalker
2024
Red Herring - Solenoid Edition sound test - Y ...
https://www.youtube.com/watch?v=n52y4MOQAjw&t=40sThis keyboard layout looks weird af the mix of column staggar and row stagger is wild. Not sure if its genius or an abomination.
That solenoid though is absolutely wild though, I kinda want one TBH.
and the clear plate with the diodes laid out on it in a herringbone pattern is a very nice touch.
-
@waylonwalker
2024
Text cursor bug in my Chrome browser that cau ...
https://stackoverflow.com/questions/75886276/text-cursor-bug-in-my-chr ...today I learned that there is an accessibility feature in chrome that allows you to place a text cursor anywhere on the page. I had accidentally done this and it drove me mad that it was there.
-
@waylonwalker
2024
python is simultaneously at the top and the b ...
https://www.youtube.com/watch?t=326&v=2fopl7-2wT0Hard to argue this take, happy to see that its at the top. With it being such an old language its amazing that it still holds this position, and not surprising that it has warts, and thing that have turn users off from wanting anything to do with it.
timestamped in the link
-
@waylonwalker
2024
Command Line Interface Guidelines
https://clig.dev/This is a pretty sick set of guidelines to help you write better cli programs, I'm definitely coming back to reading this one more in depth later.
-
@waylonwalker
2024
Render-blocking on purpose
https://fullystacked.net/render-blocking-on-purpose/You can explicitly make a script render blocking, nothing will be rendered until this js is ready.
<script blocking="render" src="important.js" defer></script>
-
@waylonwalker
2024
Remove Background Web - a Hugging Face Space ...
https://huggingface.co/spaces/Xenova/remove-background-webI've long been a user of remove.bg, and I just discovered that you can run this transformer right within your browser with no api limits.
-
@waylonwalker
2024
FastHX
https://volfpeter.github.io/fasthx/Very interesting approach to htmx and fast api. It uses separate decorators for returning template partials and json that can be stacked to include both options on a single route. The templates are explicitly set in the decorator. Separate decorators are used for full page and partial pages. I don't see an example of full and partial pages being combined. I think the demo app must be behaving in a spa like fashion where it does not get all of the data when it calls index and index will ask for user-list.
Definitely going to keep my eye on this project and ponder on it.
from fastapi import FastAPI from fastapi.templating import Jinja2Templates from fasthx import Jinja from pydantic import BaseModel # Pydantic model of the data the example API is using. class User(BaseModel): first_name: str last_name: str # Create the app. app = FastAPI() # Create a FastAPI Jinja2Templates instance and use it to create a # FastHX Jinja instance that will serve as your decorator. jinja = Jinja(Jinja2Templates("templates")) @app.get("/") @jinja.page("index.html") def index() -> None: ... @app.get("/user-list") @jinja.hx("user-list.html") async def htmx_or_data() -> list[User]: return [ User(first_name="John", last_name="Lennon"), User(first_name="Paul", last_name="McCartney"), User(first_name="George", last_name="Harrison"), User(first_name="Ringo", last_name="Starr"), ] @app.get("/admin-list") @jinja.hx("user-list.html", no_data=True) def htmx_only() -> list[User]: return [User(first_name="Billy", last_name="Shears")]
-
@waylonwalker
2024
FastHX
https://volfpeter.github.io/fasthx/Very interesting approach to htmx and fast api. It uses separate decorators for returning template partials and json that can be stacked to include both options on a single route. The templates are explicitly set in the decorator. Separate decorators are used for full page and partial pages. I don't see an example of full and partial pages being combined. I think the demo app must be behaving in a spa like fashion where it does not get all of the data when it calls index and index will ask for user-list.
Definitely going to keep my eye on this project and ponder on it.
from fastapi import FastAPI from fastapi.templating import Jinja2Templates from fasthx import Jinja from pydantic import BaseModel # Pydantic model of the data the example API is using. class User(BaseModel): first_name: str last_name: str # Create the app. app = FastAPI() # Create a FastAPI Jinja2Templates instance and use it to create a # FastHX Jinja instance that will serve as your decorator. jinja = Jinja(Jinja2Templates("templates")) @app.get("/") @jinja.page("index.html") def index() -> None: ... @app.get("/user-list") @jinja.hx("user-list.html") async def htmx_or_data() -> list[User]: return [ User(first_name="John", last_name="Lennon"), User(first_name="Paul", last_name="McCartney"), User(first_name="George", last_name="Harrison"), User(first_name="Ringo", last_name="Starr"), ] @app.get("/admin-list") @jinja.hx("user-list.html", no_data=True) def htmx_only() -> list[User]: return [User(first_name="Billy", last_name="Shears")]
-
@waylonwalker
2024
Pinout and Schematic - nice!nano
https://nicekeyboards.com/docs/nice-nano/pinout-schematic/Pinout for nice!nano boards. Note that P0.15 means gpio port 0 pin 15, they can be referenced in zmk when setting column and row pins.
#include <dt-bindings/zmk/matrix_transform.h> / { chosen { zmk,kscan = &default_kscan; zmk,matrix_transform = &default_transform; /delete-property/ zephyr,console; /delete-property/ zephyr,shell-uart; }; default_kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; label = "default_kscan"; diode-direction = "col2row"; col-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH> , <&gpio0 29 GPIO_ACTIVE_HIGH> , <&gpio0 2 GPIO_ACTIVE_HIGH> ; row-gpios = <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> , <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> ; }; default_transform: matrix_transform { compatible = "zmk,matrix-transform"; columns = <3>; rows = <3>; map = < RC(0,0) RC(0,1) RC(0,2) RC(1,0) RC(1,1) RC(1,2) RC(2,0) RC(2,1) RC(2,2) >; }; };
-
@waylonwalker
2024
linux - What is stored in /dev/pts files and ...
https://unix.stackexchange.com/questions/93531/what-is-stored-in-dev-p ...today I learned that /dev/pts is a pseudo-tty. It amazes me how much linux is still built around things like hardware terminals.
-
@waylonwalker
2024
svenstaro/miniserve: 🌟 For when you really ju ...
https://github.com/svenstaro/miniserveminiserve is a sweet http server, replacement for
python -m http.server
. It's fast, runs off a small binary, but why would I want to use it over something that already exists on most machines, because it includes a bunch of features like qr codes, pretty themes, and uploads. I've usedpython -m http.server
many times to transfer files from one machine to another in a pinch, like at a family members house. But what if they have an android, windows, or something not easy to get a python repl running on, you can run miniserve and upload from their device rather than hosting from their device. -
@waylonwalker
2024
pacman/Tips and tricks - ArchWiki
https://wiki.archlinux.org/title/pacman/Tips_and_tricksThe arch wiki is always full of good content, and pacman tips and tricks does not disappoint. Today I discovered this command to remove orphaned dependencies on my system.
pacman -Qdtq | pacman -Rns -
-
@waylonwalker
2024
Inside 22,734 Steam games | daniel.haxx.se
https://daniel.haxx.se/blog/2024/06/20/inside-22734-steam-games/Interesting to see that curl is used in so many places. I often think of things like games being so windows centric and curl being so linux centric I don't even think of these things crossing paths as much as they do.
-
@waylonwalker
2024
wcurl is here | daniel.haxx.se
https://daniel.haxx.se/blog/2024/07/03/wcurl-is-here/interesting, seems like such a simple way to completely remove the need of a whole other cli. No offense to anyone working on wget, but generally I use it out of lazyness or something wierd is happening and I am looking for a second opinion. Cool to know that wcurl exists and will start shipping with curl.
-
@waylonwalker
2024
Email Address Obfuscation · Cloudflare Web Ap ...
https://developers.cloudflare.com/waf/tools/scrape-shield/email-addres ...I recently started seeing email-decode.min.js show up on my blog posts, and I wondered what the heck ? I didn't put it there. Turns out that cloudflare put it there from pages to safely serve email addresses for me.
inspecting the page without js running we can see that the mailto email is swapped out for email protected. Neat feature.
❯ curl --silent https://waylonwalker.com/diskcache-as-debounce/ | grep email <a class="decoration-pink-500 hover:decoration-pink-300 hover:text-pink-100" href="/cdn-cgi/l/email-protection#a4ccc1c8c8cbe4d3c5ddc8cbcad3c5c8cfc1d68ac7cbc9" rel="me"><span class="__cf_email__" data-cfemail="630b060f0f0c2314021a0f0c0d14020f0806114d000c0e">[email protected]</span></a> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script></body>
Looking deeper into this article it looks like this feature comes from Scrape Shield and enabling Email Address Obfuscation.
-
@waylonwalker
2024
Background Tasks - FastAPI
https://fastapi.tiangolo.com/tutorial/background-tasks/fastapi comes with a concept of background tasks which are functions that can be ran in the background after a function has been ran. This is handy for longer running functions that may take some time and you want to have fast response times.
Here is an example from the docs
from fastapi import BackgroundTasks, FastAPI app = FastAPI() def write_notification(email: str, message=""): with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification") return {"message": "Notification sent in the background"}
-
@waylonwalker
2024
markdown-it-pyrs · PyPI
https://pypi.org/project/markdown-it-pyrs/markdown it py running in rust claims to be 20x faster. I'll definitely look into this if markdown it py is ever a bottleneck in my performance. At first glance it appears that plugins are written in rust not python, and there is no admonition plugin, so I'll keep my eye on it for now, but I can't use it.
-
@waylonwalker
2024
DiskCache API Reference — DiskCache 5.6.1 doc ...
https://grantjenks.com/docs/diskcache/api.html#diskcache.Cache.peekite ...diskcache has a peekitem method that allows you to lookup the expire_time of a cached item without changing it. I recently used this to implement debounce for fastapi background tasks with multiple workers running. since all the workers I care about are on the same machine, but running in different processes diskcache was a great option. All workers have access to the same disk, but not the same variables in memory.
-
@waylonwalker
2024
(416) Kustomize: The Best Way to Manage Your ...
https://www.youtube.com/watch?v=spCdNeNCuFU&t=247sGreat intro into kustomize. This helped me get started with kustomize.
-
@waylonwalker
2024
Alternatives · joric/nrfmicro Wiki
https://github.com/joric/nrfmicro/wiki/AlternativesHuge list of micro controllers tried and used in keeb builds.
-
@waylonwalker
2024
Waylon Walker - handwired macropads on X: "Fi ...
https://x.com/_WaylonWalker/status/1807594004453667134Not gonna lie, kinda pumped about this one. I manually did one, jotted down the coordinates, opened the gcode in vim, added markers between setup/teardown and print. then added the wipe, the copy pasted the print+wipe section a bunch of times.
My printer tends to run a bit better on single prints than printing a dozen at once as it has less issues with retract start and stop.
-
@waylonwalker
2024
Find And Replace one eyed kirby
https://www.youtube.com/shorts/v2a6Nv7RSd0another great use and demo of the one eyed fighting kirby
-
@waylonwalker
2024
PolyFill Vulnerability is WILD - YouTube
https://www.youtube.com/watch?si=6NK4iCu1b1rCDo7a&t=555&v=mmlHQyMOK7Y& ...Damn, supply chain vector attacks are wild. Random guy in Primes stream was getting $40k offers to buy their open source project while in university and they have never made anything from it. What a social engineering attack this is. It would be so easy to make it look like a good deal and that the package was going to a good new owner who has real resources to maintain it.
-
@waylonwalker
2024
Found: OverlayKey X – Thomas Baart's Microblo ...
https://micro.thomasbaart.nl/2024/06/12/overlaykey-x/This is almost exactly what I have been thinking about building for quite awhile. I am going to give it a good try with a few $$ in filiment some cheap switches a microcontroller and go pretty bare bones, maybe open wiring on the bottom.
-
@waylonwalker
2024
Queueing – An interactive study of queueing s ...
https://encore.dev/blog/queueingAbsolutely sick post. This is top tier animated blog posts. This posts demos how different queuing systems work with fantastic interactive demos.
-
@waylonwalker
2024
(409) One Script Tag Just Pwn'd Over 100,000 ...
https://www.youtube.com/watch?v=ILvNG1STUZU&t=286sSupply chain attacks are so big these days engineers definitely need to take these into consideration. It's wild that such a simple attack vector hit some really big applications. This particular vector is so easy to avoid. You are already hosting web content, just curl the file and self host the script, then you own it. That eliminates this attack vector all together, but doesn't completely remove supply chain attacks, the js file can still hit external apis internally.
What I see has happened in this case is that the owner of the domain polyfill.io changed. so anyone who directly linked to them got a malware injected script used.
I can only imagine the number of applicatons that are not even being maintained anymore getting hit by this. TLDR, if you are taking something to production, where you are goind to deploy it and let it run, host the js yourself. these cdns are great for prototyping, but tread with caution.
-
@waylonwalker
2024
(409) Don't Cheat Yourself - YouTube
https://www.youtube.com/shorts/NMQuGlQ0XHQWell spoken prime. Co-pilot is a fantastic tool for templating, boilerplate, or just getting something done that is just outside your knowledge or care to know. Bit if you really want to learn something, you need to use your hands. Reading the solution only gives you the happy path. This does not give you that path that most people would take, and completely misses debugging. If you are very new and learning it's unlikely that you can write large blocks of code without running a test or a script to try it. Taking these shortcuts will hinder your ability to do it yourself.
If I were to devils advocate here, copilot is still not the greatest at the big picture, you still have to drive, and tell it I want to use python, fastapi, I want to load settings from .env. taking these shortcuts can help you move quick and get the big picture. This is especially helpful for someone who might know one language or framework and is trying a different one, but at some point you need to do the work and learn if you are going to be effective.
-
@waylonwalker
2024
PyAnnotate: Auto-generate PEP-484 annotations ...
https://github.com/dropbox/pyannotatepyannotate is a tool that uses runtime types to suggest type annotations to use. Test runners such as pytest can be used to generate the types.
-
@waylonwalker
2024
qmk_firmware/docs/features/programmable_butto ...
https://github.com/qmk/qmk_firmware/blob/master/docs/features/programm ...Interesting, linux supports 32 programmable buttons, special buttons that do nothing that hotkey programs like xbindkeys can pick up and run things, seems like it would be very intersting to use on a macro pad. You could easily do dynamic and complex tasks without clashing that keybinding with something else.
I'm going to look into this for my next obs setup. No matter what I try to do with the hyper key it always tends to do odd things depending on the application I am in. typically its tmux, and it starts trying to do something I don't want it to.
-
@waylonwalker
2024
tusharsadhwani/yen: Create virtual environmen ...
https://github.com/tusharsadhwani/yenCreate virtual environments for any Python version, without needing Python installed.
-
@waylonwalker
2024
Where DOESN’T curl run with curl BDFL Daniel ...
https://changelog.com/friends/49Love how Daniel just brushed off the number of netflix tv installs as small beans for curl installs. overall great episode on open source, owning a major component to technology with such a small team.
-
@waylonwalker
2024
Keyboard Mounting Styles — Keyboard Universit ...
https://www.keyboard.university/200-courses/keyboard-mounting-styles-4 ...Great keyboard design guide for all the different mounting options that are normal for keyboards with pros and cons of each.
-
@waylonwalker
2024
Welcome to RSS Club - daverupert.com
https://daverupert.com/2018/01/welcome-to-rss-club/Super cool idea, kinda breaking the rules by talking about it here, but Its a cool idea to throw out posts to the core audience. Apparently its been around for quite while Dave started in 2018.
-
@waylonwalker
2024
Releases · stackrox/kube-linter
https://github.com/stackrox/kube-linterA linter for linting kubernetes manifests and help charts.
-
@waylonwalker
2024
Keycodes Overview | QMK Firmware
https://docs.qmk.fm/keycodesFull reference to all of the qmk keycode list. Handy reference to refer to all of the keycodes that qmk has.
-
@waylonwalker
2024
(405) How to Build a Handwired Keyboard - You ...
https://www.youtube.com/watch?v=hjml-K-pV4EFantastic guide to building handwried keyboards. I used this guide to build my first hand-wired macro pad.
-
@waylonwalker
2024
Adam Wathan, Creator of TailwindCSS - YouTube
https://www.youtube.com/watch?v=FhJfm-kzopc&t=2578sTwo inspirational people in one podcast, its cool to see how adam thinks about code, css, webdev, and building businesses.
-
@waylonwalker
2024
Episode #323 Best practices for Docker in pro ...
https://talkpython.fm/episodes/show/323/best-practices-for-docker-in-p ...Great listen for anyone interested in productionizing python code with docker. Itamar brings up some
Don't trust base images for security, upgrade your packages. Vulnerabilties become published and solved giving the bad guys istructions how to wreck your day and these fixes wont come to your docker application for up to two weeks due to image build tatency.
For job based containers pre-compile your pyc for faster startup.
Alpine linux is probably not what you want for python. Many packages such as postgres ship pre-copiled binaries that work for most linux distributions wich use glibc, but alpine uses musl so the binaries will be incompatable requiring you to need to install a bunch of build dependencies.
-
@waylonwalker
2024
(394) Why You Should Build Your Homelab Now - ...
https://www.youtube.com/watch?v=tmw7oYG3vMUHomelabbers have been some of the best co-workers I have ever had. Typically have a get shit done, If there's a way I will find it kind of mentality. If you are struggling to get a job in tech right now its tough. Starting a homelab on a pc you pull out of the trash is a good way to get some experience that you can talk about in interview questions.
Linked video has some great points!
-
@waylonwalker
2024
podman requries qemu-system on ubuntu
https://askubuntu.com/questions/1490805/how-do-i-install-qemu-on-ubunt ...podman requires qemu-system on
❯ podman machine init Looking up Podman Machine image at quay.io/podman/machine-os:5.1 to create VM Extracting compressed file: podman-machine-default-amd64.qcow2: done Error: exec: "qemu-img": executable file not found in $PATH
The fix to this for me was to install qemu-system before podman machine init.
sudo apt update sudo apt install qemu-system
-
@waylonwalker
2024
Customize and apply backgrounds fast | SVG Ba ...
https://www.svgbackgrounds.com/svgbackgrounds is a really awesome resource for svg things recently featured on https://shoptalkshow.com/618/
-
@waylonwalker
2024
darrenburns/posting: Test your HTTP API using ...
https://github.com/darrenburns/postingCurrently Posting is a super early postman like tui (terminal user interface). It looks so good. Darren is really getting into a groove, and textual is getting to a place that is allowing him to really make these beautiful.
I am so impressed with the progress that he has made so early, it looks so close to postman in the freaking terminal, and the ui is so good. He already has think like jump that give you a way to around the ui like easymotion plugins. Theres themes and a command line, oh man its so good. star it.
-
@waylonwalker
2024
Blogmarks that use markdown
https://simonwillison.net/2024/Apr/25/blogmarks-that-use-markdown/Oh I kinda like the name blogmark, as opposed to thoughts like I have chose for the same thing. Aparantly Simon beat me to the punch by 20 years on this one.
-
@waylonwalker
2024
A Link Blog in the Year 2024
https://simonwillison.net/2024/Jun/9/a-link-blog-in-the-year-2024/THIS! is the same reasons that I built thoughts{.hoverlink}. Simon has bee a big inspiration along the way. He defintely changed the format of my posts as I watched him build out his quote posts.
Link blogging is a pleasantly low-pressure way of writing online. Found something interesting? Post a link to it, with a sentence or two about why it's worth checking out.
Ditto! just make a post.
-
@waylonwalker
2024
A Link Blog in the Year 2024 | Kellan Elliott ...
https://laughingmeme.org//2024/06/08/a-link-blog-in-2024.htmlKellan brings some interesting thoughts on where the internet is headed in 2024. Interestingly I see myself headed in a similar direction. Feeling like I know just enough to say fuck it and build my own platform for me to me me, from thoughts{.hoverlink} where I link and make thoughts on posts like this, to reader{.hoverlink} which is my rss reader replacement that I wanted in 2013 when it was killedbygoogle{.hoverlink}
And particular with the collapse of the social spaces many of us grew up with, I feel called back to earlier forms of the Internet, like blogs, and in particular, starting a link blog.
Ai has really had quite the two sided effect since chatgpt launched and set the world ablaze. Suddenly you can get any answer you want as a custom fit blog post for free without effort, thus killing the traffic to any of these sites.
-
@waylonwalker
2024
How to Configure DNS over TLS (DoT) Using Unb ...
https://homenetworkguy.com/how-to/configure-dns-over-tls-unbound-opnse ...Setting up DNS overTLS in opnsense has made my dns just a bit more secure and reliable. I recently had an outage of half the internet within my house. This also hit some of my friends and not some. It did not hit my mobile network. What seems to have happened is a dns issue with my isp not resolving some domains. This setup corrected my issue and I was back online more securely.
!!! Note I did try to setup the family resolver and found it was blocking some sites I am ok with. I decided to drop back to the vanilla resolver and let other services within opnsense control blocking where I can caontrol the whitelist myself.
-
@waylonwalker
2024
argoproj/argo-events: Event-driven Automation ...
https://github.com/argoproj/argo-events?tab=readme-ov-fileArgo events is an event driven automation framework for kubernetes that can create kubernetes objects among other things based on events. I've been using native kubernetes cronjobs to kick off jobs based on a cron trigger.
For instance I am running reader.waylonwalker.com every hour, to rebuild the site and re-deploy it. It takes about two minutes to fetch every rss feed, so this is a nice application of a job compared to a web server fetching the feeds live. Now my posts may be up to an hour stale but they load fast.
Argo events takes event drien architecture to the next level allowing to be triggered by many more things, and do many more things than creating a cron job. I'm definitely thinking about dropping this in my homelab.
-
@waylonwalker
2024
catppuccin/ulauncher: 🇺 Soothing pastel theme ...
https://github.com/catppuccin/ulauncherI am using this theme for Ulauncher in arch and it looks fantastic! One line install (read it first).
python3 <(curl https://raw.githubusercontent.com/catppuccin/ulauncher/main/install.py -fsSL)
-
@waylonwalker
2024
Ulauncher — Application launcher for Linux 🐧
https://ulauncher.io/Just discovered this really cool launcher from the DHH distro omakub. github.com/omakub{.hoverlink}.
Ulauncher comes out of the box looking good, supports extensions, and shortcuts like I have a lot of mac launchers have. I installed it plus a theme and in no time It was looking good and launching applications.
In the past I have leaned in on rofi for task launching, it is good. I just felt it was harder to configure to get right or look good.
-
@waylonwalker
2024
Steam Deck dock
https://kbd.news/Steam-Deck-dock-2291.htmlThis is a sick steam deck dock! With a corne built in laptop style.
-
@waylonwalker
2024
basecamp/omakub: Opinionated Ubuntu Setup
https://github.com/basecamp/omakubThis is DHH's linux startup script. Call it a distro if you want, but he doesn't. It's made to take a vanilla ubuntu install and configure everything the way he likes it. There's a number of great nuggets in here to pick up on.
No need to write bespoke configs for every essential tool just to get started or to be up on all the latest command-line tools. Omakub is an opinionated take on what Linux can be at its best.
Check it out and give it a ⭐ basecamp/omakub{.hoverlink}.
-
@waylonwalker
2024
From the Circle to Epicycles (Part 1) - An an ...
https://www.andreinc.net/2024/04/24/from-the-circle-to-epicyclesThis is a really cool animated visual representation of how sine waves work, how they relate to circles, pi, rad, and how to add up a series of waves to make square and sawtooth waves.
-
@waylonwalker
2024
Darren Burns 🌱 on X: "Here's an early clip of ...
https://x.com/_darrenburns/status/1797763563270095006This looks like a sweet tui postman clone. Darren is really rolling with these tui's. Cant wait to see where this one goes.
-
@waylonwalker
2024
How to Force Dark Mode on Every Website in Go ...
https://www.howtogeek.com/446198/how-to-force-dark-mode-on-every-websi ...Sometimes I struggle to get my os to report dark mode to chrome, luckily there is a way to force chrome to always use dark mode.
I've never really gotten into dark reader and extensions like this. For some reason they all make websites look really weird to me and I don't really care for it. What I want is websites designed to be in dark/light to always go dark, if the designer didn't design dark just let it be light.
-
@waylonwalker
2024
xxHash - Extremely fast non-cryptographic has ...
https://xxhash.com/xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM speed limit. It is proposed in four flavors (XXH32, XXH64, XXH3_64bits and XXH3_128bits). The latest variant, XXH3, offers improved performance across the board, especially on small data.
-
@waylonwalker
2024
xxhash · PyPI
https://pypi.org/project/xxhash/I hit an issue with markata where even though a bunch of articles were cached, the site build was still slow because I was hitting hashlib.sha256 so hard for cache keys. I was shocked when this popped up in my profiler as a significant portion of the time spent. I swapped out for xxhash and that issue completely went away.
-
@waylonwalker
2024
Replicate — Run AI with an API
https://replicate.com/This is so easy compared to self hosting stable diffusion yourself. It even has a nice api that you can hit with curl or python. The pricing seems competitive as well. Bookmarking this to try next time I need something like it.
-
@waylonwalker
2024
How to Deliver Code Every Day | Jake Worth
https://www.jakeworth.com/posts/how-to-deliver-code-every-day/Great set of tips here!
No waiting. No “waiting until tomorrow” or “It’s Friday, let’s wait until Monday” to deploy. If your deploys are so slow that deploying an hour before the end of the day is a risk, that’s a separate problem. If you’re afraid of a Friday deploy, your system is too brittle, or you don’t have foolproof rollback procedures, or you don’t have people you trust on call to resolve it. Each of these is a problem that you can fix.
This one I find interesting I think there are some industries where customers come in large waves over the weekend, and a weekend bug can not only ruin someones day off, take longer to fix, but also cost a lot of money.
Not deploying on Friday is totally what that team should be doing.
Most of us are not that team. Most of us work on small teams supporting some sort of product that Should be able to be tested and rolled back. I completely agree with Jake here, if your not willing to deploy on Friday you are not confident in your product. You need to work on better testing, rollback strategies, and feature flagging is what you need.
I've also been on teams where we don't deploy in the middle of the day or right before we leave for vacation because we are early, our customers are important to us, and we accept that we have not hit our marks yet on the ability to swiftly recover from some downtime so risk is high.
-
@waylonwalker
2024
Be Fast | Jake Worth
https://www.jakeworth.com/posts/be-fast/Be Fast, Practice, Hone your craft. There's a lot to be said here about honing your craft for editing text, picking up a few extra WPM, learning vim shortcuts.
Also just build shit. The more you build new and different things the more not only your text editing will just roll out, your skills to see patterns in code and architecture will flourish.
Read their bios, and the answer is always no. They loved to play, sure. They had some base talent, typically. But they also invested an absurd amount of time into that skill set.
This! is actually what turned me on to Post Malone. I remember hearing his story in how he was just known as the guy with a guitar because he was always playing it between class and everything.
-
@waylonwalker
2024
Zellij on X: "POV your sysadmin rigged your t ...
https://x.com/Zellij_dev/status/1574675207935107072This one is too funny. opening a sixel image in the terminal when logging into prod.
-
@waylonwalker
2024
Text Decoration - Tailwind CSS
https://tailwindcss.com/docs/text-decorationTailwind calls strikethrough line-through. This caught me off guard and took me a minute to find.
Control how text is decorated with the underline, no-underline, and line-through utilities.
-
@waylonwalker
2024
Digital Gardening for Non-Technical Folks
https://maggieappleton.com/nontechnical-gardeningMaggie is a fantastic proponent to the digital gardening movement. In this article she proposes 3 ways for someone to start their own digital garden with low friction and no code.
-
@waylonwalker
2024
We have a right to repair! with Kyle Wiens, F ...
https://changelog.com/podcast/582This is one of my favorite changelog episodes of all time. I had no idea all the work that has gone into the right to repair and ifixit. They talk a lot about apple and its trend to be less repairable from unservicable air pods to serialized components within iphone.
A lot of legal talk that was far more interesting that I thought it would be. Recently winning the right to repair case against John Deere, and creating repairability scores for devices to be placed in stores like energy guide is.
-
@waylonwalker
2024
Try Out the Latest Linux Gnome DE With Distro ...
https://linuxtldr.com/gnome-de-in-distrobox/Get gnome running in distrobox.
-
@waylonwalker
2024
STLGears.com | The Free STL Gear Designer
https://www.stlgears.com/generators/3dprintThis is a pretty nice gear generator. I printed a few gears today and it worked great so far.
-
@waylonwalker
2024
eraser-dev/eraser: 🧹 Cleaning up images from ...
https://github.com/eraser-dev/eraser?tab=readme-ov-fileThis is kinda sick, its a tool to clean up container images in a k8s cluster.
-
@waylonwalker
2024
Distrobox
https://distrobox.it/usage/distrobox-host-exec/distrobox gives you
distrobox-host-exec
to run commands on the host. This is handy to get access to host level clis that you probably wouldn't want to run from the container likepodman
,docker
,flatpak
.DESCRIPTION distrobox-host-exec lets one execute command on the host, while inside of a container.
Under the hood, distrobox-host-exec uses host-spawn a project that lets us execute commands back on the host. If the tool is not found the user will be prompted to install it.
-
@waylonwalker
2024
Are We Anti-Cheat Yet?
https://areweanticheatyet.com/A comprehensive community built index of anti-cheat support for linux very similar to proton, but specific to anticheat support.
-
@waylonwalker
2024
ublue-os/image-template: Build your own custo ...
https://github.com/ublue-os/image-templateublue-os makes a github template for making your own git repo with actions that build out your own personal ublue iso.
-
@waylonwalker
2024
ublue-os/obs-studio-portable: OCI container i ...
https://github.com/ublue-os/obs-studio-portableDistrobox 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.
-
@waylonwalker
2024
How Ahrefs Gets a Billion Dollar-Worth Infras ...
https://tech.ahrefs.com/how-ahrefs-gets-a-billion-dollar-worth-infrast ...2024 has been a wild year for infra with going "back" to on prem being made popular by @dhh. 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 continue to grow!
I just notices that they didn't even account for egress, support and taxes, egress costs would make a difference.
-
@waylonwalker
2024
Safer Bash Shebang Recipes - Just Programmer' ...
https://just.systems/man/en/safer-bash-shebang-recipes.html?highlight= ...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!"
-
@waylonwalker
2024
Justfile Cheat Sheet by linux_china - Downloa ...
https://cheatography.com/linux-china/cheat-sheets/justfile/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.
-
@waylonwalker
2024
A quote from Tim Paul
https://simonwillison.net/2024/May/13/tim-paul/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
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
-
@waylonwalker
2024
PopSQL - Collaborative SQL Editor - Bring Ord ...
https://popsql.com/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.
-
@waylonwalker
2024
Pricing | PopSQL
https://popsql.com/pricinginteresting 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.
-
@waylonwalker
2024
(345) Dax Raad - SST, Build modern full-stack ...
https://www.youtube.com/watch?v=V_2OLtsD0N8&t=4604such 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.
-
@waylonwalker
2024
(342) Install Pokemon TCG Live on Steam Deck ...
https://www.youtube.com/watch?v=zfN4hk7FelII 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
-
@waylonwalker
2024
Fields - Pydantic
https://docs.pydantic.dev/2.7/concepts/fields/#field-representationexclude=True
andrepr=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'
-
@waylonwalker
2024
Hatch v1.10.0 - Hatch
https://hatch.pypa.io/latest/blog/2024/05/02/hatch-v1100/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.
-
@waylonwalker
2024
Using journalctl - The Ultimate Guide To Logg ...
https://www.loggly.com/ultimate-guide/using-journalctl/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.
-
@waylonwalker
2024
Bug #2006590 “gdm3 crashes with SIGTRAP on st ...
https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/2006590This 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
-
@waylonwalker
2024
Alir3z4/html2text: Convert HTML to Markdown-f ...
https://github.com/Alir3z4/html2textSuper 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.
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)
-
@waylonwalker
2024
I Interviewed Uncle Bob - YouTube
https://www.youtube.com/watch?v=UBXXw2JSlooFantastic 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.
-
@waylonwalker
2024
How an empty S3 bucket can make your AWS bill ...
https://medium.com/@maciej.pocwierz/how-an-empty-s3-bucket-can-make-yo ...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 this or will do this? And AWS has no response other than to take thier money.
After contacting them he was able to get it cancelled, but this is no guarantee. We've seen other cloud vendors stick users like this with a few thousand dollar bills after cutting their bill to 5% of the original.
AWS was kind enough to cancel my S3 bill. However, they emphasized that this was done as an exception.
2024 is wild on the cloud hosting front, own your shit or be careful.
-
@waylonwalker
2024
Media Types
https://www.iana.org/assignments/media-types/media-types.xhtml#textA full list of standard
Accept
types.This is a handy reference.
-
@waylonwalker
2024
Network Types - Pydantic
https://docs.pydantic.dev/2.7/api/networks/#pydantic.networks.EmailStrpydantic 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='contact@mail.com')) #> email='contact@mail.com'
-
@waylonwalker
2024
rich.panel — Rich 13.6.0 documentation
https://rich.readthedocs.io/en/stable/reference/panel.htmlThis 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.
-
@waylonwalker
2024
Handling Errors - FastAPI
https://fastapi.tiangolo.com/tutorial/handling-errors/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 preferences. the default remains json, but if a user requests
text/html
it will be an html response, and text forapplication/rtf
ortext/plain
-
@waylonwalker
2024
Creating SSH Apps with Charm Wish and Laravel ...
https://blog.joe.codes/creating-ssh-apps-with-charm-wish-and-laravel-p ...Joe has a sick cli.labs site for deploying tui applications.
ssh cli.lab.joe.codes
-
@waylonwalker
2024
white-space - CSS: Cascading Style Sheets | M ...
https://developer.mozilla.org/en-US/docs/Web/CSS/white-spacehtml can preserve newline
\n
characters by styling an element withwhite-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. -
@waylonwalker
2024
</> htmx ~ The response-targets Extension
https://htmx.org/extensions/response-targets/The htmx 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/htmx.org@1.9.12/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>
-
@waylonwalker
2024
How to Restart All Pods in a Kubernetes Names ...
https://blog.boot.dev/open-source/how-to-restart-all-pods-in-a-kuberne ...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
-
@waylonwalker
2024
⭐⭐⭐⭐⭐ Changelog Master Feed
https://changelog.com/masterJerod (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.
⭐⭐⭐⭐⭐
-
@waylonwalker
2024
MarkdownDown
https://markdowndown.vercel.app/Small web app to convert html 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.
-
@waylonwalker
2024
Boston Dynamics’ new humanoid moves like no r ...
https://arstechnica.com/gadgets/2024/04/boston-dynamics-debuts-humanoi ...Award for the creepiest way to stand up a robot from lying flat.
-
@waylonwalker
2024
Rug pull, not cool! (Changelog & Friends #40)
https://changelog.com/friends/40Five star episode with Jarod and Adam shootin the crap.
Sucks that the guest had to back out, what a wild world 2024 is. Filled with license and pricing changes.
Interesting to hear the journey into zed, way to go Thorston diving all the way into working at zed.
I later saw this through a YT short, and man does it hold up to the creepy level that they described.
This is a legit cool service, that converts html into markdown
-
@waylonwalker
2024
argocd automated sync
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
-
@waylonwalker
2024
Manual Upgrades | K3s
https://docs.k3s.io/upgrades/manualYou can give k3s an install channel to install
stable
,latest
, or specific versions like1.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>
-
@waylonwalker
2024
Devin's Upwork "side hustle" exposed (Changel ...
https://changelog.com/news/90Damn 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.
-
@waylonwalker
2024
sql - How can I list the tables in a SQLite d ...
https://stackoverflow.com/questions/82875/how-can-i-list-the-tables-in ...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;"
-
@waylonwalker
2024
inline-snapshot
https://15r10nk.github.io/inline-snapshot/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 runpytest --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)
-
@waylonwalker
2024
nalgeon/redka: Redis re-implemented with SQLi ...
https://github.com/nalgeon/redkaRedka 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.
-
@waylonwalker
2024
Arch Linux - News: The xz package has been ba ...
https://archlinux.org/news/the-xz-package-has-been-backdoored/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.
-
@waylonwalker
2024
My harpoon config
NoneInstall 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").values local function toggle_telescope(harpoon_files) local file_paths = {} for _, item in ipairs(harpoon_files.items) do table.insert(file_paths, item.value) end require("telescope.pickers").new({}, { prompt_title = "Harpoon", finder = require("telescope.finders").new_table({ results = file_paths, }), previewer = conf.file_previewer({}), sorter = conf.generic_sorter({}), }):find() end vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end, { desc = "Open harpoon window" }) end return M
-
@waylonwalker
2024
From Vim To Zed - YouTube
https://www.youtube.com/watch?v=ZRnWmNdf5IE&t=612I 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.
-
@waylonwalker
2024
Use an llm to automagically generate meaningf ...
https://harper.blog/2024/03/11/use-an-llm-to-automagically-generate-me ...This is pretty sick, I wanted this early on when I was making lockhart. I wanted to do the git 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.
-
@waylonwalker
2024
node.js - How to fix npm throwing error witho ...
https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-e ...Its sad that this is not the accepted answer.
mkdir ~/.npm-global export NPM_CONFIG_PREFIX=~/.npm-global export PATH=$PATH:~/.npm-global/bin
-
@waylonwalker
2024
google chrome - Webkit scrollbar CSS, always ...
https://stackoverflow.com/questions/35968553/webkit-scrollbar-css-alwa ...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.
-
@waylonwalker
2024
Cache Ruins Everything Around Me - YouTube
https://www.youtube.com/watch?v=j8oD976nhZkThis is an interesting problem. I want to make a solution for this on htmx-patterns. I would make user specific routes with an
hx-get
rather than serving the whole page, serve a partial withhx-oob
s to fill in user specific data with a no cache on the cdn level. -
@waylonwalker
2024
building a youtube tool in 24 hours to prove ...
https://www.youtube.com/watch?v=ws86p5iUaRsSo cool to see ROX build this over the course of a day.
-
@waylonwalker
2024
Hogwarts Legacy Argyllshire Map: What does th ...
https://dotesports.com/hp/news/hogwarts-legacy-argyllshire-map-what-do ...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.
-
@waylonwalker
2024
How can I add my YouTube videos via RSS? - So ...
https://help.socialbee.com/article/129-how-can-i-add-my-youtube-videos ...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.
-
@waylonwalker
2024
sql - SQLite: COUNT slow on big tables - Stac ...
https://stackoverflow.com/questions/8988915/sqlite-count-slow-on-big-t ...Another interesting option for slow count queries in sqlite.
If you haven't DELETEd any records, doing:
SELECT MAX(ROWID) FROM "table" LIMIT 1;
-
@waylonwalker
2024
Optimizing SQLite for servers
https://kerkour.com/sqlite-for-serversVery 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 is to use a trigger on INSERT and DELETE that updates a running count in a separate table then query that separate table to find the latest count.
-
@waylonwalker
2024
From Nursing to Programming ft. Trash Puppy | ...
https://www.youtube.com/watch?v=fsExvZY4pe4Inspiring 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.
-
@waylonwalker
2024
Some Git poll results
https://jvns.ca/blog/2024/03/28/git-poll-results/great poll of git questions
poll: did you know that in a git merge conflict, the order of the code is different when you do a merge/rebase?
merge:
<<<<<<< HEAD YOUR CODE
OTHER BRANCH'S CODE
c694cf8aabe
rebase:
<<<<<<< HEAD OTHER BRANCH'S CODE
YOUR CODE
d945752 (your commit message)
This one explains a lot. I think I knew this, I might have seen it somewhere, but I have definitely noticed it go both ways and confuse the crap out of me. Feels very similar to how
--ours
and--theirs
flip flops. -
@waylonwalker
2024
Sealed Secrets
https://sealed-secrets.netlify.app/kubeseal is a pretty simple to get started with way to manage secrets such that they can be stored in a git repo and be picked up by your continuous delivery service.
Sealed Secrets provides declarative Kubernetes Secret Management in a secure way. Since the Sealed Secrets are encrypted, they can be safely stored in a code repository. This enables an easy to implement GitOps flow that is very popular among the OSS community.
-
@waylonwalker
2024
Middleware Explained - YouTube
https://www.youtube.com/watch?v=JKb_rYvdmpoGreat episode covering a seemingly simple topic. What I really benefitted from was hearing all the different use cases, from logging, debugging, to a/b testing, caching, and auth. I hadn't even thought of it being applied to a router. I thought of it being applied for an entire application. This seems very useful for things like an admin router, all routes would need to have the admin role to get in.
-
@waylonwalker
2024
fastapi decorators
NoneI've been using these decorators to modify the behavior of specific routes. It will do things like 404 admin only routes in a way that looks just like fastapi's default, or only allow certain roles into the route, or redirect unauthenticated users to login.
After listening to yesterday's syntaxfm I'm now really thinking about middleware and the benefits it might have. middleware would make it easy to apply things like admin to an entire admin router, so you wont forget it on any one admin route. It will look cleaner as the admin checker is only applied once per router, not once per route.
import inspect import time from functools import wraps from inspect import signature from fastapi import Request from fastapi.responses import FileResponse, JSONResponse, RedirectResponse from starlette import status from fokais.config import get_config from fokais.models.user import Role config = get_config() admin_routes = [] authenticated_routes = [] not_cached_routes = [] cached_routes = [] def not_found(request): hx_request_header = request.headers.get("hx-request") user_agent = request.headers.get("user-agent", "").lower() if "mozilla" in user_agent or "webkit" in user_agent or hx_request_header: return config.templates.TemplateResponse( "error.html", {"status_code": 404, "detail": "Not Found", "request": request}, status_code=404 ) else: return JSONResponse( content={ "status_code": 404, "detail": "Not Found", }, status_code=404, ) def no_cache(func): not_cached_routes.append(f"{func.__module__}.{func.__name__}") @wraps(func) async def wrapper(*args, request: Request, **kwargs): # my_header will be now available in decorator if "request" in signature(func).parameters: kwargs["request"] = request if inspect.iscoroutinefunction(func): response = await func(*args, **kwargs) else: response = func(*args, **kwargs) response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" response.headers["Pragma"] = "no-cache" response.headers["Expires"] = "0" return response return wrapper def cache(max_age=86400): def inner_wrapper(func): cached_routes.append(f"{func.__module__}.{func.__name__}") @wraps(func) async def wrapper(*args, request: Request, **kwargs): if "request" in signature(func).parameters: kwargs["request"] = request if inspect.iscoroutinefunction(func): response = await func(*args, **kwargs) else: response = func(*args, **kwargs) response.headers[ "Cache-Control" ] = f"public, max-age={max_age}, stale-while-revalidate=31536000, stale-if-error=31536000" response.headers["Expires"] = f"{int(time.time()) + max_age}" return response return wrapper return inner_wrapper def admin_only(func): admin_routes.append(f"{func.__module__}.{func.__name__}") @wraps(func) async def wrapper(*args, request: Request, **kwargs): if request.state.user is None: return not_found(request) if request.state.user.role != Role.admin: return not_found(request) if "request" in signature(func).parameters: kwargs["request"] = request if inspect.iscoroutinefunction(func): response = await func(*args, **kwargs) else: response = func(*args, **kwargs) return response return wrapper def authenticated(roles=[Role.user, Role.admin], redirect_to="get_login"): def inner_wrapper(func): authenticated_routes.append(f"{func.__module__}.{func.__name__}") @wraps(func) async def wrapper(*args, request: Request, **kwargs): if request.state.user is None: return RedirectResponse( url=request.url_for(redirect_to, source=request.url), status_code=status.HTTP_302_FOUND ) if request.state.user.role not in roles: return not_found(request) if "request" in signature(func).parameters: kwargs["request"] = request if inspect.iscoroutinefunction(func): response = await func(*args, **kwargs) else: response = func(*args, **kwargs) return response return wrapper return inner_wrapper default_data = {} def defaults(data=default_data): def inner_wrapper(func): default_data[f"{func.__module__}.{func.__name__}"] = data @wraps(func) async def wrapper(*args, request: Request, **kwargs): if "request" in signature(func).parameters: kwargs["request"] = request if inspect.iscoroutinefunction(func): response = await func(*args, **kwargs) else: response = func(*args, **kwargs) return response return wrapper return inner_wrapper
-
@waylonwalker
2024
Simon Willison on X: "TIL Google Chrome has a ...
https://twitter.com/simonw/status/1772043579231445366Huh, so this is just built right into the chrome cli.
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ --headless \ --screenshot=/tmp/shot1.png \ https://simonwillison.net
-
@waylonwalker
2024
fastapi https url_for
Nonejinja's
url_for
in fastapi does not account for https by default, there is probably a better way, but this is a way that allows me to configure when I use http vs https.@pass_context def https_url_for(context: dict, name: str, **path_params: Any) -> str: """ always convert http to https """ request = context["request"] http_url = request.url_for(name, **path_params) return str(http_url).replace("http", "https", 1) def get_templates(config: BaseSettings) -> Jinja2Templates: templates = Jinja2Templates(directory="templates") templates.env.globals["https_url_for"] = https_url_for ## only use the default url_for for local development, for dev, qa, and prod use https if os.environ.get("ENV") in ["dev", "qa", "prod"]: templates.env.globals["url_for"] = https_url_for console.print("Using HTTPS") else: console.print("Using HTTP") return templates
-
@waylonwalker
2024
Cassidy on X: "I MADE AN APP ✨ https://t.co/B ...
https://twitter.com/cassidoo/status/1770900985382138291Damn are one time paid and have it apps making a comeback? Seems like the perfect thing to have someone else automate and not pay a subscription for.
Genius Idea Cassidy!!
Now what do you call this, its not software as a service, is this just sofware?
-
@waylonwalker
2024
learning strawberry
Noneimport logging from typing import List import strawberry from fastapi import FastAPI from strawberry.fastapi import GraphQLRouter logger = logging.getLogger(__name__) authors = {} books = {} book_authors = {} authors_books = {} def get_author_for_book(root) -> "Author": return authors[book_authors[root.id]] @strawberry.type class Book: id: int title: str author: "Author" = strawberry.field(resolver=get_author_for_book) def get_books_for_author(root) -> List[Book]: print(f"getting books for {root}") return [books[i] for i in authors_books[root.id]] @strawberry.type class Author: id: int name: str books: List[Book] = strawberry.field(resolver=get_books_for_author) authors = {1: Author(id=1, name="Michael Crichton")} books = {1: Book(id=1, title="Jurassic Park")} # relationships book_authors[1] = 1 authors_books[1] = [1] def get_author_by_id(id: int) -> Author: return authors.get(id) def get_book_by_id(id: int) -> Book: return books.get(id) def get_authors(root) -> List[Author]: return authors.values() def get_books(root) -> List[Book]: print(books) print(authors) print(book_authors) print(authors_books) return books.values() @strawberry.type class Query: author: Author = strawberry.field(resolver=get_author_by_id) book: Book = strawberry.field(resolver=get_book_by_id) authors: List[Author] = strawberry.field(resolver=get_authors) books: List[Book] = strawberry.field(resolver=get_books) @strawberry.field def hello(self, name: str = None) -> str: """this is a resolver for hello, just like authors and books have a resolver""" if name is None: return "Hello World" return f"Hello {name}" @strawberry.input class AddBookInput: title: str = strawberry.field(description="The title of the book") author: str = strawberry.field(description="The name of the author") @strawberry.type class Mutation: @strawberry.field # def add_book(self, title: str, author: str) -> Book: def add_book(self, book: AddBookInput) -> Book: print(f"i got a book: {book.title}") print(f"of type {type(book.title)}") name = book.author title = book.title author = [author for id, author in authors.items() if author.name == name] print(f"here are the names {[author.name for id, author in authors.items()]}") print(f"my name is { name }") print(f"this is the author i found {author}") if author: author = author[0] author_id = author.id else: author_id = max(authors.keys()) + 1 author = Author(id=author_id, name=name) authors[author_id] = author book = [b for id, b in books.items() if b.title == title] if book: book = book[0] else: book_id = max(books.keys()) + 1 book_authors[book_id] = author_id print(f"I am making book {book_id}") print(f"{name} has books {authors_books.get(author_id)}") if author_id in authors_books.keys(): authors_books[author_id].append(book_id) else: authors_books[author_id] = [book_id] book = Book(id=book_id, title=title) books[book_id] = book print(f"i got books: {books}") print(f"i got authors: {authors}") return book schema = strawberry.Schema(query=Query, mutation=Mutation) router = GraphQLRouter( schema, ) app = FastAPI()
-
@waylonwalker
2024
Joining the split keyboards club: a Moonlande ...
https://carlosbecker.com/posts/split-keyboard-moonlander/I switched from a 60% vortex pok3r to a 40% corne June, 2021. I can relate to a lot of what Carlos talks about here. I think going from 60%-40% made my journey harder than it needed to be. There's no going back now, but it took me a really long time to be able to hit all of the numbers and symbols, just figuring out how to do the layout was hard there's not much space.
I didn’t touch type. I never really used my pinkies, except maybe for ESC, Shift, CTRL, Backspace et al.
I can relate to this, my typing habits were terrible. Shortly before going split ortho I worked on my speed with lots, and lots of practice on keybr and monkeytype. I took my speed from 35wpm to 80wpm with a few months of steady practice. This is one of the best things I did for myself.
Once I got split it dropped down to single digits and slowly rose back up to 80, just barely breaking my PB on monkeytype.
I still feel like I still can’t type at my previous max speed — mostly because I wasn’t used to use my pinky and used the “wrong finger” for a lot of keys, but, nevertheless: I got there! I can touch type now! Yay! 🥳
I feel this! I'm pretty sure that I could still type faster on a normal keeb given some practice, but damn a split ortho is so comfy. A normal row stagger feels like its twisting my fingers.
Update: my top speed was 125wpm for 10 words, and I can comfortably type between 80-100wpm now. Good enough.
Damn thats good.
The bad news is that I’ll need to bring my keyboard with me everywhere I go now…
Yes, normal keebs feel awkward and like your fingers are all twisted up.
-
@waylonwalker
2024
My workflow, part 1
https://carlosbecker.com/posts/workflow-pt1/Carlos has a pretty sick setup here, I can relate to mostly, cept the macos part. My main critique is that I don't think he gave window managers much chance on linux, and they just don't work on MacOS/Windows.
Most of the time I have a single, maximized window.
I can relate to this. I should really make a full post about my experience with tiling window managers. TLDR, I came for tiling and I stayed for the workspaces.
Multiple Displays An exception here could be streaming: having multiple displays can help preventing doxing yourself if you only share the screen of one of them. I only did stream like 3 times and that’s what I did, but I’m sure experienced streamers have better workflows (with or without multiple displays).
Accurate, my home machine uses one monitor, and for work I use one monitor+laptop. I pair, screenshare, and present quite a bit at work, and its good to have one screen for sharing, and one for seeing things like the app you are sharing from (chat, cams, etc)
-
@waylonwalker
2024
Using Netlify Analytics to Build a List of Po ...
https://blog.jim-nielsen.com/2020/using-netlify-analytics-to-build-lis ...This is a sick feature of Jim's blog, I am really inspired by this. I am not sure how to do it for my own. I honestly think the easiest non locked in way would be to just use google search console results. It's definitely a different way to think about it, but most of my traffic is coming from google search, so it would be a pretty good ballpark estimate.
-
@waylonwalker
2024
605: Jim Nielsen on Subversive URLs, Blogging ...
https://shoptalkshow.com/605/An absolute fantastic episode about blogging, thinking about a web1.0 kind of world today, and what it means moving forward.
Web 1.0 is robust, you own your own destiny, you own your data, you can do what you want. There is no platform to tell you what you can and cannot do. But the future web is stealing your data to build AI models, spam sites are duplicating your content and stealing your SEO. You may or may not care, but at the end whether you get traffic or now you own your web 1.0 sites.
-
@waylonwalker
2024
Configure Liveness, Readiness and Startup Pro ...
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liv ...What is the difference between health, liveness, readiness, and startup? This article does a great job at a full writeup description of how it works in kubernetes, here is my TLDR.
-
health 200 OK - I'm still responding to requests
-
health ERR - something happened and I cant respond to requests
-
liveness 200 OK - I'm ready for more work
-
liveness ERR - I'm still responding to requests, and i'm already working send requests to another pod, or scale up
Z-pages
These probes are commonly deployed at
/healthz
and/livez
endpoints.Why the z?
z is a convention that comes from google for meta endpoints to reduce conflict with actual endpoints, and can be deployed to any application.
-
-
@waylonwalker
2024
docker - Where does the convention of using / ...
https://stackoverflow.com/questions/43380939/where-does-the-convention ...The convention of "z-pages" comes from google and reduces the likelihood of collisions with application endpoints and keep the convention across all applications.
-
@waylonwalker
2024
Placehold | A simple, fast and free image pla ...
https://placehold.co/This is a handy placeholder generator for generating placeholder items like images, and videos.
-
@waylonwalker
2024
My New Python Lsp Setup
NoneI figured out the killer combination for python lsp servers, ruff and jedi! ruff does all of the diagnostics and formatting, then jedi handles all the code objects like go to definition and go to reference.
local servers = { ruff_lsp = {}, jedi_language_server = {}, }
-
@waylonwalker
2024
flake8-to-ruff · PyPI
https://pypi.org/project/flake8-to-ruff/Underrated python library to on board ruff, or just use it on a project where its not the norm. ruff claims that its 99.9% compatible with black and when you read through the known differences they are clearly edge case bugs in black.
See this page for more about the comparison to black https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black
oh and I just noticed that it is maintianed by Charlie, and comes straight out of astral.
-
@waylonwalker
2024
searching my thoughts locally
NoneFirst I need to fetch my thoughts from the api, and put it in a local sqlite database using
sqlite-utils
.fthoughts () { # fetch thoughts curl 'https://thoughts.waylonwalker.com/posts/waylonwalker/?page_size=9999999999' | sqlite-utils insert ~/.config/thoughts/database2.db post --pk=id --alter --ignore - }
Now that I have my posts in a local sqlite database I can use
sqlite-utils
to enable full text search and populate the full text search on the post table using the title message and tags columns as search.sthoughts () { # search thoughts # sqlite-utils enable-fts ~/.config/thoughts/database2.db post title message tags # sqlite-utils populate-fts ~/.config/thoughts/database2.db post title message tags sqlite-utils search ~/.config/thoughts/database2.db post "$*" | ~/git/thoughts/format_thought.py | bat --style=plain --color=always --language=markdown } alias st=sthoughts
Now I am ready to search my thoughts, which is a tiny blog format that I created mostly for leaving my own personal comment on web pages, so most of them have a link to some other online content, and their title is based on the authors title.
-
@waylonwalker
2024
lonecraft
https://screenshots.waylonwalker.com/lonecraft.pngThis is the best tree I have ever built in minecraft. It took at least 4 stacks of logs and leaves despite what it looks like.
It is placed where Welscraft's island in the hermitcraft season 10 seed, but on our own server we call lonecraft.
We started this server a few weeks after hermitcraft season 10 started, and play on it a few times per week. It has a pretty successful day one iron farm that took us way more than one day to complete, and the farm behind this is our first ever villager driven farm. Somehow potatoes got cross contaminated and now its pumping out potatoes and some bread, but no carrots or beat roots.
World Seed: 5103687417315433447
-
@waylonwalker
2024
Formatting codes – Minecraft Wiki
https://minecraft.wiki/w/Formatting_codesMinecraft MOTD and server names have formatting codes so that you can get colors, bold, underlined, italics, in your message of the day or server name. See the article for all the cods.
-
@waylonwalker
2024
jesseduffield/lazydocker: The lazier way to m ...
https://github.com/jesseduffield/lazydockerI've been using this for a few weeks now and it's fantastic. It's reminds me of lazygit, it gives a nice quick interface into the things I need and it just works. Yes I can git status to see what changed, then diff the files, then commit hunks, but lazygit can do that in just a few keystrokes. lazydocker does this for docker. It gives me a nice view into whats running, what's eating up disk space, and the networks I have. And if I see I have a bunch of exited containers, there is a bulk command righ there to clean them up.
tldr
docker ps
on steroids -
@waylonwalker
2024
(265) I'm Coming Around To Go... - YouTube
https://www.youtube.com/watch?v=N8fjU_hlwDIGo is feeling more and more like something I could throw in my tool belt as a python dev. I really like that it's garbage collected and has great error management. I am just not sure how to work it in without it being the main thing. The thing that is so cool is the ability to ship tiny pre-compiled binaries that just work, and the raw speed. these binaries just get up and working without any warm up. writing any cli in python I'm going to be using something like typer, and it takes half a second just to warm up, so even hello world cannot be faster than half a second.
-
@waylonwalker
2024
(265) Creating One-To-Many Relationships in F ...
https://www.youtube.com/watch?v=VVX7JIWx-ssGreat example from Anthony showing how easy it is to practice building database orm models and playing with them in a repl. This is good practice even if you are in a big code base to be able to test and learn in a simplified code base that does not have a mountain of other code around atuh, permissions, security, and other complex things that come into real production code bases that might make it hard to focus on what you are trying to do.
!!! Note Anthony uses backref here, thats legacy, use back_populates on both parent and child.
-
@waylonwalker
2024
python - Concepts of backref and back_populat ...
https://stackoverflow.com/questions/51335298/concepts-of-backref-and-b ...Today I came across some sqlalchemy models that created some relationships, some used
backref
some usedback_populates
. I was stumped why, I had never came accrossbackref
before and I felt skill issues sinking in.backref is considered legacy
https://docs.sqlalchemy.org/en/14/orm/backref.html
As stated in the sqlalchemy docs, backref is a legacy feature. Its shorthand to creating relationships between parent and child, but only adding it to the parent. While this is simpler it introduces some invisible magic.
-
@waylonwalker
2024
2.5 Admins 180: Email 777 – 2.5 Admins
https://2.5admins.com/2-5-admins-180/How do you pronounce URL, is it U.R.L or Earle? I'm about 50/50, mostly when I am in a hurry I use Earle as it is one syllable and easy to say. I picked this up from MPJ of fun fun function, who took over Dev Tips. In this episide Jim uses Earle and they make fun of him. If it's good enough for Jim, I am done with my 50/50 and I'm going all in on Earle.
Episode also included a fastinating corrdinated attack that used Ars Technica profile photos communicate directions for the next attack via query parameters in the image url.
-
@waylonwalker
2024
(212) Replace Github Copilot with a Local LLM ...
https://www.youtube.com/watch?v=F1bXfnrzAxMThis really makes me want to try Dolphin Mixtral with ollama now. It looks very impressive from this video. The ability to keep adding features before becoming confused is though with a lot of these llms.
Being chat based, this is not a co pilot replacement. I was really hoping for an in line co pilot like tool that I can run locally. I have not used co pilot yet, but I have had great luck with codeium.
-
@waylonwalker
2024
(212) Dawn Gate - The Game that Solved Toxici ...
https://www.youtube.com/shorts/869rtyUlh1UThor is just straight up a great Human being! Getting a gaming company to tie power and progression with being nice is an incredible feat.
-
@waylonwalker
2024
I'm Skeptical Of Low Code - YouTube
https://www.youtube.com/watch?v=4nK03E0jvnIGreat take on low code. I have definitely felt the pressure of being presented low code options, "look it does almost everything you need, and you can do it without code." Granted there are tons of great low code environments that serve their markets well (things like zapier).
As pointed out here when they fall short rather than being hard, it goes to nearly impossible. As Theo points out here many applications follow an 80/20 rule. 80% of the app is really easy to put together, and takes about 20% of the time, probably less. What no code does is it takes that 80% that is already easy, makes it even easier ( pitches it as faster whether or not that is true ), and makes the last 20% of the project impossibly hard to create and maintain, so you just should have picked a tool that had the capability of doing the whole thing from the start anyways.
-
@waylonwalker
2024
The One Eyed Fighting Kirby
https://www.youtube.com/watch?v=9_Ekt1PZBzQ&t=351sI've heard prime say just give it the one eyed fighting kirby so many times, and execute it few times, and there is no way to find it online, so this will be the link that I will come to, when I need to remember what @theprimeagen means when he says Give it the one eyed fighting kirby.
:s/\(.*\);/console.log(\1)
So what is this?
This is a vim substitute comand to replace text in the buffer. the one eyed fighting kirby is a regex capture group to capture everything between matches, and assign it a value to place back in after the match.
substitute in a nutshell,
:s/<what you want to replace>/<what you want to replace with>
More examples
Here is a contrived example of text.
here there from here go there here = some_fuction(there)
Now for some reason I want to switch all of the words here and there. I can do that with three capture groups, \1 is here, \2 is everything between, \3 is there.
:%s/\(here\)\(.*\)\(there\)/\3\2\1
Just give it the one eyed fighting kirby
~Prime
still struggling
I thought this explaination from phind was good and more verbose than mine.
describe this vim substitute regex
:%s/(here)(.)(there)/\3\2\1 ANSWER | PHIND V9 MODEL The given Vim substitute regex :%s/(here)(.)(there)/\3\2\1 performs the following operation:
%s initiates the substitute command. The percent sign % indicates that the operation should be performed across the entire file, not just the current line 2. (here) is a capturing group that matches the word "here". The parentheses ( and ) are used to define a group, and the content inside them is what the group will match 3. (.) is another capturing group that matches any sequence of characters. The . inside the group is a wildcard that matches any character (except a newline), and the * quantifier means "zero or more of the preceding element". So, this group will match any sequence of characters 2. (there) is yet another capturing group that matches the word "there". This group will match the word "there" that appears after the word "here" and any sequence of characters 3. /\3\2\1 is the replacement part of the command. Here, \3, \2, and \1 are backreferences to the matched groups. They correspond to the words "there", any sequence of characters, and "here", in that order. So, this command replaces the matched pattern with the word "there", followed by any sequence of characters, and ending with the word "here" 4. So, in summary, this command searches for the pattern "here", followed by any sequence of characters, and ending with "there", and replaces it with the same pattern but reversed ("there", followed by the original sequence of characters, and ending with "here").
I used this techniq on [[ refactoring-into-wikilinks ]].
-
@waylonwalker
2024
Java - ArchWiki
https://wiki.archlinux.org/title/java#Switching_between_JVMToday I learned that arch has a helper script
archlinux-java
to set the version of java.archlinux-java status archlinux-java set <JAVA_ENV_NAME>
-
@waylonwalker
2024
charmbracelet/mods: AI on the command line
https://github.com/charmbracelet/modsThis is a pretty sweet interface into llms. I used it a bit with my son tonight while he was asking me for datapack ideas.
❯ mods -f 'I am trying to have fun on my minecraft server and am creating a minecraft datapack send me some load.mcfuncions that will make it fun'
You can continue the conversation with a
-C
❯ mods -C -f 'I like where you are going with number 4, can you make it so that it runs when a player opens a door'
You can pass it some data
curl https://waylonwalker.com/thoughts-on-unit-tests/ | mods -f 'summarize this post'
-
@waylonwalker
2024
charmbracelet/mods: AI on the command line
https://github.com/charmbracelet/modsThis is a pretty sweet interface into llms. I used it a bit with my son tonight while he was asking me for datapack ideas.
❯ mods -f 'I am trying to have fun on my minecraft server and am creating a minecraft datapack send me some load.mcfuncions that will make it fun'
You can continue the conversation with a
-C
❯ mods -C -f 'I like where you are going with number 4, can you make it so that it runs when a player opens a door'
-
@waylonwalker
2024
Gridfinity | The modular, open-source grid st ...
https://gridfinity.xyz/specification/I am starting to build out some custom tool holders for my tool box, and using gridfinity. This is a super handy reference guide for spec'ing out the bases.
-
@waylonwalker
2024
Read a Range of Data - LIMIT and OFFSET - SQL ...
https://sqlmodel.tiangolo.com/tutorial/limit-and-offset/Today I was running some sqlmodel queries through the sqlalchemy orm. Admittedly I've not done enough orm queries before, and I've done quite a bit of raw sql. I was trying to get objects from two separate models that had relationships setup.
session.query(User, Images).where(User.id == 3).all()
It is incredibly slow, and gives me the following warning.
SELECT statement has a cartesian product between FROM element(s)
What I learned from the SQLModel docs is that you should give it a join to correct this and go much faster.
session.query(User, Images).join(Images).where(User.id == 3).all()
-
@waylonwalker
2023
Template Designer Documentation — Jinja Docum ...
https://jinja.palletsprojects.com/en/3.0.x/templates/#whitespace-contr ...html code generated by my jinja templates generally look half garbage because of indents and whitespace all over the place. I just learned about these pesky Whitespace Control characters that can get rid of the whitespace added from templating.
You can also strip whitespace in templates by hand. If you add a minus sign (-) to the start or end of a block (e.g. a For tag), a comment, or a variable expression, the whitespaces before or after that block will be removed:
{% for item in seq -%} {{ item }} {%- endfor %}
-
@waylonwalker
2023
Minecraft Server on Docker (Java Edition)
https://docker-minecraft-server.readthedocs.io/en/latest/I just learned that if you can exec into the container running minecraft with the itzg/minecraft container you can run
rcon-cli
to get command access to the server. You need to set theRCON_PASSWORD
if you want to access rcon remotely, but if you have not already done this and have access to the server you can just runrcon-cli
when you are in. -
@waylonwalker
2023
We Finally Agree On Unit Tests - YouTube
https://www.youtube.com/watch?v=MbU-PKukdMwTheo's response puts a lot of my feelings about unit testing into words. It's crazy how cargo culty it becomes that the echo chamber of twitter can bring in beliefs that we think we believe, but have not experienced enough or put enough thought in to form our own opinion.
This video made me think so much that it turned into it's own blog post
-
@waylonwalker
2023
Mastodon.py — Mastodon.py 1.8.1 documentation
https://mastodonpy.readthedocs.io/en/stable/Mastadon.py is a python api client for mastadon that makes it easy to cross post to mastadon.
from mastodon import Mastodon Mastodon.create_app( 'pytooterapp', api_base_url = 'https://mastodon.social', to_file = 'pytooter_clientcred.secret' ) from mastodon import Mastodon mastodon = Mastodon(client_id = 'pytooter_clientcred.secret',) mastodon.log_in( 'my_login_email@example.com', 'incrediblygoodpassword', to_file = 'pytooter_usercred.secret' ) mastodon.toot('Tooting from Python using #mastodonpy !')
-
@waylonwalker
2023
bunny.net - The Content Delivery platform tha ...
https://bunny.net/bunny.net looks like an interesting cloudflare alternative.
-
@waylonwalker
2023
IndieWebify.Me - a guide to getting you on th ...
https://indiewebify.me/This is a sick guided site to validate indieweb tags on your site. It makes it much easier than trying to do it yourself.
-
@waylonwalker
2023
FastAPI - dependency inside Middleware? - Sta ...
https://stackoverflow.com/questions/72243379/fastapi-dependency-inside ...After struggling to get dependencies inside of middleware I learned that you can make global dependencies at the app level. I used this to set the user on every single route of the application without needing Depend on getting the user on each route.
from fastapi import Depends, FastAPI, Request def get_db_session(): print("Calling 'get_db_session(...)'") return "Some Value" def get_current_user(session=Depends(get_db_session)): print("Calling 'get_current_user(...)'") return session def recalculate_resources(request: Request, current_user=Depends(get_current_user)): print("calling 'recalculate_resources(...)'") request.state.foo = current_user app = FastAPI(dependencies=[Depends(recalculate_resources)]) @app.get("/") async def root(request: Request): return {"foo_from_dependency": request.state.foo}
-
@waylonwalker
2023
Handling Errors - FastAPI
https://fastapi.tiangolo.com/tutorial/handling-errors/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}
-
@waylonwalker
2023
logs with FastAPI and Uvicorn · Issue #1508 · ...
https://github.com/tiangolo/fastapi/issues/1508Setting an additional log handler to the uvicorn logger for access logs in fastapi was not straightforward, but This post was very helpful.
@app.on_event("startup") async def startup_event(): logger = logging.getLogger("uvicorn.access") handler = logging.StreamHandler() handler.setFormatter(logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")) logger.addHandler(handler)
-
@waylonwalker
2023
How to group FastAPI endpoints in Swagger UI? ...
https://stackoverflow.com/questions/63762387/how-to-group-fastapi-endp ...Setting tags in your fastapi endpoints will group them in the docs. You can also set some metadata around the tags to get nice descriptions.
Here is a full example from the post.
from fastapi import FastAPI tags_metadata = [ {"name": "Get Methods", "description": "One other way around"}, {"name": "Post Methods", "description": "Keep doing this"}, {"name": "Delete Methods", "description": "KILL 'EM ALL"}, {"name": "Put Methods", "description": "Boring"}, ] app = FastAPI(openapi_tags=tags_metadata) @app.delete("/items", tags=["Delete Methods"]) @app.put("/items", tags=["Put Methods"]) @app.post("/items", tags=["Post Methods"]) @app.get("/items", tags=["Get Methods"]) async def handle_items(): return
-
@waylonwalker
2023
Waylon Walker (getting focus'd fokais.com) on ...
https://twitter.com/_WaylonWalker/status/1734387536716308693Most bloggers on my twitter blog right into a file that goes on git. I kinda expected to have more database folk. I have my blog in markdown on git and the editing experience is top notch. I can just find files edit them in MY EDITOR, push them and I got a post. I am running thoughts in a sqlite database with a fastapi backend, and holy crap the instant nature of posting feels so much better. Both sides have good points.
-
@waylonwalker
2023
Show some equivalent list comprehensions in f ...
https://github.com/pallets/jinja/issues/1068I often want to reach for non existing list comprehensions in jinja 2, Here are a few nice equivalents.
a: {{ data | selectattr('x', 'gt', 5) | list }} b: {{ data | map(attribute='c') | list }} c: {{ data | selectattr('x', 'gt', 5) | map(attribute='c') | list }}
-
@waylonwalker
2023
nvim: `vim.o.cmdheight=0`
https://vi.stackexchange.com/questions/39947/nvim-vim-o-cmdheight-0-lo ...I fixed my missing macro recording indicator that I lost and was never quite sure why. (because I forgot that I set cmdheight=0).
vim.cmd [[ autocmd RecordingEnter * set cmdheight=1 ]] vim.cmd [[ autocmd RecordingLeave * set cmdheight=0 ]]
-
@waylonwalker
2023
DataDog/ddqa: Datadog's QA manager for releas ...
https://github.com/DataDog/ddqaDataDog ddqa is building out a textual app and deploying it with pyapp. They have CI setup to fully build and cross compile their textual tui into github releases that you can just download from their releases page. This is something I am looking at for markata. This would be pretty sweet to be able to make it just work on places like windows. It would also be interesting to try to build a full desktop app with pyapp.
-
@waylonwalker
2023
ImageMagick – Color Names
https://imagemagick.org/script/color.phpFull list of imagemagick color names.
-
@waylonwalker
2023
Adam Wathan on X: "Hear me out. https://t.co/ ...
https://twitter.com/adamwathan/status/1734696245015494711I'm going to give this trick a shot on my sites, and see how I like it.
* { min-width: 0 }
Down in the comments @adamwathan goes on to say.
Basically every layout overflow bug ever boils down to some flex or grid child needing min-width: 0 😄
Oh and @ryanflorence also says in the comments.
I ... do this.
-
@waylonwalker
2023
Why YOU should write a blog
https://tushar.lol/post/write-a-blog/Nice message by @tusharsadhwani.
Write it down.
You had to dig deeper than face value at something.
Write it down.
You had to combine multiple pages of docs.
Write it down.
Someting was simply not obvious to you at first and it took someone else to give you that ah ha moment.
Write it down.
You had a small discovery that had a marginal impact on your day.
Write it down.
A blog does not have to be a Blog, it can be small meaningful posts. There are absolutely no rules. If you think you are going to end up with too many posts, that is a solvable problem, make a search, curate your favorite posts, make multiple feeds.
At the end of the day.
Write it down.
This post itself is a thought, the smallest component to my blogging strategy.
Write it down.
-
@waylonwalker
2023
Path Operation Advanced Configuration - FastA ...
https://fastapi.tiangolo.com/advanced/path-operation-advanced-configur ...Excluding routes from fastapi docs, can be done from the route configuration using `include_in_schema`. This is handy for routes that are not really api based or duplicates.
From the Docs
from fastapi import FastAPI app = FastAPI() @app.get("/items/", include_in_schema=False) async def read_items(): return [{"item_id": "Foo"}]
trailing slash
I've had better luck just routing both naked and trailing slash routes in fastapi. I've had api's deployed as a subroute to a site rather than a subdomain, and the automatic redirect betweens them tended to always get messed up. This is pretty easy fix for the pain is causes just give vim a yyp, and if you don't want deuplicates in your docs, ignore one.
from fastapi import FastAPI app = FastAPI() @app.get("/items") @app.get("/items/", include_in_schema=False) async def read_items(): return [{"item_id": "Foo"}]
favicon.ico
Now you do not need to deploy favicons to your api in any way, it is nice to have it in your browser tab, but more importantly to me I hate having console errors that are meaningless, this gives the browser something to automatically grab and not log errors.
@app.get("/favicon.ico", include_in_schema=False) def get_favicon(): return RedirectResponse(url="https://fokais.com/favicon.ico", status_code=status.HTTP_302_FOUND)
-
@waylonwalker
2023
Protect API docs behind authentication? · Iss ...
https://github.com/tiangolo/fastapi/issues/364You can protect your fastapi docs behind auth so that not only can certain roles not run certain routes, but they cannot even see the docs at all. This way no one that shouldn't be poking around can even discover routes they shouldn't be using.
Here is the soluteion provided by @kennylajara
from fastapi import FastAPI from fastapi.openapi.docs import get_redoc_html, get_swagger_ui_html from fastapi.openapi.utils import get_openapi import secrets from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI( title="FastAPI", version="0.1.0", docs_url=None, redoc_url=None, openapi_url = None, ) security = HTTPBasic() def get_current_username(credentials: HTTPBasicCredentials = Depends(security)): correct_username = secrets.compare_digest(credentials.username, "user") correct_password = secrets.compare_digest(credentials.password, "password") if not (correct_username and correct_password): raise HTTPException( status_code=status.HTTP_401_UNAUTHORIZED, detail="Incorrect email or password", headers={"WWW-Authenticate": "Basic"}, ) return credentials.username @app.get("/docs", include_in_schema=False) async def get_swagger_documentation(username: str = Depends(get_current_username)): return get_swagger_ui_html(openapi_url="/openapi.json", title="docs") @app.get("/redoc", include_in_schema=False) async def get_redoc_documentation(username: str = Depends(get_current_username)): return get_redoc_html(openapi_url="/openapi.json", title="docs") @app.get("/openapi.json", include_in_schema=False) async def openapi(username: str = Depends(get_current_username)): return get_openapi(title=app.title, version=app.version, routes=app.routes
-
@waylonwalker
2023
Cancel subscriptions | Stripe Documentation
https://stripe.com/docs/billing/subscriptions/cancel#cancelingThis is a handy guide to cancelling stripe subscriptions.
# Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys import stripe stripe.api_key = "sk_test_51ODvHtB26msLKqCAPBAo1qkBBuIfT5tQBX6YFWCLMsPixIExxITCRVa9tNCIqkdQS8olhR79NYXsFWBPKsM3LbGO00zEcNQfNI" stripe.Subscription.modify( "sub_49ty4767H20z6a", cancel_at_period_end=True, )
You can even inverse it by flipping
True
toFalse
and re activate the subscription. -
@waylonwalker
2023
Retrieve an upcoming invoice | Stripe API Ref ...
https://stripe.com/docs/api/invoices/upcomingYou can find your customers next billing date through the stripe api by using
Invoice
. and passing in customer, customer_details, subscription, or schedule.import stripe stripe.api_key = "sk_test_51ODvHtB26msLKqCAPBAo1qkBBuIfT5tQBX6YFWCLMsPixIExxITCRVa9tNCIqkdQS8olhR79NYXsFWBPKsM3LbGO00zEcNQfNI" invoice = stripe.Invoice.upcoming(customer="cus_NeZwdNtLEOXuvB")
Within the invoice, you can find the next_payment_attempt as a epoch.
date = datetime.fromtimestamp(invoice.next_payment_attempt) amount = invoice.amount_due currency = invoice.currency
-
@waylonwalker
2023
Search | Stripe Documentation
https://stripe.com/docs/search#search-query-languageStripe has it's own query language for querying data. I'm just getting into using it and it seems pretty good so far. I needed to lookup the price for products. I was able to find prices for my product using the python api as shown below.
stripe.Price.search(query="active: 'true' and product: 'prod_P8SfwtxJ45cWE2'")
-
@waylonwalker
2023
Stripe keys and IDs
https://gist.github.com/fnky/76f533366f75cf75802c8052b577e2a5Stripe has so many keys and ids this is a very helpful list to decode what exactly an id is for.
-
@waylonwalker
2023
Overworked - YouTube
https://www.youtube.com/shorts/IVdaysrIS74Dang this is such a good message. I can't exactly relate to being forced into the overworking situation that PirateSofware is talking about. I can relate to being conditioned to feeling a certain way and changing that is very difficult. I can also relate to not feeling like I am getting enough done in the day. Sometimes a bit of separation is good.
-
@waylonwalker
2023
CSS @media print issues with background-color ...
https://stackoverflow.com/questions/3893986/css-media-print-issues-wit ...Get those print colors exact
body{ -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
-
@waylonwalker
2023
page-break-after - CSS: Cascading Style Sheet ...
https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-afterI'm working on something that might go to print, so I want the page breaks to happen somewhat in my control as the content author. As I do my writing I break my content up in to many short sections using h2, sometimes an h3. These are generally short sections that go together, should stay together, and typically are not too lengthy to cause a large white space in print.
I found a way in css to only allow page breaks to happen on h2 and h3, and it turned out perfect, suck it WSIWIG editors
* { page-break-before: avoid; } h2, h3 { page-break-before: auto; }
-
@waylonwalker
2023
Go by Example
https://gobyexample.com/Fantastic resource for learning go. You work through small examples quickly, learning single concepts along the way.
-
@waylonwalker
2023
How to Build a Website or App
https://syntax.fm/show/696/how-to-build-a-website-or-appGreat tips in this one. They discuss everything from front end to backend, databases and ORMS, here are a few of my favorite points.
- Use good data or good fake data
- make it have some variation like long and short text
- Don't use a database if you need one, static content is eaiser to manage
- end to end test, (does the site load page x)
- You DONT NEED all this complexity, you can deploy a site with HTML and CSS.
- Use good data or good fake data
-
@waylonwalker
2023
Will McGugan on X: "Just a wee thing that cam ...
https://twitter.com/willmcgugan/status/1729158038551220477Textual is so sick, Will just made a live markdown editor in the terminal!
-
@waylonwalker
2023
Sebastián Ramírez on X: "Now @FastAPI has 65k ...
https://twitter.com/tiangolo/status/1729153717956715007 -
@waylonwalker
2023
Separations of Concerns is a Lie - YouTube
https://www.youtube.com/watch?v=eMTFzpxR0QQ&t=326Nice take by @t3dotgg. Some of the old patterns that go deep into webdev, MVC, separation of concerns, REST, are things we are told to believe on day one, thrown so many things, no mental bandwidth, or experience to form our own opinions we must take them as fact. Rarely do we take these facts and revisit them with our new understandings years later.
-
@waylonwalker
2023
Pype|Dev🐍 (py-puh-day) on X: "@wtravishubbard ...
https://twitter.com/pypeaday/status/1727156823185113304Today I learned the meaning of abhorrent
abhorrent ăb-hôr′ənt, -hŏr′- adjective Disgusting, loathsome, or repellent. Feeling repugnance or loathing.
-
@waylonwalker
2023
Heroicons
https://heroicons.com/heroicons is a really nice set of many of the basic icons that you will need for building nice ui's. They have a really nice copy as svg or jsx button, so that you can just yank it and paste it on your page without any extra packages or installation.
-
@waylonwalker
2023
Uptime Kuma
https://uptime.kuma.pet/Uptime kuma is a fantastic self hosted monitoring tool. One docker run command and you are up and running. Once you are in you have full control over checking status of urls, frequency, allowed timeouts, and a HUGE list of notification providers
docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
I deployed it in my homelab today.
-
@waylonwalker
2023
kv - Command | Vault | HashiCorp Developer
https://developer.hashicorp.com/vault/docs/commands/kvhashi vault lets you manage secrets right from your cli.
# set your vault url export VAULT_ADDR=https://myvault.mydomain vault login # get a secret vault kv get secret/hvac # put a secret vault kv put -mount=secret creds passcode=my-long-passcode # get it vault kv get secret/creds # == Secret Path == # secret/data/creds # # ======= Metadata ======= # Key Value # --- ----- # created_time 2023-11-05T02:53:40.978120001Z # custom_metadata <nil> # deletion_time n/a # destroyed false # version 3 # # ====== Data ====== # Key Value # --- ----- # bar baz # passcode my-long-passcode # get one field vault kv get -field=passcode secret/creds # my-long-passcode vault kv put -mount=secret creds bar=baz # set more keys vault kv put -mount=secret creds passcode=my-long-passcode bar=baz # # == Secret Path == # secret/data/creds # # ======= Metadata ======= # Key Value # --- ----- # created_time 2023-11-05T03:24:14.65958906Z # custom_metadata <nil> # deletion_time n/a # destroyed false # version 4 vault kv get secret/creds # == Secret Path == # secret/data/creds # # ======= Metadata ======= # Key Value # --- ----- # created_time 2023-11-05T02:53:40.978120001Z # custom_metadata <nil> # deletion_time n/a # destroyed false # version 4 # # ====== Data ====== # Key Value # --- ----- # bar baz # passcode my-long-passcode
-
@waylonwalker
2023
johanhaleby/kubetail: Bash script to tail Kub ...
https://github.com/johanhaleby/kubetailKubetail is a pretty sick bash script that allows you to tail logs for multiple pods in one stream. Very handy when you have more than one replica running.
wget https://raw.githubusercontent.com/johanhaleby/kubetail/master/kubetail chmod u+x ./kubetail
Now with kubetail I can tail all the logs for every shot-wayl-one pod in the shot namespace.
./kubetail shot-wayl-one -n shot
-
@waylonwalker
2023
(90) Kubernetes Secrets in 5 Minutes! - YouTu ...
https://www.youtube.com/watch?v=cQAEK9PBY8U&t=186I am converting my docker compose env secrets over to k8s secrets. This guide was clear and to the point how I can replicate this exact workflow.
First set the secret, the easiest way is to use kubectl wtih --from-literal because it automatically base64 encodes for you.
kubectl create secret generic minio-access-key --from-literal=ACCESS_KEY=7FkTV**** -n shot
If you don't use the
--from-literal
you will have to base64 encode it.echo "7FkTV****" | openssl base64
Once you have your secret deployed, you have to update the container spec in your deployment manifest to get the valueFrom secretKeyRef.
spec: containers: - env: - name: ACCESS_KEY valueFrom: secretKeyRef: key: ACCESS_KEY name: minio-access-key - name: SECRET_KEY valueFrom: secretKeyRef: key: SECRET_KEY name: minio-secret-key image: registry.wayl.one/shot-scraper-api name: shot-wayl-one ports: - containerPort: 5000 protocol: TCP resources: {} restartPolicy: Always
-
@waylonwalker
2023
Waylon Walker 🐍 on X: "Which is more complica ...
https://twitter.com/_WaylonWalker/status/1718300097174270193 -
@waylonwalker
2023
Wes Bos on X: "🔥 The stale-while-revalidate h ...
https://twitter.com/wesbos/status/1717923624559005977Wes has some of the coolest OG images i've ever seen. Here he talks about how to enable cache configuration so that its constantly updating the cache without the user waiting for the image to be created.
-
@waylonwalker
2023
</> htmx ~ Locality of Behaviour (LoB)
https://htmx.org/essays/locality-of-behaviour/Interesting principle here. What a great example, If I'm looking at the second jQuery example, I have to dig into dev tools or make some assumtions that this team uses jQuery, and selects by id, therefore I can grep for
$("#d1")
.Consider two different implementations of an AJAX request in HTML, the first in htmx:
<button hx-get="/clicked">Click Me</button> > and the second in jQuery: ``` js $("#d1").on("click", function(){ $.ajax({ /* AJAX options... */ }); });
<button id="d1">Click Me</button>
-
@waylonwalker
2023
Creating k8s jobs with python
https://thoughts.waylonwalker.com/post-og/152I was looking to add running kubernetes jobs to a python cli I am creating, and I found this solution, mostly thanks to
ollama run mistral:7b-instruct-q4_K_M
and my loose understanding of what the yaml syntax is supposed to look like for a kubernetes job. This will let me create a job in the cluster, choose the image that runs, the command that is called, and how long until the job expires and is cleaned up. While the job still exists I can go in and look at the logs, but once its ttl has expired they are gone.from kubernetes import client, config # Load the default kubeconfig config.load_kube_config() # Define the API client for batch jobs api_instance = client.BatchV1Api() # Create a new job object job = client.V1Job( api_version="batch/v1", kind="Job", metadata=client.V1ObjectMeta(name="myjob"), spec=client.V1JobSpec( ttl_seconds_after_finished=100, template=client.V1PodTemplateSpec( metadata=client.V1ObjectMeta(labels={"app": "myjob"}), spec=client.V1PodSpec( containers=[ client.V1Container( name="myjobcontainer", image="busybox", command=["ls", "/"], ), ], restart_policy="Never", ), ), backoff_limit=1, ), ) # Call the Kubernetes API to create the job api_instance.create_namespaced_job(namespace="default", body=job)
-
@waylonwalker
2023
Diagnostic - Neovim docs
https://neovim.io/doc/user/diagnostic.html#vim.diagnostic.reset()Clear out lsp diagnostics in nvim.
lua vim.diagnostic.reset()
-
@waylonwalker
2023
How to kill process based on the port number ...
https://linuxconfig.org/how-to-kill-process-based-on-the-port-number-i ...I've often struggled to find and kill a process using a certain port on archlinux. Mainly becuase most guides use netstat rather than
ss
.Here is how I just killed the process using port 5000 using
fuser
.sudo fuser -k 5000/tcp
You can also get information about the process by running
lsof
❯ lsof -i :5000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME thoughts 1058292 waylon 11u IPv4 119622828 0t0 TCP *:commplex-main (LISTEN)
-
@waylonwalker
2023
mkimuram/k8sviz: Generate Kubernetes architec ...
https://github.com/mkimuram/k8svizThis is a sick kubernetes architecture diagran generation tool.
Here is an example
installation
$ curl -LO https://raw.githubusercontent.com/mkimuram/k8sviz/master/k8sviz.sh $ chmod u+x k8sviz.sh
Usage
./k8sviz.sh --kubeconfig ~/.config/kube/falcon-k3s.yaml -t png -o k8sviz.png
-
@waylonwalker
2023
casey/just: 🤖 Just a command runner
https://github.com/casey/justI think just, might just be the thing I have been looking for. I've been looking for some ci/cd that I can host myself, but everything looks pretty big, so for now I am going to use just as my task runner.
I installed with installer.
curl https://i.wayl.one/casey/just | bash
I set up my devtainer builds with just. Here is my
justfile
, yes you just need the cli and a file namedjustfile
.default: base alpine slim base: build deploy alpine: build-alpine deploy-alpine slim: build-slim deploy-slim build: podman build -t registry.wayl.one/devtainer:latest . deploy: podman push registry.wayl.one/devtainer build-alpine: podman build -f docker/Dockerfile.alpine -t registry.wayl.one/devtainer:alpine . deploy-alpine: podman push registry.wayl.one/devtainer:alpine build-slim: podman build -f docker/Dockerfile.slim -t registry.wayl.one/devtainer:slim . deploy-slim: podman push registry.wayl.one/devtainer:slim
-
@waylonwalker
2023
Translate a Docker Compose File to Kubernetes ...
https://kubernetes.io/docs/tasks/configure-pod-container/translate-com ...kompose
is a sick cli to convert docker-compose.yml to kubernetes manifest.# install curl -L https://github.com/kubernetes/kompose/releases/download/v1.26.0/kompose-linux-amd64 -o kompose kompose convert kompose convert -o deployment.yaml
-
@waylonwalker
2023
Daniel Nashed's Blog
https://blog.nashcom.de/nashcomblog.nsf/dx/k3s-podman-and-a-registry.h ...Running your own docker registry in one line
podman run -d -p 5000:5000 --restart=always --name registry registry:latest
-
@waylonwalker
2023
Kubernetes Persistent Volumes with Deployment ...
https://akomljen.com/kubernetes-persistent-volumes-with-deployment-and ...Example of how to add a pvc to a deployment.
-
@waylonwalker
2023
Inspect a Kubernetes PersistentVolumeClaim | ...
https://frank.sauerburger.io/2021/12/01/inspect-k8s-pvc.htmlI was curious to see what was going on inside of my minio object storage. Great technique here by Frank to create an inspector pod, then you can do as you wish with the data.
I created the manifest as
pvc-inspector.yml
apiVersion: v1 kind: Pod metadata: name: pvc-inspector spec: containers: - image: busybox name: pvc-inspector command: ["tail"] args: ["-f", "/dev/null"] volumeMounts: - mountPath: /pvc name: pvc-mount volumes: - name: pvc-mount persistentVolumeClaim: claimName: pvc-name
Then used it like this.
# create pvc-inspector pod kubectl apply -f pvc-inspector.yml # exec into inspector kubectl exec -it pvc-inspector -- sh # explore data ls /pvc # cleanup kubectl delete -f pvc-inspector.yml
-
@waylonwalker
2023
Can't create Secret in Kubernetes: illegal ba ...
https://stackoverflow.com/questions/53394973/cant-create-secret-in-kub ...In order to use k8s secrets manifest you first need to encode the data values.
echo -n 'mega_secret_key' | openssl base64
-
@waylonwalker
2023
Can I access k3s using just kubectl (no sudo ...
https://www.reddit.com/r/kubernetes/comments/cojjf5/can_i_access_k3s_u ...Right after installing k3s you are going to need to use
sudo
to use anykubectl
command. The reason for this is that the default config is owned by root. To get around this you will need to make your own config and set theKUBECONFIG
environment variableTo do this I used
sudo
one last time to copy thek3s.yaml
file into my own directory and take ownership of it.sudo cp /etc/rancher/k3s/k3s.yaml /home/waylon/.config/kube sudo chown -R waylon:waylon ~/.config/kube export KUBECONFIG=~/.config/kube/k3s.yaml
-
@waylonwalker
2023
Quick-Start Guide | K3s
https://docs.k3s.io/quick-startI recently spun up k3s in my homelab. I'm trying to offload some work off of my free tier fly.io app in order to keep it free tier without crashing.
# install and start k3s curl -sfL https://get.k3s.io | sh - # check to see if your nodes are started sudo kubectl get nodes
My main hiccup so far was the machine I am running on runs zfs on root, and it would not start the master node. Rather than figuring out how to make zfs play nice I just pointed k3s to a drive that is not zfs.
# manuallly sudo k3s server -d /mnt/vault/.rancher/k3s # without editing systemd service sudo ln -s /mnt/vault/.rancher/k3s /var/lib/rancher/k3s
-
@waylonwalker
2023
(70) Tailwind Connect 2023 — Keynote - YouTub ...
https://www.youtube.com/watch?v=CLkxRnRQtDETailwind comes with
space
that I have never heard of that is made to give margin and padding together in one class. Adam dropped it here in the Tailwind Connect conference. -
@waylonwalker
2023
Episode #433 Litestar: Effortlessly Build Per ...
https://talkpython.fm/episodes/show/433/litestar-effortlessly-build-pe ...Litestar is an interesting api framework similar to fastpi, that I am interested to check out to see if it fits into some project scope. It sounds like it comes with a lot more batteries included for things like auth, but does not have hard opinions like django. At this point I'm not jumping off of fastapi, but its something I want to try.
-
@waylonwalker
2023
Delete a Postgres Cluster · Fly Docs
https://fly.io/docs/postgres/managing/deleting/Deleting a fly postgres db cluster was not straightforward to me as the app name is not inferred from the toml like it is for the main app.
fly apps destroy <pg-app-name> fly pg db list -a <pg-app-name>
-
@waylonwalker
2023
Twitter Requires full image_urls
NoneYet again twitter cards were causing me pain. This time it was me not realizing that they require full urls, and not relative or abolute urls.
This was not working
<meta name="twitter:image" content="/shot/?path={{ request.url|quote_plus }}" content-type='image/png'/>
This does work with a full url
<meta name="twitter:image" content="https://thoughts.waylonwalker.com/shot/?path={{ request.url|quote_plus }}" content-type='image/png'/>
-
@waylonwalker
2023
(68) Has Web Development Regressed? A Convers ...
https://www.youtube.com/watch?v=EMg-AruNQQsBoot.dev is crushing it with these interviews. This one has Wes Bos, includes teaching, webdev, where is webdev headed.
-
@waylonwalker
2023
David-Kunz/gen.nvim: Neovim plugin to generat ...
https://github.com/David-Kunz/gen.nvimThis seems like a promising tool to use with ollama.
-
@waylonwalker
2023
Ollama
https://ollama.ai/ollama is the easiest to get going local llm tool that I have tried, and seems to be crazy fast. It feels faster than chat gpt, which has not been the experience I have had previously with running llm's on my hardware.
curl https://i.jpillora.com/jmorganca/ollama | bash ollama serve ollama run mistral ollama run codellama:7b-code ollama list
-
@waylonwalker
2023
sysid/sse-starlette
https://github.com/sysid/sse-starlettesse-starlette provides server sent events for startlette and FastApi. I'm evaluating for use with htmx.
Installation:
pip install sse-starlette
Usage:
import asyncio import uvicorn from starlette.applications import Starlette from starlette.routing import Route from sse_starlette.sse import EventSourceResponse async def numbers(minimum, maximum): for i in range(minimum, maximum + 1): await asyncio.sleep(0.9) yield dict(data=i) async def sse(request): generator = numbers(1, 5) return EventSourceResponse(generator) routes = [ Route("/", endpoint=sse) ] app = Starlette(debug=True, routes=routes) if __name__ == "__main__": uvicorn.run(app, host="0.0.0.0", port=8000, log_level='info')
-
@waylonwalker
2023
Overflow - Tailwind CSS
https://tailwindcss.com/docs/overflowControlling overflow with tailwindcss
Examples
<div class="overflow-visible ..."></div> <div class="overflow-hidden ..."></div>
-
@waylonwalker
2023
How To Create a Custom Scrollbar
https://www.w3schools.com/howto/howto_css_custom_scrollbar.aspDefault scrollbars on a dark theme website are just the ugliest thing. This page covers all the pseudo selectors needed to style the scrollbar.
/* width */ ::-webkit-scrollbar { width: 10px; } /* Track */ ::-webkit-scrollbar-track { background: #f1f1f1; } /* Handle */ ::-webkit-scrollbar-thumb { background: #888; } /* Handle on hover */ ::-webkit-scrollbar-thumb:hover { background: #555; }
-
@waylonwalker
2023
wincent/aspects/dotfiles/files/.zshrc at 85fc ...
https://github.com/wincent/wincent/blob/85fc42d9e96d408a/aspects/dotfi ...Wincent (Greg Hurrel) has a pretty solid and fast zshrc. I recently grabbed his completion section and it seems to be working better than whatever I had.
zsh completion snippet
# # Completion # fpath=($HOME/.zsh/completions $fpath) autoload -U compinit compinit -u # Make completion: # - Try exact (case-sensitive) match first. # - Then fall back to case-insensitive. # - Accept abbreviations after . or _ or - (ie. f.b -> foo.bar). # - Substring complete (ie. bar -> foobar). zstyle ':completion:*' matcher-list '' '+m:{[:lower:]}={[:upper:]}' '+m:{[:upper:]}={[:lower:]}' '+m:{_-}={-_}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' # Colorize completions using default `ls` colors. zstyle ':completion:*' list-colors '' # Allow completion of ..<Tab> to ../ and beyond. zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(..) ]] && reply=(..)' # $CDPATH is overpowered (can allow us to jump to 100s of directories) so tends # to dominate completion; exclude path-directories from the tag-order so that # they will only be used as a fallback if no completions are found. zstyle ':completion:*:complete:(cd|pushd):*' tag-order 'local-directories named-directories' # Categorize completion suggestions with headings: zstyle ':completion:*' group-name '' zstyle ':completion:*:descriptions' format %F{default}%B%{$__WINCENT[ITALIC_ON]%}--- %d ---%{$__WINCENT[ITALIC_OFF]%}%b%f # Enable keyboard navigation of completions in menu # (not just tab/shift-tab but cursor keys as well): zstyle ':completion:*' menu select
-
@waylonwalker
2023
Change Autocomplete Styles in WebKit Browsers ...
https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit- ...All the hover, select, autofil, focus combinations have left me confused on how to consistently get my form elements styled in dark mode
This snippet from CSS tricks has fixed all the different states for me to give me full control.
/* Change Autocomplete styles in Chrome*/ input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, textarea:-webkit-autofill, textarea:-webkit-autofill:hover, textarea:-webkit-autofill:focus, select:-webkit-autofill, select:-webkit-autofill:hover, select:-webkit-autofill:focus { border: 1px solid green; -webkit-text-fill-color: green; -webkit-box-shadow: 0 0 0px 1000px #000 inset; transition: background-color 5000s ease-in-out 0s; }
-
@waylonwalker
2023
florimondmanca/arel: Lightweight browser hot ...
https://github.com/florimondmanca/arelarel is a "Lightweight browser hot reload for Python ASGI web apps"
I just implemented this on my thoughts website using fastapi, and it's incredibly fast and lightweight. There just two lines of js that make a web socket connection back to the backend that watches for changes.
When in development mode, this snippet gets injected directly on the page and does a refresh when arel detects a change.
const ws = new WebSocket("ws://localhost:5000/hot-reload"); ws.onmessage = () => window.location.reload();
-
@waylonwalker
2023
Automatic browser reloading in FastAPI
https://gist.github.com/vrslev/6d0602bfa939a01844f645c608afb85aI just discovered arel for hot reloading python applications when content changes from this snippet that implements it for fatapi.
On app startup add the
/hot-reload
routes if in DEBUG mode.import os import arel from fastapi import FastAPI, Request from fastapi.templating import Jinja2Templates app = FastAPI() templates = Jinja2Templates("templates") if _debug := os.getenv("DEBUG"): hot_reload = arel.HotReload(paths=[arel.Path(".")]) app.add_websocket_route("/hot-reload", route=hot_reload, name="hot-reload") app.add_event_handler("startup", hot_reload.startup) app.add_event_handler("shutdown", hot_reload.shutdown) templates.env.globals["DEBUG"] = _debug templates.env.globals["hot_reload"] = hot_reload @app.get("/") def index(request: Request): return templates.TemplateResponse("index.html", context={"request": request}) # run: # DEBUG=true uvicorn main:app --reload
install
arel
and make sure you haveuvicorn[standard]
for websocket support.fastapi uvicorn[standard] arel jinja2
In the template, load the script when in debug mode.
<body> {% block content %}{% endblock %} <!-- Hot reload script --> {% if DEBUG %} {{ hot_reload.script(url_for('hot-reload')) | safe }} {% endif %} </body>
-
@waylonwalker
2023
Bob Belderbos on X: "Forget Python for a sec, ...
https://twitter.com/bbelderbos/status/1709525676154368055I need to learn regex capture groups better. This is so dang powerful. I really like the \v that bob uses here, it really does cut down on the terseness of all the special characters.
I wanted to replace all occurrences of:
name,name@example.com,0,171,,2023-09-21
With:
Easy to do with Python, but what about a bit of > regex in Vim?
:%s/\v([^,]+,[^,]+),.*/\1/
-
@waylonwalker
2023
teej dv 🔭 on X: "Hypermedia fixes this HATEOA ...
https://twitter.com/teej_dv/status/1708258701008593173HATEOAS gonna hate. More and more htmx seems like the js library for backend devs. So rather than making 55 rest calls here, just make an endpoint that does what you want it to do with one, or a few requests.
-
@waylonwalker
2023
Open source, not open contribution with Ben J ...
https://changelog.com/podcast/433Ben Johnson was on the Changelog a few years back covering his work on litestream, and talks about why he chose to go open source, but not open contribution.
You should have a good reason to move off of sqlite.
-
@waylonwalker
2023
Point-in-time recovery - Wikipedia
https://en.wikipedia.org/wiki/Point-in-time_recoveryI just learned that the term PITR means Point In Time Recovery. I have never seen this term, but it is most often referred to in relation to database recoveries.
-
@waylonwalker
2023
DjangoCon Europe 2023 | Use SQLite in product ...
https://www.youtube.com/watch?v=yTicYJDT1zE&t=2sVery inspiring talk, TLDR, you probably don't need a database server. sqlite will probably be faster, simpler to maintain, and simpler to test your application.
-
@waylonwalker
2023
benbjohnson/litestream: Streaming replication ...
https://github.com/benbjohnson/litestream`litestream` is a sick cli tool for steaming replicas of sqlite. It automatically does daily snapshots, and streams all of the writes to the replica live.
install
Install is fast using installer, no compilation, just copy the binary and run.
curl https://i.wayl.one/benbjohnson/litestream
-
@waylonwalker
2023
Why I Built Litestream - Litestream
https://litestream.io/blog/why-i-built-litestream/As applications scale to the edge, to put compute as close to the user as possible, database queries back to the master node get slower and slower. Enter sqlite replication, put the database wtih the application code and replicate from master.
-
@waylonwalker
2023
I'm All-In on Server-Side SQLite · The Fly Bl ...
https://fly.io/blog/all-in-on-sqlite-litestream/SQLite is the next big database trend. with more horizontal scaling, close to user read heavy applications, having your database in the same application stack makes a lot of sense. Tools like litestream are going to enable global distribution in an impressive way.
-
@waylonwalker
2023
LiteFS Cloud: Distributed SQLite with Managed ...
https://fly.io/blog/litefs-cloud/Fly.io's solution to sqlite managed backups.I definitely want to look into this a bit, but moreso the tech under the hook litestream.
-
@waylonwalker
2023
jpillora/installer: One-liner for installing ...
https://github.com/jpillora/installerThis is a sick looking bash script generator for installing binaries off of github releases. it reccomends curl into bash, but you could curl into install.sh and toss that in your dotfiles repo or wherever.
Install installer with installer
curl -s https://i.jpillora.com/installer | bash
-
@waylonwalker
2023
How to run pods as systemd services with Podm ...
https://www.redhat.com/en/blog/podman-run-pods-systemd-servicespodman comes with a nice command for generating systemd service files (units).
$ podman pod create --name=my-pod 635bcc5bb5aa0a45af4c2f5a508ebd6a02b93e69324197a06d02a12873b6d1f7 $ podman create --pod=my-pod --name=container-a -t centos top c04be9c4ac1c93473499571f3c2ad74deb3e0c14f4f00e89c7be3643368daf0e $ podman create --pod=my-pod --name=container-b -t centos top b42314b2deff99f5877e76058ac315b97cfb8dc40ed02f9b1b87f21a0cf2fbff $ cd $HOME/.config/systemd/user $ podman generate systemd --new --files --name my-pod /home/vrothberg/.config/systemd/user/pod-my-pod.service /home/vrothberg/.config/systemd/user/container-container-b.service /home/vrothberg/.config/systemd/user/container-container-a.service
-
@waylonwalker
2023
Pagefind | Pagefind — Static low-bandwidth se ...
https://pagefind.app/Pagefind is absolutely insane. I've tried a number of static site searches, and found them all hard to get get going, clunky and not the best experience as a user or developer.
I setup pagefind in about 2 minutes on my site where it found and indexed 833 pages in 2 minutes.
The only downside I see so far is that it is a lot of bandwidth to the user. On simulated slow 3G you can definitly feel it, but not terrible. Anything slower and its going to start feeling frustrating.
edit: I have actually fully deployed it on waylonwalker.com, and its fast!
create the index
npx -y pagefind --site public --serve
Then I put this on a page, it looks really nice on a white background, but would need some work to drop into a dark theme.
<link href="/pagefind/pagefind-ui.css" rel="stylesheet"> <script src="/pagefind/pagefind-ui.js"></script> <div id="search"></div> <script> window.addEventListener('DOMContentLoaded', (event) => { new PagefindUI({ element: "#search", showSubResults: true }); }); </script>
-
@waylonwalker
2023
(27) Bo Burnham, I mean Miriah, says lower yo ...
https://www.youtube.com/shorts/J8rbUHDlZ7kDang Mariah, killing it with continuous learning perspective.
-
@waylonwalker
2023
Simon Willison on X: "Anyone got a lead on a ...
https://twitter.com/simonw/status/1700528222382027039Kinda mindblown that this is even possible. This is so far outside of my current thinking that i didn't even think of an elegant way to implement semantic search accross images and text at the same time. I know it happens at Google, but I envision that as still text search accross tags and meta data about the image.
Based on the number of responses CLIP is the thing that does this.
-
@waylonwalker
2023
aca/emmet-ls: Emmet support based on LSP.
https://github.com/aca/emmet-lsThis is the greatest nvim emmet plugin I have tried. In the past I had tried the vim plugin a few times and just could not get a good flow with the keybindings and found it confusing for my occasional use.
emmet-ls
just uses lsp-completion, so its the same flow as other completions.You can try it out by installing with
:Mason
config
local lspconfig = require('lspconfig') local configs = require('lspconfig/configs') local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true lspconfig.emmet_ls.setup({ -- on_attach = on_attach, capabilities = capabilities, filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue" }, init_options = { html = { options = { -- For possible options, see: https://github.com/emmetio/emmet/blob/master/src/config.ts#L79-L267 ["bem.enabled"] = true, }, }, } })
-
@waylonwalker
2023
LLM now provides tools for working with embed ...
https://simonwillison.net/2023/Sep/4/llm-embeddings/Simon's llm cli is getting quite interesting. I really want to run some clustering on my website content.
-
@waylonwalker
2023
Formatter
https://biomejs.dev/formatter/Tried out biome today and it worked better than prettier on jinja templates, I might adopt this over prettier.
-
@waylonwalker
2023
</> htmx ~ The disable-element Extension
https://v1.htmx.org/extensions/disable-element/An extension to disable elements during flight of an htmx request, Looks super useful for things like a create or delete button where the server would end up with an error if you double delete or double create. This eliminates an error path that the user might see under normal use of the ui.
-
@waylonwalker
2023
</> htmx ~ hx-indicator Attribute
https://htmx.org/attributes/hx-indicator/The
htmx-request
class is added tohtmx-target
elements. You can target this css selector to create loading state throbbers.By default the target element will the
self
, but you can use the typical htmx css selector to select which element will recieve thehtmx-request
class while the request is running.The only way to override the name of the class is through config.
-
@waylonwalker
2023
(19) The Truth About HTMX | Prime Reacts - Yo ...
https://www.youtube.com/watch?v=2hMrk7A8Wf0&t=2081sPrime concisely made sense of why htmx is so awesome compared to what has become modern reactive web dev in 2 minutes. I had never thought of it this way and it's incredible.
One thing I have comepletely missed out on with my use of htmx is setting the disabled state while the server is working, what a genius move!
-
@waylonwalker
2023
</> htmx ~ Examples ~ Updating Other Content
https://htmx.org/examples/update-other-content/Three ways to support updating other content. Fantastic article walking through the different ways to update other parts of the screen using htmx.
In htmx there is no 2 way data binding, the dom is your state, and if you have elements derived from the same data on the screen in different places you need to think about how to keep them in sync.
-
@waylonwalker
2023
Bigger Applications - Multiple Files - FastAP ...
https://fastapi.tiangolo.com/tutorial/bigger-applications/#another-mod ...Fastapi lets you tag your
APIRouter
's so that the swagger docs are grouped according to the router.router = APIRouter(tags=['router'])
Now all routes in
router
will appear in the router group in the swagger docs. -
@waylonwalker
2023
Custom pages and templates - Datasette docume ...
https://docs.datasette.io/en/stable/custom_templates.html#serving-stat ...Datasette has its own static server that can host assets such as style sheets.
datasette -m metadata.json --static assets:static-files/
-
@waylonwalker
2023
Preline UI - Tailwind CSS component library | ...
https://preline.co/docs/index.htmlTailwind css component library. There are many examples with copy and pastabily with the tailwind classes already setup.
-
@waylonwalker
2023
Tailwind CSS Cheat Sheet
https://nerdcave.com/tailwind-cheat-sheetA nice searchable cheatsheet for tailwindcss classes.
-
@waylonwalker
2023
cURL Command Without Using Cache | Baeldung o ...
https://www.baeldung.com/linux/curl-without-cache#adding-the-pragma-ht ...Busting cache with curl. I'm not sure how much gets cached by curl, but I have ran into several cases where I am looking for new content and I want to ensure the content is new and no chance of being cached.
This article suggests 3 different techniques.
curl -H 'Cache-Control: no-cache, no-store' http://www.example.com curl -H 'Pragma: no-cache' http://www.example.com curl http://www.example.com/?xyzzyspoon
-
@waylonwalker
2023
SQLite FTS5 Extension
https://www.sqlite.org/fts5.htmlsqlite has 3 different tokenizers,
porter, ascii, trigram
.These can be used with sqlite-utils.
sqlite-utils enable-fts --tokenize porter database.db post title message tags
And with the python api.
db = Database('database.db') db["post"].enable_fts( ["title", "message", "tags"], create_triggers=True, tokenize="trigram" ) posts = list(db["post"].search(search))
-
@waylonwalker
2023
sharkdp/bat: A cat(1) clone with wings.
https://github.com/sharkdp/batBat is my favorite pager, its the one for me that seems to just work more than the rest. colors, syntax highlighting, line numbers search, it just feels the most natural.
-
@waylonwalker
2023
sqlite_utils Python library - sqlite-utils
https://sqlite-utils.datasette.io/en/stable/python-api.html#full-text- ...sqlite-utils is primarily a cli tool for sqlite operations such as enabling full text search, and executing searches, but it also has a nice python api that is exposed and pretty straightforward to use.
from sqlite_utils import Database db = Database("database.db") db["post"].enable_fts(["title", "message", "tags]) db["post"].search("water")
This returns a generator object that you can iterate over the row objects with.
-
@waylonwalker
2023
How to Format All Files in a Directory with P ...
https://levelup.gitconnected.com/how-to-format-all-files-in-a-director ...Use prettier to format all files in a directory. By default prettier does not write, it just echos out the format that it would do. Give it the
--write
and it will write the changes to the files.prettier --write .
I just used this on my thoughts repo.
prettier --write templates
-
@waylonwalker
2023
simonw/datasette-render-markdown: Datasette p ...
https://github.com/simonw/datasette-render-markdowndatasette really does everything doesn't it!
-
@waylonwalker
2023
simonw/shot-scraper: A command-line utility f ...
https://github.com/simonw/shot-scraper> A command-line utility for taking automated screenshots of websites
Daaaang, this is such an elegantly simple way to get web screenshots with a cli. I was literally up and running with two commands on my arch linux machine (which it warned was unsupported by playwright).
pip install shot-scraper # Now install the browser it needs: shot-scraper install shot-scraper waylonwalker.com shot-scraper https://datasette.io/ shot-scraper https://datasette.io/ -h 1280 -w 1920 shot-scraper https://datasette.io/ -h 480 -w 720 shot-scraper shot --selector '#posts' https://thoughts.waylonwalker.com/post/89
Note
shot-scraper https://datasette.io/
is a full length screenshot of the entire page.Oh and its pretty dang fast, let alone the setup time, this crushes on startup time in my attempts to use a headless browser in the past.
-
@waylonwalker
2023
shot-scraper: automated screenshots for docum ...
https://simonwillison.net/2022/Mar/10/shot-scraper/#a-complex-exampleAn interesting way to build automatically annotaatd docs with arrows pointing to elements on a webpage.
-
@waylonwalker
2023
(128) #learning #webdevelopment - YouTube
https://www.youtube.com/shorts/wsEuPYFpDgkI'd never given this much thought, but there are so many guides that are complete guides for beginner workflows, but once you get beyond beginner there is likely no manual for what you are trying to do in programming. There is no guide that will tell you the best way to get your companies salesforce data, alongside of the ERP data and present it to the users who need to know in a way that compels them to make the right decisions. You are going to have to build this out for yourself by piecing together knowledge about each subject.
-
@waylonwalker
2023
HTML Over The Wire | Hotwire
https://hotwired.dev/An alternative approach to building modern web withhout heavy js and json, but instead html over the wire, keeping the logic in the backend of rails.
-
@waylonwalker
2023
How do I post form data using Curl?
https://reqbin.com/req/c-sma2qrvp/curl-post-form-exampleHow to pass form data with curl, give it the d.
curl -X POST https://reqbin.com/echo/post/form -H "Content-Type: application/x-www-form-urlencoded" -d "param1=value1¶m2=value2"
-
@waylonwalker
2023
Lifecycle Hooks | Vue.js
https://vuejs.org/guide/essentials/lifecycle.html#lifecycle-diagramA super handy reference to the vuejs lifecycle.
-
@waylonwalker
2023
How to Use HTML to Open a Link in a New Tab
https://www.freecodecamp.org/news/how-to-use-html-to-open-link-in-new- ...Most of the time when creating links in html you want to maintain the default behavior, as this is what users are going to expect, but sometimes your site behaves such that it does not fit, and it does something unexpected anyways. in this case you might want to make the default behavior to open the link in a new tab rather than relying on users to control click.
Use this with restraint as this can make your site feel janky and do things that do not feel natural to the web.
<p>Check out <a href="https://www.freecodecamp.org/" target="_blank" rel="noopener noreferrer">freeCodeCamp</a>.</p>
-
@waylonwalker
2023
Create Models with a Many-to-Many Link - SQLM ...
https://sqlmodel.tiangolo.com/tutorial/many-to-many/create-models-with ...Creating many to many relationships with sqlmodel requires a LinkTable Model. The link model will keep track of the linked id's between each of the models.
from typing import List, Optional from sqlmodel import Field, Relationship, Session, SQLModel, create_engine class HeroTeamLink(SQLModel, table=True): team_id: Optional[int] = Field( default=None, foreign_key="team.id", primary_key=True ) hero_id: Optional[int] = Field( default=None, foreign_key="hero.id", primary_key=True ) class Team(SQLModel, table=True): id: Optional[int] = Field(default=None, primary_key=True) name: str = Field(index=True) headquarters: str heroes: List["Hero"] = Relationship(back_populates="teams", link_model=HeroTeamLink) class Hero(SQLModel, table=True): id: Optional[int] = Field(default=None, primary_key=True) name: str = Field(index=True) secret_name: str age: Optional[int] = Field(default=None, index=True) teams: List[Team] = Relationship(back_populates="heroes", link_model=HeroTeamLink)
-
@waylonwalker
2023
python - How to use a Pydantic model with For ...
https://stackoverflow.com/questions/60127234/how-to-use-a-pydantic-mod ...I went down the route of leveraging the
json-enc
extention in htmx, but later realized that this completely breaks browsers/users who do not wish to use javascript. While most of the web would feel quite broken with javascript disabled, I don't want to contribute to that without good reason.Taking a second look into this issue, rather than using
json-enc
, and using as_form to get form data into a model keeps the nice DX fo everything being a pydantic model, but the site still works without js. with js htmx kicks in, you get a spa like experience by loading partials onto the page, and without, you just get a full page reload.the implementation
copied from https://stackoverflow.com/questions/60127234/how-to-use-a-pydantic-model-with-form-data-in-fastapi
import inspect from typing import Type from fastapi import Form from pydantic import BaseModel from pydantic.fields import ModelField def as_form(cls: Type[BaseModel]): new_parameters = [] for field_name, model_field in cls.__fields__.items(): model_field: ModelField # type: ignore new_parameters.append( inspect.Parameter( model_field.alias, inspect.Parameter.POSITIONAL_ONLY, default=Form(...) if model_field.required else Form(model_field.default), annotation=model_field.outer_type_, ) ) async def as_form_func(**data): return cls(**data) sig = inspect.signature(as_form_func) sig = sig.replace(parameters=new_parameters) as_form_func.__signature__ = sig # type: ignore setattr(cls, 'as_form', as_form_func) return cls
And the usage looks like
@as_form class Test(BaseModel): param: str a: int = 1 b: str = '2342' c: bool = False d: Optional[float] = None @router.post('/me', response_model=Test) async def me(request: Request, form: Test = Depends(Test.as_form)): return form
-
@waylonwalker
2023
chebykinn/sedmario: NES Super Mario Bros leve ...
https://github.com/chebykinn/sedmario🤯 NES Super Mario Bros level 1 written in pure sed, this is madmess.
-
@waylonwalker
2023
Formatting on save · jose-elias-alvarez/null- ...
https://github.com/jose-elias-alvarez/null-ls.nvim/wiki/Formatting-on- ...neovim stopped formatting on save for me awhile ago and I have just been dealing with it. looks like there may have been an api change, idk.
I had to make this update.4
- vim.lsp.buf.format() + vim.lsp.buf.format({async=false})
-
@waylonwalker
2023
Debugging | pywebview
https://pywebview.flowrl.com/guide/debugging.htmlHow to enable debug mode in pywebview.
import webview webview.create_window('Woah dude!', 'https://pywebview.flowrl.com/hello') webview.start(debug=True)
-
@waylonwalker
2023
`ValueError: Constraint must have a name` in ...
https://github.com/sqlalchemy/alembic/issues/1195After a nasty time with alembic upgrades, thoughts is about to get a new users table. This may have came from incorrectly setting up alembic for sqlite from the start, but I was able to fix the issue with this GitHub issue.
alembic sqlite ValueError: Constraint must have a name
The change I needed to make to get my migration to run.
+ batch_op.create_foreign_key('fk_post_author_id_user', 'user', ['author_id'], ['id'])
-
@waylonwalker
2023
Use Alembic Check to check for possible upgra ...
NoneSince using alembic I have been just running out a new revision checking its content and deleting it if its empty, today I learned there is an
alembic check
command to check for operations that need to be created.❯ alembic check INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. No new upgrade operations detected.
-
@waylonwalker
2023
API — Jinja Documentation (3.0.x)
https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.Environment.com ...🤯 jinja comes with a loader to
pre-compile
templates! Defihnitely need to look at this formarkata
, asjinja
is till one of the biggest hot spots. -
@waylonwalker
2023
API — Jinja Documentation (3.0.x)
https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.FileSystemLoade ...I've definitely been missing out on setting up a proper jinja loader on a few projects, I need to lean on this a bit more.
class jinja2.FileSystemLoader(searchpath, encoding='utf-8', followlinks=False): ''' Load templates from a directory in the file system. '''
The path can be relative or absolute. Relative paths are relative to the current working directory.
loader = FileSystemLoader("templates") # A list of paths can be given. The directories will be searched in order, stopping at the first matching template. loader = FileSystemLoader(["/override/templates", "/default/templates"])
-
@waylonwalker
2023
(124) Tailwind CSS Crash Course - YouTube
https://www.youtube.com/watch?v=UBOj6rqRUMENice intro into tailwind, I definitely started grasping some of the concepts after watching Brad.
-
@waylonwalker
2023
GitHub - wagoodman/dive: A tool for exploring ...
https://github.com/wagoodman/diveReally cool tui to inspect docker imaages that runs with docker.
-
@waylonwalker
2023
GZIP Compression Test | GiftOfSpeed
https://www.giftofspeed.com/gzip-test/A nice tool to check compression on a public url.
-
@waylonwalker
2023
Read a Range of Data - LIMIT and OFFSET - SQL ...
https://sqlmodel.tiangolo.com/tutorial/limit-and-offset/?h=#combine-li ...Implement paging in sqlmodel with where, limit, and offset.
def select_heroes(): with Session(engine) as session: statement = select(Hero).where(Hero.age > 32).limit(3) results = session.exec(statement) heroes = results.all() print(heroes)
-
@waylonwalker
2023
DuckDB vs. MotherDuck — should you switch to ...
https://kestra.io/blogs/2023-07-28-duckdb-vs-motherduckduckdb is a new in process database that has been making its rounds in analytics for its high performance in those applications.
Mother duck is a centeralized server that brings manages storage, data sharing and an ide to duckdb.
-
@waylonwalker
2023
Center things - Textual
https://textual.textualize.io/how-to/center-things/How to center things in textual. Textual has a very unique way of styling text user interfaces for the terminal using css. If you know css it feels natural.
@willmcgugan, has put together a great article on how to center things in textual
here the final result
from textual.app import App, ComposeResult from textual.widgets import Static QUOTE = "Could not find you in Seattle and no terminal is in operation at your classified address." class CenterApp(App): """How to center things.""" CSS = """ Screen { align: center middle; } #hello { background: blue 50%; border: wide white; width: 40; height: 9; text-align: center; content-align: center middle; } """ def compose(self) -> ComposeResult: yield Static(QUOTE, id="hello") if __name__ == "__main__": app = CenterApp() app.run()
-
@waylonwalker
2023
s3-tree · PyPI
https://pypi.org/project/s3-tree/Super useful way to show a tree view of an s3 bucket's structure!
pip install s3-tree
s3-tree bucketname
-
@waylonwalker
2023
python - SQLAlchemy ORDER BY DESCENDING? - St ...
https://stackoverflow.com/questions/4186062/sqlalchemy-order-by-descen ...How to sort results from a sqlalchemy based orm.
.order_by(model.Entry.amount.desc())
I needed this to enable paging on my thoughts api.
@post_router.get("/posts/") async def get_posts( *, request: Request, session: Session = Depends(get_session), hx_request: Annotated[str | None, Header()] = None, accept: Annotated[str | None, Header()] = None, current_user: Annotated[User, Depends(try_get_current_active_user)], page_size: int = 10, page: int = 1, ) -> Posts: "get all posts" statement = ( select(Post) .where(Post.published) .order_by(Post.id.desc()) .limit(page_size) .offset((page - 1) * page_size) ) posts = session.exec(statement).all() posts = Posts(__root__=posts) if isinstance(current_user, RedirectResponse): is_logged_in = False else: is_logged_in = True if hx_request and page == 1 and len(posts.__root__) == 0: return HTMLResponse('<ul id="posts"><li>No posts</li></ul>') if hx_request and len(posts.__root__) == 0: return HTMLResponse("") if not hx_request and len(posts.__root__) == 0: return ["no posts"] if hx_request: return templates.TemplateResponse( "posts.html", { "request": request, "config": config, "posts": posts, "md": md, "is_logged_in": is_logged_in, "page": page, }, ) if accept.startswith("text/html"): return templates.TemplateResponse( "base.html", { "request": request, "config": config, "posts": posts, "md": md, "is_logged_in": is_logged_in, "page": page, }, ) return posts
-
@waylonwalker
2023
kndndrj/nvim-dbee: Interactive database clien ...
https://github.com/kndndrj/nvim-dbeeA neovim database client that I need to check out.
-
@waylonwalker
2023
Relocating the Docker root directory - IBM Do ...
https://www.ibm.com/docs/en/z-logdata-analytics/5.1.0?topic=compose-re ...A very straightforward guide to moving your docker data, such as container storage to a different location. In my case I wanted it off of my boot drive.
-
@waylonwalker
2023
containers/aardvark-dns: Authoritative dns se ...
https://github.com/containers/aardvark-dnsI ran into some dns issues while running podman on arch, aparantly I had missed an optional dependency of aardvark-dns for container to container dns resolution.
paru -S aardvark-dns
-
@waylonwalker
2023
Podman - ArchWiki
https://wiki.archlinux.org/title/PodmanI kept running into limits in the number of subuid and subgid's I had on my system by default. As always thank the arch wiki guide for having the most comprehensive yet consice guide to setup podman.
What I needed to do to fix the error.
usermod --add-subuids 100000-165535 --add-subgids 100000-165535 username
-
@waylonwalker
2023
TestDisk Step By Step - CGSecurity
https://www.cgsecurity.org/wiki/TestDisk_Step_By_Steptestdisk
is an amazing command line utility (interactive tui) that just saved me a hard drive that was filled with data, but every machine that I plugged it into told me that it was completely unpartitioned. -
@waylonwalker
2023
Using Rich Inspect to interrogate Python obje ...
https://textual.textualize.io/blog/2023/07/27/using-rich-inspect-to-in ...I love rich inspect. It's one of my most often used features of rich. It gives you a great human readable insight into python object instances.
>>> from rich import inspect >>> text_file = open("foo.txt", "w") >>> inspect(text_file)
I have a pyflyby entry for it so that I can just run it ang get automatic imports. To not clash with the standard library inspect, which is quite useful on it's own, I have aliased it to
rinspect
.from rich import inspect as rinspect
-
@waylonwalker
2023
Wesley Aptekar-Cassels | Reasons to avoid Jav ...
https://blog.wesleyac.com/posts/why-not-javascript-cdnAnd this is why we don't run cdn in prod, respect your users who can't control where the assets are stored. There are so many fast static hosting providers out there, if you are worried about performance reasons use one of those to self host.
-
@waylonwalker
2023
</> htmx ~ The json-enc Extension
https://htmx.org/extensions/json-enc/json-enc extension converts url encoded form values into json encoded data, this is very useful for fastapi to have the same interface for htmx and curl type of interfaces.
-
@waylonwalker
2023
Header Parameters - FastAPI
https://fastapi.tiangolo.com/tutorial/header-params/#declare-header-pa ...Getting request headers in fastapi has a pretty nice stetup, it allows you to get headers values as function arguments,
I was able to use headers to detect if a request was made from htmx or not.
If the request was made from htmx, then we want a html format, otherwise I'm probably hitting the api programatically from something like
curl
orpython
@post_router.post("/post/") async def post_post( request: Request, post: PostCreate, current_user: Annotated[User, Depends(try_get_current_active_user)], session: Session = Depends(get_session), is_hx_request: Annotated[str | None, Header()] = None, ) -> PostRead: "create a post" print('hx_request', hx_request) db_post = Post.from_orm(post) session.add(db_post) session.commit() session.refresh(db_post) if is_hx_request: return templates.TemplateResponse("post_item.html", {"request": request, "config": config, "post": db_post}) return db_post
-
@waylonwalker
2023
1j01/textual-paint: :art: MS Paint... in your ...
https://github.com/1j01/textual-paint1j01 created a complete working clone of ms paint in the terminal using the textual framework. It's incredible.
-
@waylonwalker
2023
sqlite-utils now supports plugins
https://simonwillison.net/2023/Jul/24/sqlite-utils-plugins/As the title states sqlite-utils now supports plugins. I dug in just a bit and Simon implemented this completely with entrypoints, no framework or library at all.
-
@waylonwalker
2023
(113) Session vs Token Authentication in 100 ...
https://www.youtube.com/watch?v=UBUNrFtufWoGreat short explaination of session vs token authentication.
-
@waylonwalker
2023
Form Data - FastAPI
https://fastapi.tiangolo.com/tutorial/request-forms/#define-form-param ...Getting form data inside of fastapi was not intuitive to me at first. Everything I had used in fastapi leaned on pydantic models. Form data comes in differently and needs collected differently.
from typing import Annotated from fastapi import FastAPI, Form app = FastAPI() @app.post("/login/") async def login(username: Annotated[str, Form()], password: Annotated[str, Form()]): return {"username": username}
-
@waylonwalker
2023
pywebview
https://pywebview.flowrl.com/guide/usage.htmlI am creating this post from a desktop app that I created in 3 lines.
import webview webview.create_window('Woah dude!', 'https://thoughts.waylonwalker.com') webview.start()
-
@waylonwalker
2023
Column INSERT/UPDATE Defaults — SQLAlchemy 1. ...
https://docs.sqlalchemy.org/en/14/core/defaults.html#server-invoked-dd ...sqlalchemy server_defaults end up as defaults in the database when new values are inserted.
t = Table( "test", metadata_obj, Column("abc", String(20), server_default="abc"), Column("created_at", DateTime, server_default=func.sysdate()), Column("index_value", Integer, server_default=text("0")), )
CREATE TABLE test ( abc varchar(20) default 'abc', created_at datetime default sysdate, index_value integer default 0 )
-
@waylonwalker
2023
Template Designer Documentation — Jinja Docum ...
https://jinja.palletsprojects.com/en/3.1.x/templates/#includeA feature of jinja that I just discovered is including sub templates. Here is an example from the docs.
{% include 'header.html' %} Body goes here. {% include 'footer.html' %}
And inside of my thoughts project I used it to render posts.
<ul id='posts'> {% for post in posts.__root__ %} {% include 'post_item.html' %} {% endfor %} </ul>
note that post_item.html automatically inherits the post variable.
-
@waylonwalker
2023
Templates - FastAPI
https://fastapi.tiangolo.com/advanced/templates/A guide to add Jinja2Templates to fastapi.
-
@waylonwalker
2023
</> htmx ~ Documentation
https://htmx.org/docs/#swappingA complete reference of all of the htmx swapping methods.
-
@waylonwalker
2023
python 3.x - FastAPI redirection for trailing ...
https://stackoverflow.com/questions/63511413/fastapi-redirection-for-t ...I am trying to use htmx on a new fastapi site for my thoughts, and have been hitting this error.
Mixed Content: The page at 'https://front.mydomain.com/#/clients/1' was loaded over HTTPS, but requested an insecure resource 'http://back.mydomain/jobs/?_end=25&_order=DESC&_sort=id&_start=0&client_id=1'. This request has been blocked; the content must be served over HTTPS.
What is happening
I have an htmx component that gets the current users name, but if they are not logged in the backend redirects to a login form.
<div hx-get='/users/me' hx-trigger='load'> get me </div>
But for some reason when the front end gets this redirect, it tries to do it through http, and flags it as insecure.
The solution
To solve this issue, the post directs to set the
--forwarded-allow-ips
to '*'uvicorn thoughts.api.app:app --port 5000 --reload --log-level info --host 0.0.0.0 --workers 1 --forwarded-allow-ips '*'
-
@waylonwalker
2023
</> htmx ~ The client-side-templates Extensio ...
https://htmx.org/extensions/client-side-templates/Using templates with htmx requires the client-side-templates extension, and the template engine to be loaded in a
<script>
tag.example htmx using templates.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <script src="https://unpkg.com/htmx.org"></script> <script src="https://unpkg.com/htmx.org/dist/ext/client-side-templates.js"></script> <script src="https://unpkg.com/mustache@latest"></script> </head> <body> <div hx-ext="client-side-templates"> <button hx-get="https://jsonplaceholder.typicode.com/todos/1" hx-swap="innerHTML" hx-target="#content" mustache-template="foo"> Click Me </button> <p id="content">Start</p> <template id="foo"> <p> {% raw %}{{userID}}{% endraw %} and {% raw %}{{id}}{% endraw %} and {% raw %}{{title}}{% endraw %} and {% raw %}{{completed}}{% endraw %}</p> </template> </div> </body> </html>
-
@waylonwalker
2023
Static Files - FastAPI
https://fastapi.tiangolo.com/tutorial/static-files/Mounting static files in fastapi.
from fastapi import FastAPI from fastapi.staticfiles import StaticFiles app = FastAPI() app.mount("/static", StaticFiles(directory="static"), name="static")
-
@waylonwalker
2023
(109) HTMX looks pretty neat #coding #javascr ...
https://www.youtube.com/shorts/IqE7juQBr6ALove the poling example with hx-trigger='every 1s'.
-
@waylonwalker
2023
First-class session support in FastAPI · Issu ...
https://github.com/tiangolo/fastapi/issues/754Here is a snippet provided by @tiangolo to store the users jwt inside of a session cookie in fatapi. This was written in feb 12, 2020 and admits that this is not a well documented part of fastapi.
It's already in place. More or less like the rest of the security tools. And it's compatible with the rest of the parts, integrated with OpenAPI (as possible), but probably most importantly, with dependencies.
It's just not properly documented yet. 😞
But still, it works 🚀 e.g.
from fastapi import FastAPI, Form, HTTPException, Depends from fastapi.security import APIKeyCookie from starlette.responses import Response, HTMLResponse from starlette import status from jose import jwt app = FastAPI() cookie_sec = APIKeyCookie(name="session") secret_key = "someactualsecret" users = {"dmontagu": {"password": "secret1"}, "tiangolo": {"password": "secret2"}} def get_current_user(session: str = Depends(cookie_sec)): try: payload = jwt.decode(session, secret_key) user = users[payload["sub"]] return user except Exception: raise HTTPException( status_code=status.HTTP_403_FORBIDDEN, detail="Invalid authentication" ) @app.get("/login") def login_page(): return HTMLResponse( """ <form action="/login" method="post"> Username: <input type="text" name="username" required> <br> Password: <input type="password" name="password" required> <input type="submit" value="Login"> </form> """ ) @app.post("/login") def login(response: Response, username: str = Form(...), password: str = Form(...)): if username not in users: raise HTTPException( status_code=status.HTTP_403_FORBIDDEN, detail="Invalid user or password" ) db_password = users[username]["password"] if not password == db_password: raise HTTPException( status_code=status.HTTP_403_FORBIDDEN, detail="Invalid user or password" ) token = jwt.encode({"sub": username}, secret_key) response.set_cookie("session", token) return {"ok": True} @app.get("/private") def read_private(username: str = Depends(get_current_user)): return {"username": username, "private": "get some private data"}
-
@waylonwalker
2023
Harlequin SQL IDE - DuckDB
https://duckdb.org/docs/guides/sql_editors/harlequinHarlequin is a pretty sweet example of what textual can be used to create. Its a terminal based sql ide for DuckDB.
-
@waylonwalker
2023
Python API - DuckDB
https://duckdb.org/docs/api/python/overview.htmlTo persist data in duckdb you need to first make a connection to a duck db database.
con = duckdb.connect('file.db')
Then work off of the connection
con
rather thanduckdb
.con.sql('CREATE TABLE test(i INTEGER)') con.sql('INSERT INTO test VALUES (42)') # query the table con.table('test').show() # explicitly close the connection con.close()
-
@waylonwalker
2023
SQL on Pandas - DuckDB
https://duckdb.org/docs/guides/python/sql_on_pandasduckdb can just query any pandas dataframe that is in memory.
I tried running it against a list of objects and got this error. Great error message that gives me supported types right in the message.
Make sure that "posts" is either a pandas.DataFrame, duckdb.DuckDBPyRelation, pyarrow Table, Dataset, RecordBatchReader, Scanner, or NumPy ndarrays with supported format
-
@waylonwalker
2023
pytest-subtests · PyPI
https://pypi.org/project/pytest-subtests/pytest-subtests is a package to register multiple subtests within a similar test function.
-
@waylonwalker
2023
Dark Form
https://codepen.io/Godex/pen/DLgQbgA nice codepen reference for dark forms. I am using it for my thoughts chrome extension.
-
@waylonwalker
2023
string
stringstring
-
@waylonwalker
2023
doyensec/wsrepl: WebSocket REPL for pentester ...
https://github.com/doyensec/wsreplVery inspiring textual project to check out how they set up the ui. Their intro video has a pretty epic dev experience.
-
@waylonwalker
2023
(1) Doyensec on Twitter: "Announcing wsrepl, ...
https://twitter.com/Doyensec/status/1681320727465672706wsrepl is an epic websocket repl built in python on the textual framework.
-
@waylonwalker
2023
Filter Data - WHERE - SQLModel
https://sqlmodel.tiangolo.com/tutorial/where/#filter-rows-using-where- ...When fetching pydantic models from the database with sqlmodel, and you cannot select your item by id, you probably need to use a where clause. This is the sqlmodel way of doing it.
Here is a snippet of how I am using sqlmodel select and where to find a post by link in my thoughts database.
@post_router.get("/link/") async def get_post_by_link( *, session: Session = Depends(get_session), link: str, ) -> PostRead: "get one post by link" link = urllib.parse.unquote(link) print(f'link: {link}') post = session.exec(select(Post).where(Post.link==link)).first() if not post: raise HTTPException(status_code=404, detail=f"Post not found for link: {link}") return post
-
@waylonwalker
2023
URL Decoding query strings or form parameters ...
https://www.urldecoder.io/python/In order to turn url encoded links back into links that I would find in the database of my thoughts project I need to urldecode them when they hit the api. When anything hits the api it must urlencode the links in order for them to be sent correctly as data and not get parsed as part of the url.
Here is a snippet of how I am using urlib.parse.unquote to un-encode encoded urls so that I can fetch posts from the database.
@post_router.get("/link/") async def get_post_by_link( *, session: Session = Depends(get_session), link: str, ) -> PostRead: "get one post by link" link = urllib.parse.unquote(link) print(f'link: {link}') post = session.exec(select(Post).where(Post.link==link)).first() if not post: raise HTTPException(status_code=404, detail=f"Post not found for link: {link}") return post
-
@waylonwalker
2023
encodeURIComponent() - JavaScript | MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Glob ...In order to send data that includes special characters such as
/
in a url you need to url encode it. You have probably seen these many times in urls with things like %20 for spaces.I'm working on a chrome extension to make quick blog posts, like thoughts or a persistent bookmark tool with comments. The backend is written in fastapi and when I check to see if I have a post for a page I need to url encode it.
curl -X 'GET' \ 'https://thoughts.waylonwalker.com/link/?link=https%3A%2F%2Fhtmx.org%2Fextensions%2Fclient-side-templates%2F' \ -H 'accept: application/json'
curl example generated from the fastapi swagger docs.
Here is how I used javascript's
encodeURIComponent
to turn my chrome extension into a notification when I already have a post for the current page.// Event listener for tab changes chrome.tabs.onActivated.addListener(function (activeInfo) { // Get the active tab information chrome.tabs.get(activeInfo.tabId, function (tab) { const url = tab.url || ""; getData(`https://thoughts.waylonwalker.com/link/?link=${encodeURIComponent(url)}`).then((data) => { console.log('link data: ', data); if (data.hasOwnProperty('detail')) { chrome.browserAction.setBadgeText({ text: "" }); } else { localStorageKey = `formData-${url}`; chrome.browserAction.setBadgeText({ text: "1" }); chrome.browserAction.setBadgeBackgroundColor({ color: "#80A3D5" }); localStorage.setItem(localStorageKey, JSON.stringify(data)); } }); }); });
-
@waylonwalker
2023
(106) Python Sucks And I LOVE It | Prime Reac ...
https://www.youtube.com/watch?v=8D7FZoQ-z20&t=97Prime reviews an article with some hot takes about python being slow and quirky, but good enough for a lot of things. Especially data applications that have libraries written in C.
-
@waylonwalker
2023
Changelog on Twitter: "🗣️ @kelseyhightower on ...
https://twitter.com/changelog/status/1681306857951084544Such an inspiring clip from Kelsey Heightower. Make good shit that inspires people rather than fake ppts of how things could be.
-
@waylonwalker
2023
Chris Coyier on Twitter: "I was unaware of `t ...
https://twitter.com/chriscoyier/status/1681407724993798144Next time I'm working with large headers on small screens I need to try this. I always truggle to get them to look good for most text and overflow ridiculously long words correctly or at all.
text-wrap: pretty; text-wrap: balance
-
@waylonwalker
2023
Full-text search - Datasette documentation
https://docs.datasette.io/en/latest/full_text_search.html#enabling-ful ...Enable full-text search in sqlite using sqlite-utils.
$ sqlite-utils enable-fts mydatabase.db items name description
-
@waylonwalker
2023
sqlite-utils command-line tool - sqlite-utils
https://sqlite-utils.datasette.io/en/stable/cli.html#querying-data-dir ...I want to like jq, but I think Simon is selling me on sqlite, maybe its just me but this looks readable, hackable, editable, memorizable. Everytime I try jq, and its 5 minutes fussing with it just to get the most basic thing to work. I know enough sql out of the gate to make this work off the top of my head
curl https://thoughts.waylonwalker.com/posts/ | sqlite-utils memory - 'select title, message from stdin where stdin.tags like "%python%"' | jq
-
@waylonwalker
2023
sqlite-utils command-line tool - sqlite-utils
https://sqlite-utils.datasette.io/en/stable/cli.html#inserting-json-da ...insert a json array directly into into sqlite with sqlite-utils.
echo '{"name": "Cleo", "age": 4}' | sqlite-utils insert dogs.db dogs -
-
@waylonwalker
2023
jq Cheat Sheet
https://lzone.de/cheat-sheet/jqA nice cheat sheet for jq. jq looks so nice, but it so quickly gets overwhelming on how to select what you want. I was able to make a jq contains query.
curl https://thoughts.waylonwalker.com/posts/ | jq '.[] | select(.title | contains("python"))'
-
@waylonwalker
2023
How to Manage 'Systemd' Services and Units Us ...
https://www.tecmint.com/manage-services-using-systemd-and-systemctl-in ...A fantastic overview of the systemd cli.
-
@waylonwalker
2023
How to fix ZFS pool not importing at boot :: ...
https://ounapuu.ee/posts/2021/02/01/how-to-fix-zfs-pool-not-importing- ...Hacky solution to get
zpool import tank
to work on boot right away. This has been an issue that has plagued my system for months and no matter what dependencies I add in it never works, but adding a sleep as ExecStartPre did the trick. -
@waylonwalker
2023
Flask Trailing Slashes 404
https://stackoverflow.com/questions/33241050/trailing-slash-triggers-4 ...In flask apps I often get a 404 for routes with a trailing slash. This Stack Overflow post shows how to configure flask to allow trailing slashes on some or all routes.
-
@waylonwalker
2023
Deleting Specific Lines in a File with sed or ...
https://nickjanetakis.com/blog/deleting-specific-lines-in-a-file-with- ...sed can be a tricky beast, I often stumble when trying to pipe into it. Next time I need to use sed, I should reference this article by Nick Janetakis. He makes it looks much easier than my experience has been, and it appears to behave like a vim
:%s/
substitution does, or ag/
g command. -
@waylonwalker
2023
Dear Red Hat... featuring Jeff Geerling (Chan ...
https://changelog.com/friends/7Loved this explanation about all the recent lock down with RHEL from Jeff Geerling.
-
@waylonwalker
2023
How to pull from images from docker.io with p ...
https://gist.github.com/isomorphisms/3114ab86960656a729a6b4653001aae2By default podman will not pull images from docker.io and will need setup. This guide worked for me.
-
@waylonwalker
2023
python script is not found
NoneWhen setting up a new machine, vm, docker image you might be installing command line tools from places like pip. They will often put executables in your
~/.local/bin
directory, but by default your shell is not looking in that directory for commands.WARNING: The script dotenv is installed in '/home/falcon/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
To solve this you need to add that directory to your $PATH.
export PATH=$PATH:~/.local/bin
To make this change permanant add this line to your shell's init script, which is likely something like
~/.bashrc
or~/.zshrc
. -
@waylonwalker
2023
LazyVim Installation
https://www.lazyvim.org/installationLately in 2023 I have been leaning on lazyvim for my new setups where I am not necessarily ready to drop my full config. It's been pretty solid, and comes with a very nice setup out of the box, the docs are pretty fantastic as well.