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
function median($arr){ | |
if($arr){ | |
$count = count($arr); | |
sort($arr); | |
$mid = floor($count/2); | |
return ($arr[$mid]+$arr[$mid+1-$count%2])/2; | |
} | |
return false; | |
} | |
function average($arr){ |
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
#!/bin/sh | |
function parse_git_branch_name { | |
git rev-parse --abbrev-ref HEAD | |
} | |
function parse_git_description { | |
git config branch.$(parse_git_branch_name).description | |
} |