Skip to content

Instantly share code, notes, and snippets.

View titouanc's full-sized avatar

iTitou titouanc

  • Belgium
View GitHub Profile
@alexellis
alexellis / k8s-pi.md
Last active December 13, 2024 23:24
K8s on Raspbian
@bendavis78
bendavis78 / seed_pagination.py
Last active January 28, 2025 01:48
Example implementation of randomized pagination in django and django-rest-framework
"""
Adds a `seed` paramter to DRF's `next` and `prev` pagination urls
"""
from rest_framework import serializers
from rest_framework import pagination
from rest_framework.templatetags.rest_framework import replace_query_param
from . import utils
@fxsjy
fxsjy / SimpleAuthServer.py
Created April 26, 2013 06:23
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):