Skip to content

Instantly share code, notes, and snippets.

View ErickGiffoni's full-sized avatar
🎯
...

ErickGiffoni

🎯
...
View GitHub Profile
@ErickGiffoni
ErickGiffoni / fibonacci.c
Last active August 27, 2020 18:00
How to calculate Fibonacci's sequence using recursion ? I'll show you! This program shows a specified number of Fibonacci's sequence, based on the input from the user, which is that number's position.
#include <stdio.h>
/* This program shows a specified number of Fibonacci's sequence,
out of the input from the user, which is that number's position.
*/
// Code made by Erick Giffoni
// contact : [email protected]
// github : https://github.com/ErickGiffoni
// linkedin : https://www.linkedin.com/in/erick-giffoni-022565167/
// Copyright © 2018 Erick Giffoni . All rights reserved.
@ErickGiffoni
ErickGiffoni / fibonacci.cpp
Created July 18, 2020 22:07
Given a number *n* as input, the *fib_list()* algorithm is fast and good enough to print out the *n*th number of Fibonacci's sequence.
/*
Fibonacci number
Code by Erick Giffoni - University of Brasilia, Brazil (UnB)
*/
#include <iostream>
#include <vector>
int fib_naive(int n){
if (n <=1) return n;
@ErickGiffoni
ErickGiffoni / insertionSort.c
Created August 27, 2020 17:58
Using Insertion Sort algorithm to order an array. The numbers are read from stdin while EOF is not reached and the output is put in stdout.
/*
* University of Brasilia - Brazil, UnB
* Software Engineering
* Created by Erick Giffoni in 2020 .
* Copyright © 2020 Erick Giffoni . All rights reserved.
*/
#include <stdio.h>
#define tamanho 50000
@ErickGiffoni
ErickGiffoni / authenticate-to-gcp-steps.yml
Last active November 12, 2024 18:36
Steps to authenticate to GCP within a GitHub Action
# [...] your github action
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
export_default_credentials: true
- name: Authenticate to GCP
env:
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }}