![[None]] I’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.
Publishing rhythm
kubernetes 6 months in
I stumbled into kubernetes December 2023 when I was looking for a better way to self host applications. I was looking for something that didn’t require logging into a server and building and deploying like a cave man. I wanted a smoother experience than docker compose was giving me. https://waylonwalker.com/looking-for-a-heroku-replacement/ This post turned into a list of tools that I have adopted into my k8s workflow, and plan to keep. enjoy. Kompose # Kompose is a great tool for gettting going and converting your docker-compose to kubernetes manifests or helm templates. It was a great tool for me to get started with, but I was afraid that it was hindering me learning more and just blindly using its output so I have tried to use it less and less. I’m now not solely leaning on it, but using it to get out quick POCs with low friction. Kompose really helped me go 0 to 60 and get right into kubernetes with my existing docker compose files and very little change. I found it a great way to…
Simon Willison (@simonw) on X TIL Google Chrome has a --headless option you can use to take a screenshot from the CLI that's built into the default installation X (formerly Twitter) · twitter.com Huh, so this is just built right into the chrome cli.
![[None]] jinja’s 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.
@cassidoo) on X — I MADE AN APP ✨" loading="lazy"> Cassidy ( @cassidoo) on X I MADE AN APP ✨ X (formerly Twitter) · twitter.com Damn 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?
![[None]]
Joining the split keyboards club: a Moonlander story | Carlos Becker This post will describe my experience with a couple of firsts: carlosbecker.com 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, ne…
My workflow, part 1 | Carlos Becker I keep getting asked how my setup works, how I use tmux and nvim over ssh… all that good stuff. carlosbecker.com 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)
strawberry-sqlalchemy by strawberry-graphql is a game-changer in its space. Excited to see how it evolves. A SQLAlchemy Integration for strawberry-graphql
I recently discovered AnyText by tyxsspa, and it’s truly impressive. Official implementation code of the paper <AnyText: Multilingual Visual Text Generation And Editing>
Using Netlify Analytics to Build a List of Popular Posts The other day, the wind blew and I decided to realign the design of my blog just a bit. One of the things I wanted to change was the content on my home page… blog.jim-nielsen.com 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.
I’m really excited about full-stack-fastapi-template, an amazing project by fastapi. It’s worth exploring! Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.
I came across puter from HeyPuter, and it’s packed with great features and ideas. 🌐 The Internet OS! Free, Open-Source, and Self-Hostable.
605: Jim Nielsen on Subversive URLs, Blogging + AI, and Design Engineers Jim Nielsen joins us to about URLs and linking as the new subversive way to maintain the web, paying for news in Canada, should content creators be worried about AI, the case for design engineers, … ShopTalk · shoptalkshow.com 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.
Configure Liveness, Readiness and Startup Probes This page shows how to configure liveness, readiness and startup probes for containers. For more information about probes, see Liveness, Readiness and Startup Probes. Before you beginYou need to ha... Kubernetes · kubernetes.io 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 and 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.
External Link stackoverflow.com The convention of “z-pages” comes from google and reduces the likelihood of collisions with application endpoints and keep the convention across all applications.
I recently discovered homelab-argocd by Doomlab7, and it’s truly impressive. My ArgoCD app of apps repository
Placehold Placehold is a simple, fast and free image placeholder service to generate SVG, PNG, JPEG, GIF, WebP and AVIF placeholder images for your project. placehold.co This is a handy placeholder generator for generating placeholder items like images, and videos.
![[None]] I 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.
flake8-to-ruff Convert existing Flake8 configuration to Ruff. PyPI · pypi.org 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.