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.
Publishing rhythm
Make the easy things easy
It’s so easy to get out of rhythm, get busy, and drop the ball on some things that you really want to do or should do. This blog is a good example. I took some time off for some family reasons, but have taken a long time to get back to it simply because I am out of rhythm. As I am trying to get back into the rhythm there is some tooling that I have set up for it that I completely forgot about that feel good to use again. Repetitive Tasks # Simple Repetitive Tasks that I have to do often can just feel soul crushing, and one main thing that got me interested in programming. AI tools are becoming more and more useful at solving these problems. For instance code generation tools like co-pilot or codeium are really good at boilerplate and pattern repetition. Things that used to be a few vim macros is now just banging on tab. I often look for setting up templates or some sort of snippet to replace a big chunk of boilerplate that I know I will need over and over. timebox # Don’t be afraid to…
</> 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.
Check out aboutfeeds by genmon. It’s a well-crafted project with great potential. Web feeds/RSS “getting started” guide for new users.
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.
Custom pages and templates - Datasette documentation docs.datasette.io Datasette has its own static server that can host assets such as style sheets.
Check out hedgedoc by hedgedoc. It’s a well-crafted project with great potential. HedgeDoc - Ideas grow better together
Just starred htmx-lsp by ThePrimeagen. It’s an exciting project with a lot to offer. its so over
Tailwind css component library. There are many examples with copy and pastabily with the tailwind classes already setup.
Tailwind CSS Cheat Sheet Cheat sheet to learn Tailwind CSS quickly. Browse and search all Tailwind utility classes or CSS properties on one page. nerdcave.com A nice searchable cheatsheet for tailwindcss classes.
cURL Command Without Using Cache | Baeldung on Linux A quick and practical guide to using curl without cache. Baeldung on Linux · baeldung.com 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.
sqlite has 3 different tokenizers,. These can be used with sqlite-utils. And with the python api.
GitHub - sharkdp/bat: A cat(1) clone with wings. A cat(1) clone with wings. Contribute to sharkdp/bat development by creating an account on GitHub. GitHub · github.com Bat 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.
Check out server-hot-reload by mikeckennedy. It’s a well-crafted project with great potential. Include in your web projects for dev-time auto reloading of web browser when any change is detected in content.
sqlite_utils Python library - sqlite-utils sqlite-utils.datasette.io 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. This returns a generator object that you can iterate over the row objects with.
External Link levelup.gitconnected.com 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 and it will write the changes to the files. I just used this on my thoughts repo.
GitHub - simonw/datasette-render-markdown: Datasette plugin for rendering Markdown Datasette plugin for rendering Markdown. Contribute to simonw/datasette-render-markdown development by creating an account on GitHub. GitHub · github.com datasette really does everything doesn’t it!