sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Rugged.raw_to_hex

Turn a buffer of 20 bytes (representing a SHA1 OID) into its
readable hexadecimal representation.

  Rugged.raw_to_hex("\330xk\374\227H^\215{\031\262\037\270\214\216\361\361\231\374?")
  #=> "d8786bfc97485e8d7b19b21fb88c8ef1f199fc3f"

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged.c

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Rugged-raw_to_hex-for-pr


# Commit to git

git add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged.cgit commit -m "better docs for Rugged.raw_to_hex"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Rugged-raw_to_hex-for-pr

hub pull-request


# Celebrate!