Skip to content

Instantly share code, notes, and snippets.

View gustavo-depaula's full-sized avatar
👨‍🌾
Have you watched Hamilton?

Gustavo de Paula gustavo-depaula

👨‍🌾
Have you watched Hamilton?
  • Comic Sans Global Domination Technology Conglomerate
  • São Paulo
View GitHub Profile
@gustavo-depaula
gustavo-depaula / stacks.scm
Created June 5, 2019 04:48
stacks definition in scheme and balanced expression algorithm
;;; Stack structure definition
(define nil '())
(define (stack . items)
(apply list items))
(define (push stack item)
(cons item stack))
(define (pop stack)
@gustavo-depaula
gustavo-depaula / current-music-lyrics.clj
Last active May 1, 2019 22:05
get my current spotify music lyrics, with clojure
(ns clj-current-music-lyrics.core
(:require [clj-http.client :as client]
[clojure.data.json :as json])
(:gen-class))
(def apikey "Bearer YOUR_API_KEY")
(defn -main
"main fn"
[& args]
float inserir (FUNCIONARIO* func, float salariotot) {
int numL=0, tmp_len=0;
float tmp_sal;
char tmp_str[50];
printf("\n" );
printf("%d\n", num_funcionarios);
printf("Deseja cadastrar quantos funcionarios?\n");
scanf("%d", &numL);
@gustavo-depaula
gustavo-depaula / react-exercise1.md
Last active April 15, 2018 01:26
Exercício introdução a React

Para esse exercício você deve criar uma simples tela que contenha uma lista de filmes. Especificação:

  • Cada filme deve ter uma capa e o título
  • Faça uma lista de pelo menos 3 filmes
  • Estilize como quiser
  • a capa deve estar a esqueda do título

Dicas:

  • utilize o create-react-app para configurar o app para você
  • recomendo utilizar o state de algum componente para armazenar as informações
  • quebre ao máximo os componentes
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/gustavodepaula/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
@gustavo-depaula
gustavo-depaula / cloudSettings
Last active June 6, 2018 12:25
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-06-06T12:24:58.985Z","extensionVersion":"v2.9.2"}
bathroomsByDistance (userLocation) {
let dist = (a, b) => {
lat1 = a.lat
lon1 = a.lon
lat2 = b.lat
lon2 = b.lon
function rad(radiano) {
return radiano*Math.PI/180;
}
@gustavo-depaula
gustavo-depaula / a.js
Created November 26, 2017 13:58
Rate iPoo
ratesRef: AngularFireList<any>
rates: Observable<any[]>
constructor ( db: AngularFireDatabase ) {
this.ratesRef = db.list('bathrooms')
// Use snapshotChanges().map() to store the key
this.rates = this.ratesRef.snapshotChanges().map(changes => {
return changes.map(c => ({ key: c.payload.key, ...c.payload.val() }))
})
alert(this.rates)
function ($request, $response, $next) {
if ($request->isPost()) {
$parsed_request = $request->getParsedBody();
if ($parsed_request['key'] == "unhackable") {
$response = $next($request, $response);
}
} else {
$response = $next($request, $response);
}
@gustavo-depaula
gustavo-depaula / libofgustavo.c
Created March 9, 2017 19:14
Library of Gustavo
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libofgustavo.h"
// LISTAS
void lista_iniciar(Lista **p_Raiz){
*p_Raiz = NULL;
}