Elsewhere
Release TIL Research Tool Museum
Filters: Sorted by date
3,116 results
«« first
« previous
page 72 / 104
next »
last »»
TIL
Using unnest() to use a comma-separated string as the input to an IN query
— [django-sql-dashboard](https://github.com/simonw/django-sql-dashboard) lets you define a SQL query plus one or more text inputs that the user can provide in order to execute the query.
TIL
Efficient bulk deletions in Django
— I needed to bulk-delete a large number of objects today. Django deletions are relatively inefficient by default, because Django implements its own version of cascading deletions and fires signals for each deleted object.
TIL
Language-specific indentation settings in VS Code
— When I'm working with Python I like four space indents, but for JavaScript or HTML I like two space indents.
TIL
Useful Markdown extensions in Python
— I wanted to render some markdown in Python but with the following extra features:
Release
datasette-publish-azure 0.1a0
— Publish Datasette instances to Azure Functions (in progress)
TIL
Writing an Azure Function that serves all traffic to a subdomain
— [Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/) default to serving traffic from a path like `/api/FunctionName` - for example `https://your-subdomain.azurewebsites.net/api/MyFunction`.
TIL
Redirecting all paths on a Vercel instance
— I wanted to redirect all traffic to `https://something.vercel.app/` to a different domain - preserving the path and the querystring and serving a 301 status code.
TIL
Closest locations to a point
— Here's a PostgreSQL SQL query that returns the closest locations to a point, based on a brute-force approach where the database calculates the distance (in miles) to every single row and then sorts by that distance.
TIL
Installing packages from Debian unstable in a Docker image based on stable
— For [Datasette #1249](https://github.com/simonw/datasette/issues/1249) I wanted to build a Docker image from the `python:3.9.2-slim-buster` base image ("buster" is the current stable release of Debian) but include a single package from "sid", the unstable Debian distribution.
TIL
Tracing every executed Python statement
— Today I learned how to use the Python [trace module](https://docs.python.org/3/library/trace.html) to output every single executed line of Python code in a program - useful for figuring out exactly when a crash or infinite loop happens.
TIL
Running gdb against a Python process in a running Docker container
— While investigating [Datasette issue #1268](https://github.com/simonw/datasette/issues/1268) I found myself with a Python process that was hanging, and I decided to try running `gdb` against it based on tips in [Debugging of CPython processes with gdb](https://www.podoliaka.org/2016/04/10/debugging-cpython-gdb/)
«« first
« previous
page 72 / 104
next »
last »»