Skip to content

Instantly share code, notes, and snippets.

View YaroLuck's full-sized avatar
🎯
Focusing

Iaroslav YaroLuck

🎯
Focusing
View GitHub Profile

Seafile + Docker + Caddy Reverse Proxy on a debian/ubuntu VPS

Seafile is a great alternative to Dropbox, Google Drive or Nextcloud for sharing files either with your own devices or 3rd parties.

Prerequisites:

Your VPS should already have the minimal configuration including

  • ssh with PubPriv Keys
@YaroLuck
YaroLuck / drf_utils.py
Created June 26, 2024 06:39 — forked from twidi/drf_utils.py
Make Django Rest Framework correctly handle Django ValidationError raised in the save method of a model
"""
Sometimes in your Django model you want to raise a ``ValidationError`` in the ``save`` method, for
some reason.
This exception is not managed by Django Rest Framework because it occurs after its validation
process. So at the end, you'll have a 500.
Correcting this is as simple as overriding the exception handler, by converting the Django
``ValidationError`` to a DRF one.
"""
from django.core.exceptions import ValidationError as DjangoValidationError
@YaroLuck
YaroLuck / csharp.gitignore
Created September 12, 2019 22:46 — forked from takekazuomi/csharp.gitignore
.gitignore for C#
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results