TILs
Filters: Sorted by date
575 results
«« first
« previous
page 18 / 20
next »
last »»
TIL
Converting Airtable JSON for use with sqlite-utils using jq
— The Airtable API outputs JSON that looks like this:
TIL
Browsing your local git checkout of homebrew-core
— The [homebrew-core](https://github.com/Homebrew/homebrew-core) repository contains all of the default formulas for Homebrew.
TIL
Piping echo to a file owned by root using sudo and tee
— I wanted to create a file with a shell one-liner where the file lived somewhere owned by root.
TIL
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. GitHub has a whole load of custom extensions for things like tables and syntax highlighting (see [issue 17](https://github.com/simonw/til/issues/17)).
TIL
Skipping a GitHub Actions step without failing
— I wanted to have a GitHub Action step run that might fail, but if it failed the rest of the steps should still execute and the overall run should be treated as a success.
TIL
Creating a dynamic line chart with SVG
— I helped build the tide chart visualizations for [Rocky Beaches](https://www.rockybeaches.com/).
TIL
Providing a "subscribe in Google Calendar" link for an ics feed
— If you provide your own custom generated ICS file hosted at a URL it's nice to be able to give Google Calendar users an easy way to subscribe to that feed.
TIL
Dynamically loading multiple assets with a callback
— For [datasette-leaflet-geojson](https://github.com/simonw/datasette-leaflet-geojson) I wanted to dynamically load some external CSS and JavaScript and then execute some code once they had loaded ([issue 14](https://github.com/simonw/datasette-leaflet-geojson/issues/14)).
TIL
Outputting JSON with reduced floating point precision
— [datasette-leaflet-geojson](github.com/simonw/datasette-leaflet-geojson) outputs GeoJSON geometries in HTML pages in a way that can be picked up by JavaScript and used to plot a Leaflet map.
TIL
Working around the size limit for nodeValue in the DOM
— TIL that `nodeValue` in the DOM has a size limit!
TIL
Using grep to write tests in CI
— GitHub Actions workflows fail if any of the steps executes something that returns a non-zero exit code.
TIL
Programatically accessing Heroku PostgreSQL from GitHub Actions
— My [db-to-sqlite](https://github.com/simonw/db-to-sqlite) tool can connect to a PostgreSQL database, export all of the content and write it to a SQLite database file on disk.
TIL
Read the Docs Search API
— I stumbled across this API today: https://docs.datasette.io/_/api/v2/docsearch/?q=startup&project=datasette&version=stable&language=en
TIL
Code coverage using pytest and codecov.io
— I got my [asgi-csrf](https://github.com/simonw/asgi-csrf) Python package up to 100% code coverage. Here's [the pull request](https://github.com/simonw/asgi-csrf/issues/13).
TIL
Pointing a custom subdomain at Read the Docs
— I host the documentation for Datasette on [Read the Docs](https://readthedocs.org/). Until today it lived at https://datasette.readthedocs.io/ but today I moved it to a custom subdomain, https://docs.datasette.io/
TIL
How to call pip programatically from Python
— I needed this for the `datasette install` and `datasette uninstall` commands, see [issue #925](https://github.com/simonw/datasette/issues/925).
TIL
Packaging a Python CLI tool for Homebrew
— I finally figured out how to package [Datasette](https://github.com/simonw/datasette) for installation with Homebrew. My package was accepted into Homebrew core, which means you can now install it like this:
TIL
Attaching a bash shell to a running Docker container
— Use `docker ps` to find the container ID:
TIL
Enabling WAL mode for SQLite database files
— I was getting occasional `Error: database is locked` messages from a Datasette instance that was running against a bunch of different SQLite files that were updated by cron scripts (my personal [Dogsheep](https://dogsheep.github.io/)).
TIL
How to deploy a folder with a Dockerfile to Cloud Run
— I deployed https://metmusem.datasettes.com/ by creating a folder on my computer containing a Dockerfile and then shipping that folder up to Google Cloud Run.
TIL
PostgreSQL full-text search in the Django Admin
— Django 3.1 introduces PostgreSQL `search_type="websearch"` - which gives you search with advanced operators like `"phrase search" -excluding`. James Turk [wrote about this here](https://jamesturk.net/posts/websearch-in-django-31/), and it's also in [my weeknotes](https://simonwillison.net/2020/Jul/23/datasette-copyable-datasette-insert-api/).
TIL
Implementing a "copy to clipboard" button
— I had to figure this out while building [datasette-copyable](https://github.com/simonw/datasette-copyable/) - demo [here](https://covid-19.datasettes.com/covid/ny_times_us_counties.copyable?state=Texas&county=Harris).
TIL
Updating a Markdown table of contents with a GitHub Action
— [markdown-toc](https://github.com/jonschlinkert/markdown-toc) is a Node script that parses a Markdown file and generates a table of contents for it, based on the headings.
TIL
Registering temporary pluggy plugins inside tests
— While implementing more finely-grained permissions for `datasette-insert-api` ([issue 8](https://github.com/simonw/datasette-insert-api/issues/8)) I decided I wanted to register a Datasette pluggy plugin for the duration of a single test.
TIL
Upgrading a Heroku PostgreSQL database with pg:copy
— Figured this out in https://github.com/simonw/simonwillisonblog/issues/132 - I was running PostgreSQL 9.x and I wanted 11.x in order to use the new `search_type="websearch"` option in Django 3.1.
TIL
Password hashing in Python with pbkdf2
— I was researching password hashing for [datasette-auth-passwords](https://github.com/simonw/datasette-auth-passwords). I wanted very secure defaults that would work using the Python standard library without any extra dependencies.
TIL
Using heroku pg:pull to restore a backup to a macOS laptop
— Today I worked out how to use the Heroku `pg:pull` command and [Postgres.app](https://postgresapp.com/) to pull a Heroku backup to my laptop.
«« first
« previous
page 18 / 20
next »
last »»