Skip to content

Instantly share code, notes, and snippets.

View mohamadbr32's full-sized avatar
๐Ÿš€
Always improving

Belkahla Mohamed Rachid mohamadbr32

๐Ÿš€
Always improving
View GitHub Profile
@hanjong
hanjong / my.ini
Created September 9, 2011 00:36
my.ini for mySQL
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
@rluts
rluts / token_auth.py
Last active April 10, 2025 16:38
Token authorization middleware for Django Channels 2
from channels.auth import AuthMiddlewareStack
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import AnonymousUser
from django.db import close_old_connections
class TokenAuthMiddleware:
"""
Token authorization middleware for Django Channels 2
"""