Skip to content

Instantly share code, notes, and snippets.

View anderson-marques's full-sized avatar
🤖
Hacking as usual...

Anderson Carvalho anderson-marques

🤖
Hacking as usual...
View GitHub Profile
@anderson-marques
anderson-marques / imposto.c
Last active September 24, 2018 07:10
Esqueleto de programa em C para calcular o imposto de renda a pagar
#include <stdio.h>
float calculaValorImposto(salario){
// TODO: Calcular o valor
}
void imprimeValorImposto(impostoAPagar){
// TODO: imprimir o valor
}
@anderson-marques
anderson-marques / README.md
Created February 12, 2019 11:01 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@anderson-marques
anderson-marques / keybase.md
Last active July 16, 2019 13:21
keybase.md

Keybase proof

I hereby claim:

  • I am anderson-marques on github.
  • I am andersoncarvalho (https://keybase.io/andersoncarvalho) on keybase.
  • I have a public key whose fingerprint is 1CDB 3A1C 5A87 0862 D629 2DD3 370B 91A1 8775 8452

To claim this, I am signing this object:

@anderson-marques
anderson-marques / multiplesawsaccounts.md
Last active April 16, 2019 13:56
How to manage multiples aws accounts in Terminal

How to manage multiples aws accounts easily

Configure profiles and create aliases

1. Configure the aws profiles for each credentials

  • aws configure --profile profile-a
  • aws configure --profile profile-b
  • aws configure --profile profile-c
  • aws configure --profile profile-d
@anderson-marques
anderson-marques / events-group-by-account-id.js
Last active April 30, 2019 21:34
NodeJS example - RxJS - Processing S3 Event keys and group them by account id
/**
* https://repl.it/@marquesanderson/pongo-aggregation-events-by-account-id
*/
const RxJS = require('rxjs')
const filter = require('rxjs/operators').filter
const map = require('rxjs/operators').map
const groupBy = require('rxjs/operators').groupBy
const flatMap = require('rxjs/operators').flatMap
const toArray = require('rxjs/operators').toArray
@anderson-marques
anderson-marques / fake-sns.js
Last active May 1, 2019 20:10
Fake SNS Module to be used in local laboratory - To real utilisation, replace the implementation to call the AWS SNS SDK
'use scrict'
\**
* https://repl.it/@marquesanderson/fake-sns
*\
const events = require('events')
const eventsEmitter = new events.EventEmitter()
class SNSPublisher {
@anderson-marques
anderson-marques / generate-metric-data-from-api-call-event.js
Last active May 2, 2019 21:29
Generate MetricData from api-call-event
// https://repl.it/@marquesanderson/generate-metric-data-from-api-call-event
const RxJS = require('rxjs')
const map = require('rxjs/operators').map
const concatAll = require('rxjs/operators').concatAll
const toArray = require('rxjs/operators').toArray
let apiCalls$ = RxJS.from([
{
accountId: 1,
@anderson-marques
anderson-marques / kubernetes-commands.md
Last active June 7, 2019 12:55
Kubernetes Commands

K8S Commands

Expose POD as a Load Balanced Service

$ kubectl expose pod [pod-name] --name=[service-name] --type=LoadBalancer

Describe Service Information

K8s Architecture

Master - Control Plane

Master - Controle Plane Components

kube-apiserver

  • Communicates with the user
  • REST APIs
@anderson-marques
anderson-marques / update-aws-cli-v1.sh
Created January 12, 2021 11:23
Shell script to update the AWS CLI to v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --bin-dir /usr/bin --install-dir /usr/bin/aws-cli --update
aws --version