Skip to content

Instantly share code, notes, and snippets.

View vivaserver's full-sized avatar

Cristian R. Arroyo vivaserver

View GitHub Profile
@vivaserver
vivaserver / gist:4633775
Created January 25, 2013 11:40
DCI that respects the method cache
# seen @ http://evan.tiggerpalace.com/articles/2011/11/24/dci-that-respects-the-method-cache/
user.as(GitHubUserProvisioner) do |provisioner|
provisioner.provision_with!(*yank_oauth_stuff_off_request)
end
@vivaserver
vivaserver / gist:4376766
Created December 26, 2012 00:29
A nice, simple Bash prompt with the current Git branch and RVM gemset.
export PS1="\$(__git_ps1 \"± %s 〉\")\$(~/.rvm/bin/rvm-prompt) 〉\w
⚡ "
@vivaserver
vivaserver / gist:3360305
Created August 15, 2012 13:48
Bash prompt w/Git branch, RVM gemset & path
export PS1="\$(__git_ps1 \"± %s 〉\")\$(~/.rvm/bin/rvm-prompt) 〉\w
∴ "
@vivaserver
vivaserver / gist:3201752
Created July 29, 2012 20:44
DDMMYY date parser for TableSorter jQuery plugin
// DDMMYY date parser for TableSorter plugin
// 'cause stock "shortDate" sorter only works with 'yyyy' year format
// ref: http://tablesorter.com/docs/example-parsers.html
var regx = /(\d{2})\/(\d{2})\/(\d{2})/;
var match_dd_mm_yy;
$.tablesorter.addParser({
id: "ddmmyy",
is: function(s) {
return false;
},
@vivaserver
vivaserver / bootstrap.tablesorter.css
Created July 16, 2012 14:53
Bootstrap 2.0 CSS styles for the TableSorter jQuery plugin
th.tablesorter-header {
cursor: pointer;
}
th.tablesorter-header:after {
content: "";
float: right;
margin-top: 7px;
border-width: 0 4px 4px;
border-style: solid;
border-color: #000000 transparent;