Skip to content

Instantly share code, notes, and snippets.

Sphinx

Check installation:

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

Follow the installation instructions, install by:

$ easy_install -U Sphinx

Editor Cheatsheet

Vim

https://coderwall.com/p/adv71w/basic-vim-commands-for-getting-started

Press i for insert mode

The ex mode is an extension of command mode. To get into it, press Esc and then : (the colon). The cursor will go to the bottom of the screen at a colon prompt. Write your file by entering :w and quit by entering :q. You can combine these to save and exit by entering :wq. However, if you're finished with your file, it's generally more convenient to type Shift-z-z from command mode.

Dev and Debugging Tools

Python

The debugger is called pdb:

python -m pdb myscript.py

Read more here

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

@miranda-zhang
miranda-zhang / bash.md
Last active April 4, 2024 08:30
bash shell script cheat sheet
@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

PostgreSQL commands

sudo -u postgres psql

help

\?

list database

@miranda-zhang
miranda-zhang / ssh.md
Last active August 5, 2023 20:53
ssh related commands