This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am espenak on github. | |
* I am espenak (https://keybase.io/espenak) on keybase. | |
* I have a public key ASAWRllh4Tcu8s0cWzq-AEYdpqE2KKjL2zQex9wpX8gn6Qo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define debug_params(params, length) \ | |
{ \ | |
int i; \ | |
fprintf(stderr, "*********** Debug for param vector ************\n"); \ | |
for(i = 0;i<length;i++){ \ | |
if(params[i] != NULL){ \ | |
fprintf(stderr, "DEBUG: "); \ | |
fprintf(stderr, params[i], NULL); \ | |
fprintf(stderr, "\n"); \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" author: Espen Angell Kristiansen <post@espenak.net> | |
python << EOF | |
import vim | |
import os.path | |
import sys | |
class DjangoOpen(object): | |
def __init__(self): | |
self.filepath = os.path.abspath(os.path.normpath(vim.current.buffer.name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allnodes = Node.where_is_admin_or_superadmin(self.request.user) | |
try: | |
specificnode = allnodes.get(id=nodeid) | |
except Node.DoesNotExist: | |
# respond with 403 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parseTextToPairList: function(rawValue) { | |
var asArray = rawValue.split('\n'); | |
var resultArray = []; | |
var me = this; | |
Ext.Array.each(asArray, function(line) { | |
line = Ext.String.trim(line); | |
var split = line.split(/\s*:\s*/, 2); | |
resultArray.push(split); | |
}); | |
return resultArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.contrib.auth.models import User | |
from devilry.apps.core.models import Delivery, Assignment | |
class Config(models.Model): | |
""" | |
Stored by admins. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.contrib.auth.models import User | |
from devilry.apps.core.models import Delivery, Assignment | |
class Config(models.Model): | |
assignment = models.OneToOne(Assignment) | |
config = models.TextField() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Tools for sending email. | |
""" | |
from django.conf import settings | |
from django.core.exceptions import ImproperlyConfigured | |
from django.utils.importlib import import_module | |
# Imported for backwards compatibility, and for the sake | |
# of a cleaner namespace. These symbols used to be in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DJANGO_SETTINGS_MODULE=devilry.cfg.prod6 | |
export PYTHONPATH=/devilry/lib/django/:$PYTHONPATH | |
export PYTHONPATH=/devilry/lib/devilry-django:$PYTHONPATH | |
export PATH=/devilry/lib/devilry-django/adminscripts/bin:$PATH | |
export PATH=/devilry/lib/django/django/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hei(): | |
pass |
NewerOlder