BlogFeatured 5 times

alexwlchan

Alex Chan’s personal website

Visit alexwlchan.net

Recent posts

Newest first
  1. funkycache: a Python library to cache functions in SQLite

    funkycache is a new Python library that uses SQLite to cache function outputs, automatically invalidating the cache when source files change.

  2. gobench: a tool for comparing Go benchmark runs across branches

    Gobench is a new Go tool designed to streamline the comparison of benchmark runs across different branches, improving upon manual scripting methods.

  3. Verifying my web archives with Playwright

    Playwright is used to automate the verification of local web archives for self-containedness by detecting external requests.

  4. Positive alerts in Prometheus

    Prometheus monitoring alerts are adjusted to include a "positive alert" that signals when a previously flapping service has consistently passed checks for two weeks.

  5. Organising my cross-stitch patterns

    A cross-stitch enthusiast created a static website to organize hundreds of digital PDF patterns using a masonry layout and PDF thumbnails.

  6. Parametrised tests in Rust with named parameters

    Rust developers can create parametrised tests with named fields using a custom macro for improved readability and maintainability.

  7. Abusing ID3 chapters to turn videos into glanceable podcasts

    Abusing ID3 chapters in MP3 files allows videos to be listened to as audio-first, with visual context available on the lock screen.

  8. Why can’t you combine .tar.gz files with cat ?

    Combining .tar.gz files with cat fails because tar archives have EOF markers, while gzip compresses a single stream without them.

  9. Preventing line breaks in <code> elements

    A new CSS class prevents awkward line breaks in short inline code snippets by using the `nowrap` property.

  10. Fixing a bug with byte order marks

    A Python function to convert SRT to WebVTT subtitles encountered a bug when handling UTF-8 byte order marks.

  11. A Git hook to prevent committing directly to main

    A Git pre-commit hook prevents accidental commits directly to the main branch by checking the current branch name and aborting the commit if it is main.

  12. I don’t want to repeat repeat myself

    Two regular expressions were used to search codebases for accidentally repeated words or phrases, aiding in typo correction and cleanup.

  13. What can wonky APIs tell us about the web?

    The HTMLMediaElement.canPlayType API and History API's pushState() method reveal challenges in web API design due to backward compatibility needs.

  14. Using the Screen Capture API to record a browser window

    The Screen Capture API allows recording browser tabs with audio, offering an alternative to QuickTime or Playwright for saving animated web content.

  15. Using Pytester to test my Playwright fixtures

    Pytester is a tool for testing pytest plugins, enabling isolated test suites to verify custom fixture behavior and outcomes.