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
#!/bin/sh | |
# Basically just runs vim commands as ":execute normal", saves the file, and quits for each file in a loop | |
vimdo() { | |
local CMD=$1 | |
shift | |
for f | |
do | |
vim -N -u NONE -n -c "set nomore" -c ":execute \"norm! $CMD\"" -cwq! $f |
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
;[program:theprogramname] | |
;command=/bin/cat ; the program (relative uses PATH, can take args) | |
;process_name=%(program_name)s ; process_name expr (default %(program_name)s) | |
;numprocs=1 ; number of processes copies to start (def 1) | |
;directory=/tmp ; directory to cwd to before exec (def no cwd) | |
;umask=022 ; umask for process (default None) | |
;priority=999 ; the relative start priority (default 999) | |
;autostart=true ; start at supervisord start (default: true) | |
;autorestart=true ; retstart at unexpected quit (default: true) | |
;startsecs=10 ; number of secs prog must stay running (def. 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
from django import http | |
from django.conf import settings | |
ALL_ORIGINS = ['*', ] | |
ALL_METHODS = ['POST', 'GET', 'OPTIONS', 'PUT', 'DELETE'] | |
ALL_HEADERS = ['Content-Type', '*'] | |
ALLOWED_CREDENTIALS = 'true' | |
DEFAULT_XS_SHARING = getattr(settings, 'DEFAULT_XS_SHARING', None) |
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
""" | |
Contains the middleware class implementation for the ResponseException | |
""" | |
class ResponseException(Exception): | |
def __init__(self, response): | |
super(Exception, self).__init__() | |
self.response = response | |
class ResponseExceptionMiddleware(object): |