This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
#! /bin/sh | |
echo "Purging pyc files and empty directories..." | |
# Start from the repository root. | |
cd ./$(git rev-parse --show-cdup) | |
# Delete .pyc files and empty directories. | |
find . -name "*.pyc" -delete 2>&1 > /dev/null & | |
find . -type d -empty -delete 2>&1 > /dev/null & |
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
#!/usr/bin/env bash | |
C="0" # count | |
while [ $C -lt 20 ] | |
do | |
case "$(($C % 4))" in | |
0) char="/" | |
;; | |
1) char="-" | |
;; |
# Functions to activate/deactivate Continuum Analytics Anaconda Python distribution | |
# by manipulating the $PATH. | |
export ANACONDA_PATH="$HOME/anaconda/bin" | |
function have_anaconda(){ | |
[[ -n $path[(r)$ANACONDA_PATH] ]] | |
} | |
function anaconda_on(){ | |
if have_anaconda ; then |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
#!/bin/bash | |
# An enhancement to the "python" executable that automatically launches you into the python debugger on error. | |
# | |
# Use it like you would the "python" executable, for example: | |
# $ trypy somefile.py | |
# or | |
# $ trypy somefile.py arg1 arg2 | |
# | |
# EXAMPLE: |
var gulp = require('gulp') | |
var shell = require('gulp-shell') | |
gulp.task('build-docs', shell.task('make html', {cwd: './docs'})) | |
gulp.task('docs', ['build-docs'], function() { | |
gulp.watch(['./docs/*.rst', './docs/*.py'], ['build-docs']) | |
}) |