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:
#!/usr/bin/env python | |
""" | |
ignore_moves.py v0.2 | |
Filter relocated lines from a unified diff format stream. | |
Offered under the terms of the MIT License at github.com | |
Taken from http://stackoverflow.com/questions/1380333/ | |
""" | |
import sys | |
from optparse import OptionParser |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt | |
index 2e58c854e..2220cfb2c 100644 | |
--- a/runtime/doc/eval.txt | |
+++ b/runtime/doc/eval.txt | |
@@ -9485,6 +9485,7 @@ multi_byte Compiled with support for 'encoding' | |
multi_byte_encoding 'encoding' is set to a multi-byte encoding. | |
multi_byte_ime Compiled with support for IME input method. | |
multi_lang Compiled with support for multiple languages. | |
+multi_statusline Compiled with 'statuslineheight' support. | |
mzscheme Compiled with MzScheme interface |mzscheme|. |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)#!/usr/bin/env python | |
""" | |
Provide useful alembic information after switching branches. | |
""" | |
import argparse | |
import subprocess | |
import os | |
import os.path | |
import py.path |