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:
find . -name '*.gif' -print0 | xargs -0 rm -f |
var cluster = require('cluster'); | |
var http = require('http'); | |
var numCPUs = require('os').cpus().length; | |
if (cluster.isMaster) { | |
// Fork workers. | |
for (var i = 0; i < numCPUs; i++) { | |
cluster.fork(); | |
} | |
cluster.on('exit', function(worker, code, signal) { |
# -*- coding: utf-8 -*- | |
""" | |
LICENSE: BSD (same as pandas) | |
example use of pandas with oracle mysql postgresql sqlite | |
- updated 9/18/2012 with better column name handling; couple of bug fixes. | |
- used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle. | |
to do: | |
save/restore index (how to check table existence? just do select count(*)?), | |
finish odbc, |
django-debug-toolbar==0.9.4 | |
django-data-tools==0.1 | |
django-devserver==0.3 | |
nashvegas==0.8-disqus-6 | |
Sphinx>=1.0.7 | |
piplint==0.1.1 | |
amqplib==1.0.2 | |
anyjson==0.3.1 | |
argparse==1.1 |
package turl | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"strings" | |
"errors" |
package core | |
import ( | |
"bytes" | |
"fmt" | |
"html/template" | |
"io/ioutil" | |
"net/http" | |
"os" | |
"path/filepath" |
#!/bin/bash | |
# License: Public Domain. | |
# Author: Joseph Wecker, 2012 | |
# | |
# -- DEPRICATED -- | |
# This gist is slow and is missing .bashrc_once | |
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch | |
# (Thanks gioele) | |
# | |
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? |
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
package main | |
import ( | |
"fmt" | |
"golang.org/x/crypto/ssh" | |
) | |
const privateKey = `content of id_rsa` |
#!/bin/bash | |
go test -c | |
PKG=$(basename $(pwd)) | |
set -e | |
while true ; do | |
export GOMAXPROCS=$[ 1 + $[ RANDOM % 128 ]] | |
./$PKG.test $@ 2>&1 | |
done |