Skip to content

Instantly share code, notes, and snippets.

View minlaxz's full-sized avatar
:octocat:
👻

Min Min Latt minlaxz

:octocat:
👻
View GitHub Profile
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------
@minlaxz
minlaxz / docker-compose.advanced.yml
Created August 16, 2022 05:04 — forked from w33ble/docker-compose.advanced.yml
Using jwilder/nginx-proxy with multiple compose files
version: '3'
services:
nginx-proxy:
image: nginx:alpine
container_name: proxy-nginx
environment:
- DEFAULT_HOST=hello.local
ports:
- 80:80
@minlaxz
minlaxz / middleware.py
Created October 7, 2022 08:01 — forked from rbtsolis/middleware.py
Django Access the Request or User Object Inside the Models and Signals
# 1) Create a middlewares/middlewares.py file and copy this:
import threading
class RequestMiddleware:
def __init__(self, get_response, thread_local=threading.local()):
self.get_response = get_response
self.thread_local = thread_local
# One-time configuration and initialization.
@minlaxz
minlaxz / rules.txt
Last active February 13, 2026 04:07
Routing rules.
dify.ai
wikileaks.org
clawhub.ai
nextdns.io
tailscale.com
akamaitechnologies.com
ngrok.com
openclaw.ai
mintcdn.com
firecrawl.dev
@minlaxz
minlaxz / my-rules.json
Last active February 20, 2026 03:46
My sing-box Routing Rules
{
"version": 3,
"rules": [
{
"domain_suffix": [
".dify.ai",
".wikileaks.org",
".clawhub.ai",
".nextdns.io",
".tailscale.com",