Skip to content

Instantly share code, notes, and snippets.

Dev and Debugging Tools

Python

The debugger is called pdb:

python -m pdb myscript.py

Read more here

Sphinx

Check installation:

$ python -c 'import sphinx; print sphinx.__version__'

Follow the installation instructions, install by:

$ easy_install -U Sphinx

Deploy Django

Gunicorn

The Gunicorn "Green Unicorn" is a Python Web Server Gateway Interface (WSGI) HTTP server. Recommended to use with nginx.

Check version

gunicorn -v

Chrome

Stop redirect from http to https

  1. Delete domain security policies chrome://net-internals/#hsts Enter domain name under "Delete domain security policies" and press the Delete button.
  2. Clear browsing data Settings > Show advanced settings… > Privacy > Clear browsing data https://superuser.com/q/565409/273113

stop redirect from http to https

chrome://net-internals/#hsts

PostgreSQL commands

sudo -u postgres psql

help

\?

list database

Tmux

Ctrl+b = C-b

Ctrl+b " = Ctrl+b release, then press shift + '.

Splite pane

Ctrl+b " — split pane vertically.

@miranda-zhang
miranda-zhang / windows_tips.md
Last active April 2, 2019 05:24
handy tips for windows

Windows Tips

Copy both the path and the file name to the clipboard

Shift key down and then right-click the file name, choose "copy as path".

Settings

Windows Key + i

Apache Web Server

Ubuntu

apt-get install apache2

Suppress warning message Could not reliably determine the server's fully qualified domain name

Add at the bottom of /etc/apache2/apache2.conf