web-development

28 posts tagged “web-development”.

  1. 2025
  2. HTML video with subtitles

    Via Mariatta I found my PyVideo speaker page, and thanks to that page I learned that a talk I gave in 2009 had been rescued from the now-deceased Blip.tv and is now hosted by the Internet Archive…

    1 min read
  3. Creating a tiled zoomable image with OpenSeadragon and vips

    The San Francisco Microscopical Society has some extremely high resolution scanned images - one of them is a 1.67GB PNG file with a 25,088 × 17,283 pixel resolution.

    1 min read
  4. Compiling to WASM with llvm on macOS

    howto-wasm-minimal by Zalka Ernő (my fork here) is a neat demo of a minimal WASM module. It uses C++ to define functions for simple image manipulation including blurring an image, compiles it to WASM…

    1 min read
  5. Embedding JavaScript in a Jupyter notebook

    I recently found out modern browsers include a JavaScript API for creating public/private keys for cryptography.

    1 min read
  6. axe-core and shot-scraper for accessibility audits

    I just watched a talk by Pamela Fox at North Bay Python on Automated accessibility audits. The video should be up within 24 hours.

    1 min read
  7. Google Oauth2 is awesome

    I really enjoy using Google OAuth2. Essentially this completely removed my need to implement custom, often incomplete insecure authentication to my services.

    1 min read
  8. A simple two column CSS grid

    I decided to use CSS grids for this. I started with GPT-4. My prompt: HTML and CSS to display a grid of four images, each with a paragraph caption below the image - use figcaption The 2x2 grid should…

    2 min read
  9. How streaming LLM APIs work

    I decided to have a poke around and see if I could figure out how the HTTP streaming APIs from the various hosted LLM providers actually worked. Here are my notes so far.

    2 min read
  10. 2024
  11. Adding project links to PyPI

    I spotted a neat looking project links section on https://pypi.org/project/ExifReader/ Turns out that's added using a key in setup.py, e.g.

    1 min read
  12. Copy rich text to the clipboard

    I've been experimenting with a tool for generating the content for a weekly Substack newsletter by querying the Datasette API for my blog and assembling HTML for the last week of content.

    1 min read
  13. Adding a robots.txt using Cloudflare workers

    I got an unexpected traffic spike to https://russian-ira-facebook-ads.datasettes.com/ - which runs on Cloud Run - and decided to use to block crawlers.

    1 min read
  14. Creating a dynamic line chart with SVG

    I helped build the tide chart visualizations for Rocky Beaches. I wanted to generate an SVG line representing 24 hours of tide levels.

    2 min read
  15. Dynamically loading multiple assets with a callback

    For datasette-leaflet-geojson I wanted to dynamically load some external CSS and JavaScript and then execute some code once they had loaded (issue 14).

    1 min read
  16. Constant-time comparison of strings in Node

    When comparing secrets, passwords etc it's important to use a constant-time compare function to avoid timing attacks. In Python I use , documented here. I needed an equivalent in Node.js today.

    1 min read
  17. HTML video that loads when the user clicks play

    Today I figured out how to use the tag to show a static thumbnail that gets replaced by the loaded video only when the user clicks play.

    1 min read
  18. Dropdown menu with details summary

    I added dropdown menus to Datasette 0.51 - see 1064. I implemented them using the HTML element. The HTML looked like this: See the top right corner of https://latest-with-plugins.datasette.io/ for a…

    1 min read
  19. Error 153 Video player configuration error on YouTube embeds

    In all cases the HTML looked something like this: It turned out the solution may be to replace with : (Weirdly on some refreshes of the page I get the same error. I'm not sure why that is.)

    1 min read
  20. Custom Jinja template tags with attributes

    I decided to implement a custom Jinja template block tag for my datasette-render-markdown plugin. I wanted the tag to work like this: A basic Jinja extension After some fiddling around with GitHub…

    2 min read
  21. Adding a CORS policy to an S3 bucket

    Amazon S3 buckets that are configured to work as public websites can support CORS, allowing assets such as JavaScript modules to be loaded by JavaScript running on other domains.

    2 min read
  22. Calculating the AQI based on the Purple Air API for a sensor

    Purple Air sensors have an API at , which returns JSON that looks something like this: There's just one problem with this: it doesn't give you the AQI number that is displayed on their site!

    1 min read