Skip to content

Instantly share code, notes, and snippets.

View BisasterBoy32's full-sized avatar
🏠
Working from home

Belkahla Mohamed Rachid BisasterBoy32

🏠
Working from home
View GitHub Profile
@rluts
rluts / token_auth.py
Last active July 4, 2024 13:23
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
"""
@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