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
Django==1.3.1 | |
django-celery==2.3.3 | |
django-kombu==0.9.4 |
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
Django==1.3.1 | |
django-celery==2.3.3 | |
redis==2.4.9 | |
celerymon |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>ChildrenArray</key> | |
<array> | |
<dict> | |
<key>AudioList</key> | |
<array> |
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.core.management.base import BaseCommand, CommandError | |
from django.conf import settings | |
class Command (BaseCommand): | |
#args = '<poll_id poll_id ...>' | |
#help = HELP | |
def handle(self, *args, **options): | |
for s in dir(settings): | |
print s, ':', getattr(settings, s) |
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 sorl.thumbnail.images import ImageFile | |
from sorl.thumbnail import default | |
from sorl.thumbnail.conf import settings, defaults as default_settings | |
def cached_thumbnail (photo, geometry, **options): | |
source = ImageFile(photo) | |
for key, value in default.backend.default_options.iteritems(): | |
options.setdefault(key, value) | |
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
class EventAdmin(admin.ModelAdmin): | |
def get_form(self, request, obj=None, **kwargs): | |
if request.user.is_superuser: | |
return EventAdminForm | |
else: | |
return EventForm |
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
function downloadGDriveFile (file) { | |
if (file.downloadUrl) { | |
var accessToken = gapi.auth.getToken().access_token; | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', file.downloadUrl); | |
xhr.setRequestHeader('Authorization', 'Bearer ' + accessToken); | |
xhr.onload = function() { | |
var content = xhr.responseText; | |
do_something_with_file_content(file.title, content); | |
}; |
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
// .for | |
.for(@i, @n) {.-each(@i)} | |
.for(@n) when (isnumber(@n)) {.for(1, @n)} | |
.for(@i, @n) when not (@i = @n) { | |
.for((@i + (@n - @i) / abs(@n - @i)), @n); | |
} | |
// .for-each | |
.for(@array) when (default()) {.for-impl_(length(@array))} | |
.for-impl_(@i) when (@i > 1) {.for-impl_((@i - 1))} |
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
#!/usr/bin/env python | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
OlderNewer