Skip to content

Instantly share code, notes, and snippets.

@SmileyChris
SmileyChris / install.rst
Last active November 19, 2019 18:56
Better wrapping of docstring text with Sublime Text 2. Run: patch ~/.config/sublime-text-2/Packages/Default/paragraph.py < paragraph.diff

To install in Sublime Text 3, you'll need to extract the py file from the default package before patching it.

Here are short instructions to do it in Linux. First change to the directory that you have sublime text, unzip the file, and patch it:

cd /opt/sublime_text
unzip Packages/Default.sublime-package paragraph.py -d ~/.config/sublime-text-3/Packages/default
curl https://gist.githubusercontent.com/SmileyChris/4340807/raw/paragraph.diff | patch ~/.config/sublime-text-3/Packages/default/paragraph.py

Or if you've downloaded the diff, you can just patch it from that rather than `curl`ing:

@FSX
FSX / async_psycopg2.py
Created March 8, 2011 22:11
A module for asynchronous PostgreSQL queries in Tornado.
#!/usr/bin/env python
__author__ = 'Frank Smit <frank@61924.nl>'
__version__ = '0.1.0'
import functools
import psycopg2
from tornado.ioloop import IOLoop, PeriodicCallback