Skip to content

Instantly share code, notes, and snippets.

@mernen
mernen / .bashrc
Created January 15, 2009 00:41 — forked from henrik/.bashrc
Slightly optimized version, and with niftier branch indicator
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
git diff --quiet HEAD &>/dev/null
[[ $? == 1 ]] && echo "*"
}
function parse_git_branch {
@classmethod
def get_page(cls, app_id, bookmark=None):
pagesize = 15
first_fetch = not bookmark
if first_fetch:
ascending = False
date = None
elif bookmark.startswith('-'): # we're moving backwards
ascending = False
date = str_to_date(bookmark[1:])