Skip to content

Instantly share code, notes, and snippets.

View leewardbound's full-sized avatar

Leeward Bound leewardbound

View GitHub Profile
@ibc
ibc / Chrome.sh
Last active February 26, 2024 17:52
WebRTC debugging
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*/libjingle/*=2,*=-2 --enable-logging=stderr
// Easier:
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*=-2 --enable-logging=stderr
@beniwohli
beniwohli / models.py
Created September 13, 2012 09:11
Combine hvad and mptt
from project.utils import classmaker
class Category(TranslatableModel, MPTTModel):
# https://github.com/ojii/django-nani/issues/39
__metaclass__ = classmaker()
# modified version of http://tomforb.es/using-python-metaclasses-to-make-awesome-django-model-field-choices
# that preserves order of definition
import inspect, itertools
class Option(object):
_counter = itertools.count()
def __init__(self, value, verbose_name=None):
self._count = Option._counter.next()