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
#coding=utf-8 | |
from django.contrib.auth.decorators import login_required | |
from django.contrib import messages | |
from django.db.models import Q | |
from django.http import HttpResponseRedirect, HttpResponse | |
from django.shortcuts import get_object_or_404 | |
from django.utils.translation import ugettext as _ | |
from faq.models import FAQ, FAQGroup | |
from itertools import groupby | |
from utkik import View |
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
coding=utf-8 | |
from django import http | |
from django.db.models import Q | |
from django.contrib import messages | |
from django.utils.translation import ugettext as _ | |
from cbv import TemplateView | |
from faq.models import FAQ, FAQGroup | |
from itertools import groupby | |
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
# management command | |
from django.contrib.staticfiles.management.commands.runserver import Command as StaticFilesCommand | |
from django.contrib.staticfiles.handlers import StaticFilesHandler | |
from nimda.globals import _local_manager | |
class Command(StaticFilesCommand): | |
def get_handler(self, *args, **options): | |
handler = super(Command, self).get_handler(*args, **options) | |
handler = _local_manager.make_middleware(handler) | |
return handler |
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
# management command | |
from django.contrib.staticfiles.management.commands.runserver import Command as StaticFilesCommand | |
from django.contrib.staticfiles.handlers import StaticFilesHandler | |
from nimda.globals import _local_manager | |
class Command(StaticFilesCommand): | |
def get_handler(self, *args, **options): | |
handler = super(Command, self).get_handler(*args, **options) | |
handler = _local_manager.make_middleware(handler) | |
return handler |
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
#coding=utf-8 | |
__test__ = { | |
"api_v1": """ | |
Upp! API version 1 | |
================== | |
Testing the functionality of Upp! API | |
>>> from django.utils import simplejson as json | |
>>> from django.test.client import Client |
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
#coding=utf-8 | |
__test__ = { | |
"api_v1": """ | |
Upp! API version 1 | |
================== | |
Testing the functionality of Upp! API | |
>>> from django.utils import simplejson as json | |
>>> from django.test.client import Client |
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
#include <iostream> | |
#include <string> | |
#include <libgen.h> | |
#include <Magick++.h> | |
using namespace std; | |
using namespace Magick; | |
string out( string fn, string sz ) { |
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 assets = require('./assets.json') | |
, path = require('path') | |
var baseDir = __dirname | |
var Component = function(opts) { | |
var self = this | |
self.name = opts.name | |
self.src = path.join(baseDir, opts.src) |
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
import re | |
from django.http import HttpResponse | |
from django.shortcuts import render | |
from functools import wraps | |
uncamel_patterns = ( | |
re.compile('(.)([A-Z][a-z]+)'), | |
re.compile('([a-z0-9])([A-Z])'), | |
) |
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
execute pathogen#infect() | |
if has('gui_running') | |
let s:uname = system("uname -s") | |
if s:uname == "Darwin\n" | |
set guifont=consolas:h15 | |
let g:latex_view_general_viewer = '/Applications/Skim.app/Contents/MacOS/Skim' | |
else | |
set guifont=Consolas\ 13 | |
endif |
OlderNewer