![[None]] Yet 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 This does work with a full url
Posts tagged: dev
All posts with the tag "dev"
310 posts
latest post 2026-08-13
Publishing rhythm
Boot.dev is crushing it with these interviews. This one has Wes Bos, includes teaching, webdev, where is webdev headed.
GitHub - sysid/sse-starlette Contribute to sysid/sse-starlette development by creating an account on GitHub. GitHub · github.com sse- FastAPI.">starlette provides server sent events for startlette and FastApi. I’m evaluating for use with htmx. Installation: # Usage: #
overflow - Layout Utilities for controlling how an element handles content that is too large for the container. tailwindcss.com Controlling overflow with tailwindcss Examples #
Default scrollbars on a dark theme website are just the ugliest thing. This page covers all the pseudo selectors needed to style the scrollbar.
Change Autocomplete Styles in WebKit Browsers | CSS-Tricks We got a nice tip from Lydia Dugger via email with a method for changing the styles that WebKit browsers apply to form fields that have been autocompleted. CSS-Tricks · css-tricks.com 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.
GitHub - florimondmanca/arel: Lightweight browser hot reload for Python ASGI web apps Lightweight browser hot reload for Python ASGI web apps - florimondmanca/arel GitHub · github.com arel 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.
main.py python I just discovered arel for hot reloading python applications when content changes from this snippet that implements it for fatapi. On app startup add the routes if in DEBUG mode. install and make sure you have for websocket support. In the template, load the script when in debug mode.
teej dv 🔭 (@teej_dv) on X Hypermedia fixes this HATEOAS gonna hate X (formerly Twitter) · twitter.com HATEOAS 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.
why-is-postgres-default
Serious question. No one ever got fired for choosing PostgreSQL # But, why. It’s the most loved db, right? Right? Maybe it’s time to rethink it. Don’t get me wrong, if I need a relational db as a service, PostgreSQL is going to be my first choice, but why do I need to run a separate application for it? Tutorials use sqlite # Why is that? Because there is nothing else to stand up. Nothing else to maintain. And you probably already have it installed on just about anything that has a battery. SQLite runs in memory # Don’t need, or maybe don’t want to persist state. Run it in memory. This is a nice feature for running tests. Less exposure # SQLite is a file on your filesystem. It’s not a web service. It’s not a cloud service. Not that postgres is insecure, but it is one more endpoint that you have to think about securing. this means that is probably also cheaper 🤑 SQLite is easy to replicate # Want to run your new feature with prod data? Pull a replica or backup. It’s a file, you can cp, s…
Pagefind Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure. Pagefind · 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 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.
A Case For Tailwindcss
I was watching @theprimeagen recently and I think he sold me on using tailwindcss. The thing about tailwind is that it is not a big component library, it’s a set of css classes mapped to a few (usually one) style. All css classes are shitty, so you might as well use someone else’s shitty css classes on all your projects rather than thinking you’re being smart with a new set of classes that you will hate in 6 months when you come back to the project. roughly quoted from memory of @theprimeagen It’s tiny # So unlike big component libraries like tailwind, it comes with a cli that that it uses to create the final css file. It is able to treeshake out all the tailwind classes that you are not using and only ship the ones that you are using. It’s hard to clash # Since the classes are so small and single purpose it’s hard to end up with something like in two places that mean different things causing you to duplicate most of that css anyways so that the whole design doesn’t break when you chan…
GitHub - aca/emmet-ls: Emmet support based on LSP. Emmet support based on LSP. Contribute to aca/emmet-ls development by creating an account on GitHub. GitHub · github.com This 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. just uses lsp-completion, so its the same flow as other completions. You can try it out by installing with config #
Formatter How to use the Biome formatter. Biome · biomejs.dev Tried out biome today and it worked better than prettier on jinja templates, I might adopt this over prettier.
</> htmx ~ The disable-element Extension htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypert... v1.htmx.org 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.
</> htmx ~ hx-indicator Attribute The hx-indicator attribute in htmx allows you to specify the element that will have the `htmx-request` class added to it for the duration of the request. This can be used to show spinners or progre... htmx.org The class is added to elements. You can target this css selector to create loading state throbbers. By default the target element will the, but you can use the typical htmx css selector to select which element will recieve the class while the request is running. The only way to override the name of the class is through config.
Prime 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!
</> htmx ~ Examples ~ Updating Other Content htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypert... htmx.org 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.
Bigger Applications - Multiple Files - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com Fastapi lets you tag your ’s so that the swagger docs are grouped according to the router. Now all routes in will appear in the router group in the swagger docs.
Tailwind css component library. There are many examples with copy and pastabily with the tailwind classes already setup.