Skip to content

Instantly share code, notes, and snippets.

@gryf
gryf / bash_prompt.sh
Last active April 20, 2018 07:59 — forked from bradsokol/bash_prompt.sh
Set color bash prompt according to active virtualenv, Git, Mercurial or Subversion branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the active nodejs virtualenv[1]
# * the branch/status of the current Git, Mercurial or Subversion repository
# * the return value of the previous command
# * one line prompt
@gryf
gryf / refres_jqgrid.patch
Created February 28, 2012 11:56
Single grid page, refresh problem patch
diff --git a/js/grid.base.js b/js/grid.base.js
index 9f324fb..6977292 100644
--- a/js/grid.base.js
+++ b/js/grid.base.js
@@ -837,19 +837,19 @@ $.fn.jqGrid = function( pin ) {
var div = rh * rn;
var page, npage, empty;
if ( tbot < dh && ttop <= 0 &&
- (p.lastpage===undefined||parseInt((tbot + scrollTop + div - 1) / div,10) <= p.lastpage))