This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Eron's .vimrc settings. | |
" check this out: http://www.vim.org/scripts/script.php?script_id=2332 | |
call pathogen#infect() | |
set ruler | |
set nowrap | |
set autoindent | |
set tw=120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
sphinx.builders.mobi | |
~~~~~~~~~~~~~~~~~~~~ | |
Build mobi files. | |
Originally derived from epub.py. | |
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
:license: BSD, see LICENSE for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import re | |
def camel2snake(text, sep=r'_'): | |
"""Convert *text* from CamelCase (or camelCase) into snake_case.""" | |
rebounds = [r'([a-z])([A-Z])', r'([A-Z])([A-Z])'] | |
underscored_text = str(text) | |
for b in rebounds: | |
underscored_text = re.sub(b, (r'\g<1>'+ sep + r'\g<2>'), underscored_text) |
NewerOlder