My repo of Today I Learned posts. Inspired by simonw/til.
Now: July 2024: At some point this month, I set a goal to write a TIL every work day. I haven't stuck to that, but I am averaging several per week, and I'm pleased with the cadence. But even trying to post every day, I am still not capturing everything I've learned.
Since this repo has a few stars ⭐ (hi everyone), I want to take a moment to set expectations.
- I write TILs quickly, usually in under 10 minutes.
- Usually, there isn't any editing other than light proofreading.
- I really enjoy it! Highly recommend a public TIL repo as a personal practice.
- Sometimes I share them on Mastodon, but not always.
- It's good, low-stakes writing practice.
- It helps remind me that beginnerhood is perpetual.
- I have a few of my own TILs that I consult really regularly. Nothing beats copying and pasting your own stuff forever.
- Sometimes, the TILs get picked up by Django News, and that's neat!
- Other people are aware of what I am working on, and then ask for help related to those things. Feels great to help people.
- It provides a neat fossil record of the kinds of things I've worked on over the course of my career.
- I have a repo full of markdown that's easy to clone and run parsing experiments on.
- aws
- celery
- django
- django-rest-framework
- drf-yasg
- fast-ai
- git
- github
- home-office
- html
- htmx
- javascript
- kubernetes
- mac
- markdown
- meilisearch
- microsoft-dynamics
- misc
- mkdocs
- plata
- postgres
- pre-commit
- pytest
- python
- r
- slack
- sphinx
- stripe
- terraform
- wagtail
- AWS S3 and Boto3 Cheat Sheet - 2024-03-18
- Scheduling a nightly Celery task with Celery Beat - 2024-05-08
- Adding a custom context processor to your Django app so you can include bits of data in your template headers more easily - 2024-05-29
- Adding a custom field to the Django admin list display - 2024-03-18
- Adding a custom tag with
django-taggit
- 2022-11-09 - Adding ability to search in the Django Admin - 2024-03-18
- Adding extra fields to the list view in the Django Admin - 2024-03-18
- Adding filtering functionality to the Django Admin - 2024-03-18
- Caching in Django Projects - 2023-04-19
- Finding out how many objects have N connections to the other model in a M2M relationship - 2024-02-28
- Finding the longest value of a particular field - 2024-02-28
- Handling 404 Responses in Django - 2023-04-19
- How I added a very simple django-streamfield example to a project - 2024-03-18
- How I set up
django-activity-stream
, including a simple test - 2024-03-25 - How to confirm that login is required in your Django view - 2023-02-22
- How to log in a test user in a
pytest
unit test - 2023-02-22 - How to test a file upload with
pytest
andSimpleUploadedFile
- 2023-02-22 - Neapolitan: Everything I've Learned - 2024-08-01
- Run SQL statements as part of your migrations with
migrations.RunSQL
- 2024-07-23 - Testing Django signals, and disabling signals in tests (Django 2.2) - 2020-07-27
- Using
Coalesce
to provide a default value foraggregate
queries - 2021-02-18 - Using
defer()
to limit the data you get from your models - 2022-10-19 - Using
django-admin-env-notice
to add an envioronment notice to the frontend - 2024-06-20 - Using
django-countries
- 2024-04-02 - Using
iterator()
to loop through large querysets efficiently - 2024-07-10 - Using Django Aggregation - 2021-01-22
- Using Enums in a Django Model ChoiceField (Django 2.2) - 2020-05-26
- Using inline formsets with
inlineformset_factory
- 2024-06-03 - Why won't my Django file URLs come back signed from S3? - 2021-01-08
- Adding a custom pagination class to an action - 2022-10-25
- Passing extra info in
context
to your DRF serializer - 2021-01-22
- How to document your query parameters for
drf_yasg
- 2021-01-28 - How to properly serialize a
serializer_method_field
withdrf_yasg
- 2021-01-28 - How to serialize your request parameters for POST/PUT/PATCH requests - 2021-01-28
git reset
, withsoft
: Undo your last commit but keep your changes - 2024-07-29- Checking out someone else's branch - 2024-08-23
- Moving from an old repo to a new repo in another organization - 2024-05-13
- Naming a
git stash
and re-applying it later - 2024-10-17
- Commenting on an issue from a GitHub Action - 2022-11-04
- Creating a new file and committing it using a GitHub Action - 2022-11-04
- Github Action that leaves a comment on new PRs or issues - 2022-10-28
- How to use a Github Action - 2020-05-26
- Making one job in a workflow depend on another job - 2022-11-04
- Parsing JSON output from a GitHub Issue template in a GitHub Action - 2022-11-04
- Running an action conditionally - 2022-11-04
- Running your tests with
pytest
in your PR via a GitHub Action - 2024-07-24 - Setting output for a step in a job, so a different job can use it - 2022-11-04
- Temporarily disabling a GitHub action without touching the workflow file - 2022-11-07
- Using Google Cloud Service Accounts and authenticating as a dictionary (without the json file) in a Django project - 2024-03-01
- Creating responsive images with
srcset
,sizes
, and<picture>
- 2024-06-05 - Stop search engines from indexing your site and showing it in search results - 2024-06-12
- Making a simple
hx-get
request - 2024-05-16 - Updating other elements on the page with
hx-swap-oob
- 2024-06-03
- Accessing a Kubernetes cluster for the first time - 2024-05-14
- Setting up Kubernetes access on MacOS with a config file - 2024-05-14
- Viewing logs for your pod - 2024-07-30
- Making a collapsible markdown section - 2022-11-05
- Securing Meilisearch with Docker for local Django development - 2024-04-04
- Securing the Meilisearch search itself - 2024-04-05
- Setting up Meilisearch with Python, Docker, and Compose for local development - 2024-04-04
- About Microsoft Dynamics - 2024-05-29
- Relume Design League - competitive web design - 2022-11-05
- [
plata
order processors](https://github.com/williln/til/blob/main/plata/processors.md) - 2024-10-01
- Setting up
pre-commit
in a new project - 2024-06-28
- Test that an exception is raised - 2023-03-02
- ChatGPT-4 distills the Python
mailbox
docs for me. - 2023-04-24 - Create a new Python virtual environment - 2022-10-14
- Generate a markdown file with a table of contents in Python - 2022-10-28
- Generating a clickable table-of-contents for each directory in my TILs - 2024-06-03
- How to sort a Python dictionary by key or value - 2021-02-02
- How to sort a Python dictionary by multiple values - 2021-02-02
- Using
Decimal.quantize
- 2024-07-05 - Using
pip-tools
andpip-compile
for Python dependency management - 2024-07-17
taylor
: The Taylor Swift / R Project - 2023-04-21- How to convert an
.rda
file to JSON - 2023-04-21
- Running Sphinx docs locally - 2024-07-15
dj-stripe
contains models for all the Stripe objects and can sync them for you - 2024-07-18- Creating a PaymentIntent, but not capturing it, and allowing more to be charged later - 2024-06-10
- Generating a
PaymentIntent
and saving it to a Django model - 2024-06-06 - Receiving Stripe webhooks via
dj-stripe
in local dev - 2024-07-19 - Setting up a webhook in local development (Django project) - 2024-07-11
- Using off-session payments and
setup_future_usage
- 2024-06-06
- About Terraform and .tfvars files - 2024-07-15
- Add Wagtail to an existing Django project - 2024-02-26
- Adding a Wagtail image programmatically - 2024-07-01
- Cheat Sheet for Wagtail StreamField - 2024-02-26
- Cheat Sheet: Wagtail Page Model Fields - 2024-02-26
- Choosing Between Wagtail Page Models and Django Models - 2024-02-26
- Create a Custom Nested Block for Wagtail StreamField - 2024-02-26
- Creating Custom StreamField Blocks - 2024-02-26
- Creating Wagtail pages with Streamfield content programmatically - 2024-05-15
- Example of linking Django models to Wagtail Page models - 2024-02-26
- Seeding my Wagtail site - 2024-03-27
- What to do if you delete the default Wagtail homepage - 2024-03-25