This repository contains a collection of code snippets that can be easily copied and pasted into your projects. These snippets cover a wide range of programming languages and topics.
The idea is to keep it minimal, no dependencies when possible.
- Add Data Attributes to Select Option Widget
- Base Inline Formset Custom Attr Delete Button
- Check If Current View Is Django Admin Changelist
- Django Admin - Pretty Print (formatted / idented / no color) JSON (read-only)
- Django (postgres) ArrayField Multiple Choices as checkboxes
- Django Simple Auth Token Authorization
- Elasticsearch date range helpers (Django)
- Django Form Tweaks Mixin
- Reorder Django Choices
- Django URL Path Date Converter
- Docker bind mount ownership fix with setfacl
- Docker volume ownership matching with host UID/GID
- Docker volume permissions for a non-root user
- Docker volume ownership for a non-root user with gosu
- Docker volume permissions fix with a one-shot side container
- Docker healthchecks
- Extract Date From String And Classify
- Gunicorn Test RPS (Flask)
- PyMuPDF - Calculate how much height of a page is filled with content
- Copy envfiles to production "safely"
- Deploy and rollback project using Docker Compose with git tag-based versioning.
- Django Utils
- Enter Running Containers
- Postgres Utils
This is mostly for me, for now. But I may accept your pull request if I think it fits.
It may be worth checking out my other repositories:
They are similar to this one, but I'm not gonna update them anymore. I'll try to keep this one updated with new snippets.