Skip to content

Instantly share code, notes, and snippets.

View ricardosilva86's full-sized avatar
🎯
Focusing on Cloud, K8s and Terraform.

Ricardo Silva ricardosilva86

🎯
Focusing on Cloud, K8s and Terraform.
View GitHub Profile
@ricardosilva86
ricardosilva86 / .bashrc
Created October 26, 2021 16:29 — forked from vsouza/.bashrc
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@ricardosilva86
ricardosilva86 / Exercicio.py
Last active November 5, 2020 17:54
Exercicio de Python
nota1 = float(input())
nota2 = float(input())
nota3 = float(input())
presenca = float(input())
presenca_int = int(presenca * 100) #o valor da presenca é convertido em percentual
media = (nota1*2 + nota2*2 + nota3*3) /(2+2+3) #aqui é uma média ponderada, o peso de cada nota precisa ser contabilizado
if (presenca_int <= 74):
print("Frequencia: " + str(presenca_int) +"%")
@ricardosilva86
ricardosilva86 / .eslintrc.json
Last active August 16, 2019 20:28
eslint is complaining about line 12
{
"env": {
"browser": true,
"node": true,
"commonjs": true,
"es6": true,
"mocha": true
},
"extends": [
"eslint:recommended",
@ricardosilva86
ricardosilva86 / CreateNewTopic.js
Last active August 14, 2019 11:34
I fetch data from an API and then load it for the <Select />, but it doesn't load the content with the componentDidMount().
import React, {Component} from "react";
import axios from "axios";
import $ from "jquery";
import Select from 'react-select';
class CreateNewTopic extends Component{
constructor(props){
super(props);
this.onSubmit = this.onSubmit.bind(this);
this.inputTitle = React.createRef();