Elsewhere
Release TIL Research Tool Museum Sighting Comment
Filters: Sorted by date
3,649 results
«« first
« previous
page 78 / 122
next »
last »»
TIL
Safely outputting JSON
— Carelessly including the output of `json.dumps()` in an HTML page can lead to an XSS hole, thanks to the following:
TIL
Creating a minimal SpatiaLite database with Python
— When writing a test for [datasette-leaflet-freedraw](https://github.com/simonw/datasette-leaflet-freedraw) I realized I didn't have a simple tiny recipe for creating an in-memory SpatiaLite database in Python. I came up with this:
TIL
Registering the same Pluggy hook multiple times in a single file
— I found myself wanting to register more than one instance of a [Pluggy](https://pluggy.readthedocs.io/) plugin hook inside a single module.
TIL
Using lsof on macOS
— `lsof` stands for "list open files". Here are some very basic usage notes for the version that ships with macOS.
TIL
Using C_INCLUDE_PATH to install Python packages
— I tried to install my [datasette-bplist](https://github.com/simonw/datasette-bplist) plugin today in a fresh Python 3.10 virtual environment on macOS and got this error:
TIL
Storing files in an S3 bucket between GitHub Actions runs
— For my [git-history live demos](https://github.com/simonw/git-history/issues/30) 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.
Release
datasette-cluster-map 0.17.2
— Datasette plugin that shows a map for any data with latitude/longitude columns
TIL
__init_subclass__
— David Beazley [on Twitter](https://twitter.com/dabeaz/status/1466731368956809219) said:
TIL
Ignoring a line in both flake8 and mypy
— I [needed to tell](https://github.com/simonw/sqlite-utils/pull/347#issuecomment-982133970) both `flake8` and `mypy` to ignore the same line of code.
TIL
Reusing an existing Click tool with register_commands
— The [register_commands](https://docs.datasette.io/en/stable/plugin_hooks.html#register-commands-cli) plugin hook lets you add extra sub-commands to the `datasette` CLI tool.
TIL
Publishing a Web Component to npm
— I tried this for the first time today with my highly experimental [datasette-table](https://www.npmjs.com/package/datasette-table) Web Component. Here's [the source code](https://github.com/simonw/datasette-table/tree/0.1.0) for version 0.1.0.
TIL
Pausing traffic and retrying in Caddy
— A pattern I really like for zero-downtime deploys is the ability to "pause" HTTP traffic at the load balancer, such that incoming requests from browsers appear to take a few extra seconds to return, but under the hood they've actually been held in a queue while a backend server is swapped out or upgraded in some way.
«« first
« previous
page 78 / 122
next »
last »»