Unix timestamp in milliseconds in SQLite
I wanted to retrieve the time in milliseconds since the Unix epoch in SQLite.
548 words
|
3 minutes
DevSecOps Introduction and Principles
Day 61 of 90 Days of DevOps - DevSecOps Introduction and Principles. Part of the Security & Compliance series covering essential DevOps concepts and hands-on practices.
566 words
|
3 minutes
Snapshot testing with Syrupy
I'm a big fan of snapshot testing - writing tests where you compare the output of some function to a previously saved version, and can re-generate ...
697 words
|
3 minutes
Using LD_PRELOAD to run any version of SQLite with Python
I've been wanting to figure this out for ages. [This thread](https://news.ycombinator.com/item?id=23282684) on Hacker News plus [this Stackoverflow...
793 words
|
4 minutes
Observability Best Practices
Day 60 of 90 Days of DevOps - Observability Best Practices. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
544 words
|
3 minutes
Running pip install '.[docs]' on ReadTheDocs
I decided to use ReadTheDocs for my in-development [datasette-enrichments](https://github.com/datasette/datasette-enrichments) project.
160 words
|
1 minute
Set a GIF to loop using ImageMagick
I managed to accidentally create a GIF that ran once without looping. I think this is because I created it in [LICEcap](https://www.cockos.com/lice...
91 words
|
1 minute
Running pip install -e .[test] in zsh on macOS Catalina
macOS Catalina uses `zsh` rather than `bash` as the default shell (apparently because Apple don't like GPL 3).
108 words
|
1 minute
Chaos Engineering and Resilience
Day 59 of 90 Days of DevOps - Chaos Engineering and Resilience. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
679 words
|
3 minutes
Convert a datetime object to UTC without using pytz
I wanted to convert a datetime object (from GitPython) to UTC without adding the `pytz` dependency.
66 words
|
1 minute
Adding extra read-only information to a Django admin change page
I figured out this pattern today for adding templated extra blocks of information to the Django admin change page for an object.
164 words
|
1 minute
SRE Principles and Error Budgets
Day 58 of 90 Days of DevOps - SRE Principles and Error Budgets. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
1093 words
|
5 minutes
KNN queries with SpatiaLite
The latest version of SpatiaLite adds KNN support, which makes it easy to efficiently answer the question "what are the X closest records to this p...
197 words
|
1 minute
Alerting and Incident Management
Day 57 of 90 Days of DevOps - Alerting and Incident Management. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
512 words
|
3 minutes
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/sim...
371 words
|
2 minutes
Distributed Tracing with OpenTelemetry
Day 56 of 90 Days of DevOps - Distributed Tracing with OpenTelemetry. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
517 words
|
3 minutes
Build the official Python documentation locally
First, checkout the cpython repo:
148 words
|
1 minute
Explicit file encodings using click.File
I wanted to add a `--encoding` option to `sqlite-utils insert` which could be used to change the file encoding used to read the incoming CSV or TSV...
182 words
|
1 minute
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 ...
177 words
|
1 minute
Application Performance Monitoring
Day 55 of 90 Days of DevOps - Application Performance Monitoring. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
608 words
|
3 minutes
ELK Stack for Log Management
Day 54 of 90 Days of DevOps - ELK Stack for Log Management. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
426 words
|
2 minutes
Skipping CSV rows with odd numbers of quotes using ripgrep
I'm working with several huge CSV files - over 5 million rows total - and I ran into a problem: it turned out there were a few lines in those files...
420 words
|
2 minutes
Grafana Dashboards and Visualization
Day 53 of 90 Days of DevOps - Grafana Dashboards and Visualization. Part of the Monitoring & Observability series covering essential DevOps concepts and hands-on practices.
435 words
|
2 minutes
Custom Jinja template tags with attributes
I decided to implement a custom Jinja template block tag for my [datasette-render-markdown](https://datasette.io/plugins/datasette-render-markdown)...
930 words
|
5 minutes