Skip to content

Instantly share code, notes, and snippets.

View AnthonyMRodrigues's full-sized avatar

Anthony Rodrigues AnthonyMRodrigues

View GitHub Profile
AnthonyMRodrigues /
Last active February 24, 2023 18:10
Calculator improvement example
# This is a calculator improvement used in the Medium post example.
# Original code without improvements available here:
def calculate(number1: int, number2: int, op_sign: str) -> float:
mapper = {
"+": number1 + number2,
"-": number1 - number2,
"/": number1 / number2,
"*": number1 * number2
AnthonyMRodrigues /
Last active March 18, 2022 14:03
This script receives the serial number, profile name and the token to generate and replace the aws session configuration.
if [ $# -eq 0 ]; then
printf "Utilization:\n"
printf "$0 [[--token|-t] <MFA Token>] [[--serial_number|-s] <Serial Number>] [[--profile|-p] <Profile>]\n"
exit 1
AnthonyMRodrigues /
Created October 5, 2017 16:18 — forked from rdeavila/
Git: como atualizar um fork com as mudanças do original?
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
<div class="panel-body">
<div class="form-group">
{!! Form::label('description','Descrição',['class' => 'control-label col-sm-4']) !!}
<div class="col-md-3">
{!! Form::text('description',null,['class'=>'form-control','maxlength'=>'100','placeholder'=>'Ex. Time 1']) !!}
<label class="error" for-error="description"></label>
<div class="form-group">
AnthonyMRodrigues /
Created April 26, 2017 04:06 — forked from frgomes/
Debian - install docker in Debian Jessie
# compiled from
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y
sudo sh -c "echo deb debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D