til

320 posts tagged “til”.

  1. 2023
  2. Storing files in an S3 bucket between GitHub Actions runs

    For my git-history live demos I needed to store quite large files ( 200MB SQLite databases) in between GitHub Actions runs, to avoid having to recreate the entire file from scratch every time.

    1 min read
  3. Local wildcard DNS on macOS with dnsmasq

    I wanted to get wildcard DNS running on my Mac laptop, for development purposes. I wanted to point to my localhost IP address. I figured out how to do this using , installed via Homebrew.

    2 min read
  4. Using json_extract_path in PostgreSQL

    The function in PostgreSQL can be used to extract specific items from JSON - but I couldn't find documentation for the path language it uses.

    1 min read
  5. Upgrading Python Homebrew packages using pip

    VisiData 2.0 came out today. I previously installed VisiData using Homebrew, but the VisiData tap has not yet been updated with the latest version.

    1 min read
  6. Using the GitHub Actions cache with npx and no package.json

    Some of my repositories have GitHub Actions workflows that execute commands using , for example my graphql-scraper repo using to install and run the tool: npx get-graphql-schema…

    1 min read
  7. Returning related rows in a single SQL query using JSON

    When building database-backed applications you'll often find yourself wanting to return a row from the database along with its related rows.

    1 min read
  8. Mouse support in vim

    Today I learned that if you hit in vim and then type and hit enter… vim grows mouse support! In your terminal!

    1 min read
  9. Pixel editing a favicon with Pixelmator

    I wanted to add a favicon to Datasette, using a PNG image served from as suggested in this article by Adam Johnson.

    1 min read
  10. Logging OpenAI API requests and responses using HTTPX

    My LLM tool has a feature where you can set a environment variable to see full debug level details of any HTTP requests it makes to the OpenAI APIs.

    2 min read
  11. Testing Electron apps with Playwright and GitHub Actions

    Yesterday I figured out (issue 133) how to use Playwright to run tests against my Electron app, and then execute those tests in CI using GitHub Actions, for my datasett-app repo for my Datasette…

    1 min read
  12. shot-scraper for a subset of table columns

    For Datasette issue 1844 I wanted to create the following screenshot: From this page: https://congress-legislators.datasettes.com/legislators/legislator terms?

    1 min read
  13. Opt-in integration tests with pytest --integration

    For both s3-credentials and datasette-publish-fly I have a need for real-world integration tests that actually interact with the underlying APIs (AWS or Fly) to create and destroy resources on those…

    1 min read
  14. Using ChatGPT Browse to name a Python package

    I needed a name for my new Python CLI tool. It was originally called because I checked and https://pypi.org/project/py-grep/ was available - but when I tried to push the package to PyPI I got an error…

    4 min read
  15. Rendering Markdown with the GitHub Markdown API

    I wanted to convert the Markdown used in my TILs to HTML, using the exact same configuration as GitHub does.

    1 min read
  16. Redirecting a domain using Cloudflare Pages

    I wanted to redirect https://global-power-plants.datasettes.com/ to https://datasette.io/ - I decided to spin up a Cloudflare Pages site to do the work.

    1 min read
  17. Trying out cr-sqlite on macOS

    cr-sqlite is fascinating. It's a loadable SQLite extension by Matt Wonlaw that "allows merging different SQLite databases together that have taken independent writes".

    3 min read
  18. Setting up a custom subdomain for a GitHub Pages site

    This is so much easier than I was expecting it to be. https://simonw.github.io/datasette-lite/ Shortly after launching I realized that the project deserved its own vanity subdomain.

    1 min read
  19. Scraping Reddit via their JSON API

    Reddit have long had an unofficial (I think) API where you can add to the end of any URL to get back the data for that page as JSON. I wanted to track new posts on Reddit that mention my domain .

    1 min read
  20. Optimizing PNGs in GitHub Actions using Oxipng

    My datasette-screenshots repository generates screenshots of Datasette using my shot-scraper tool, for people who need them for articles or similar.

    2 min read
  21. Using LD_PRELOAD to run any version of SQLite with Python

    I've been wanting to figure this out for ages. This thread on Hacker News plus this Stackoverflow post gave me some initial clues.

    3 min read