Skip to content

Instantly share code, notes, and snippets.

@josephwandile
josephwandile / OneName
Created May 8, 2017 19:11
OneName Proof of ID
Verifying that "joekahn.id" is my Blockstack ID. https://onename.com/joekahn
Matrix* tradMult(Matrix* l_matrix, Matrix* r_matrix) {
if (l_matrix->dimension != r_matrix->dimension) {
throw invalid_argument("tradMult expects square matrices.");
}
int dimension = l_matrix->dimension;
// Always outputs a matrix in standard form (i.e. Matrix[rows][cols])
Matrix* ans_mat = instantiateMatrix(dimension);
### Keybase proof
I hereby claim:
* I am josephwandile on github.
* I am jkahn (https://keybase.io/jkahn) on keybase.
* I have a public key whose fingerprint is 312D 1144 4D4A 93C9 A770 98FE D259 BC13 E68C 43D4
To claim this, I am signing this object:
@josephwandile
josephwandile / color_my_prompr.bat
Created August 6, 2015 04:44
Stylize Terminal
function color_my_prompt {
local __user_and_host="\[\033[01;32m\]\u@\h"
local __cur_location="\[\033[01;34m\]\w"
local __git_branch_color="\[\033[31m\]"
#local __git_branch="\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt_tail="\[\033[35m\]$"
local __last_color="\[\033[00m\]"
export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color "
}