Skip to content

Instantly share code, notes, and snippets.

View gabrielsaints's full-sized avatar
:octocat:

Gabriel Santos gabrielsaints

:octocat:
View GitHub Profile
#include <stdio.h>
/**
* Sequência de Fibonacci otimizada com Inline Assembly
*/
int fib(int n)
{
register int r = 0;
__asm__(
git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}