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
try: | |
from functools import wraps | |
except ImportError: | |
from django.utils.functional import wraps # Python 2.4 fallback. | |
from django.conf import settings | |
from django.contrib.auth.decorators import login_required | |
from django.http import HttpResponse | |
from django.middleware import csrf | |
from django.utils.decorators import available_attrs |
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 phoenix.views.api.communication.template.standard import standard_view | |
__all__ = ('list_view',) | |
@json_login_required(allowed_methods=('GET', 'HEAD')) | |
def list_view(request, section='id', id=None): | |
return standard_view(request, section=section, id=id) |
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 | |
import argparse | |
import bson | |
import datetime | |
import struct | |
import sys | |
INDENT_SPACES = ' ' | |
def read_bson_file(file, as_class=dict, tz_aware=True, uuid_subtype=bson.OLD_UUID_SUBTYPE): |
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 | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
import StringIO | |
import argparse | |
import logging | |
import os | |
import random | |
import sys | |
import urllib2 |
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
var standardSettings = { | |
'imageGetJson': '/api/v1/json/upload/images/list/@@company_id@@/?t=redactor', | |
'imageUpload': '/api/v1/json/upload/images/company/@@company_id@@/', | |
'source': false, | |
'css': '/static/survey/take/css/survey.css', | |
'minHeight': 100, | |
'buttons': [ | |
'html', '|', 'formatting', '|', 'bold', 'italic', 'underline', '|', | |
'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', | |
'image', 'table', 'link', '|', |
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
PS1="\e[01;33m# \e[01;36m\D{%Y-%m-%d %R %Z} \e[00;31m\u\e[01;32m@\e[00;31m\H \e[01;33m\w :\e[00m\n" | |
export PS1 |
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 ngBindOutToAttribute(element, attributes, attribName, scope, scopeSource, initialize) { | |
var elementScope = element.scope(), | |
attribField = attributes[attribName], | |
valGetter = $parse(attributes[attribName]), | |
valSetter = valGetter.assign, | |
scopeGetter = $parse(scopeSource), | |
scopeSetter = scopeGetter.assign; | |
if(angular.isUndefined(scopeGetter(scope) && (angular.isUndefined(initialize) || initialize === true))) { | |
scopeSetter(scope, valGetter(elementScope)); | |
} |