Posts tagged: dev

All posts with the tag "dev"

310 posts latest post 2026-08-13
Publishing rhythm
Jul 2026 | 5 posts
GitHub - simonw/shot-scraper: A CLI utility for taking screenshots of websites, recording video demos and scraping sites using JavaScript A CLI utility for taking screenshots of websites, recording video demos and scraping sites using JavaScript - simonw/shot-scraper GitHub · github.com 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). Note 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.
HTML Over The Wire | Hotwire Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire. 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.
How to Use HTML to Open a Link in a New Tab Tabs are great, aren't they? They allow the multitasker in all of us to juggle a bunch of online tasks at the same time. Tabs are so common now that, when you click on a link, it's likely it'll ope... freeCodeCamp.org · freecodecamp.org 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.
External Link stackoverflow.com I went down the route of leveraging the 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, 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 And the usage looks like
Header Parameters - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com 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 or
Form Data - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com 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.