Skip to content

Instantly share code, notes, and snippets.

View Yukilas's full-sized avatar

William Meunier Yukilas

  • Ardeche, France
View GitHub Profile
@Yukilas
Yukilas / run.py
Created October 31, 2012 15:49
[Django, Gevent, SocketIO] Run script to automatically restart Gunicorn when a change is made on a python file
#!/usr/bin/env python
# -*- coding:Utf-8 -*-
import os
import shlex
import subprocess
import sys
import time
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
@Yukilas
Yukilas / directive.js
Created October 30, 2012 09:42
AngularJS - Button loading directive
/*
``btn-loading`` attribute.
This attribute will update the button state using Twitter Bootstrap button plugin and
according the attribute value.
The attribute value should be a scope variable.
If the variable is ``true`` the button will have the ``loading`` state.
If the variable is ``false`` the button will be reset and displayed normaly.
@Yukilas
Yukilas / gist:973246
Created May 15, 2011 15:33
Django Fixture - Loaddata
python manage.py loaddata myFixture
@Yukilas
Yukilas / gist:973235
Created May 15, 2011 15:22
Django Fixture - Dumpdata
python manage.py dumpdata blog --indent=4 > blog/fixtures/myFixture.json