Skip to content

Instantly share code, notes, and snippets.

@faermanj
faermanj / pratica-programacao.txt
Last active October 2, 2020 13:04
Prática de Entrevista de Programação
# Por quê praticar programação neste formato?
# Como se preparar para entrevistas de programação?
# O que se avalia normalmente?
# Como lidar com a pressão?
# Como gerenciar o tempo?
# Como gerenciar a comunicação?
# Que tipos de problema se pede mais?
# Que algoritmos e estruturas de dados preciso saber?
# Que linguagens e ferramentas posso usar?
# Quais são as perguntas mais comuns?
@faermanj
faermanj / multi-region-sls-backend.sh
Created March 18, 2019 08:27
Multi-region serverless backend
#!/usr/bin/env bash
set -e
# Script for creating a multi-region active-active deployment
# usgin the AWS CLI based on the post from @adhorn:
# https://medium.com/@adhorn/multi-region-serverless-backend-reloaded-1b887bc615c0
RID="$RANDOM"
PREFIX="globalapp"
REGIONS="us-east-1 us-west-2 eu-west-1"
@faermanj
faermanj / initc9.sh
Last active March 10, 2019 11:39
Cloud9 Initi Script
# curl -s https://gist.githubusercontent.com/faermanj/2db9d8d5c24cc692fc415b30e8c039c6/raw/167d055e8db9cd5ae27f19b7ca71838c381f0ac7/initc9.sh | sh
# Javascript
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install node
@faermanj
faermanj / README.md
Last active February 25, 2019 11:46
Serverless for Developers - 4YFN 2019

Serverless for Developers - 4YFN 2019

Julio Faerman - @faermanj

Before the begining

  • Why AWS? open https://aws.amazon.com/what-is-cloud-computing/

  • Free? open http://aws.amazon.com/free/

@faermanj
faermanj / README.md
Last active August 31, 2018 17:19
Load Testing for Serverless

REL 3 How does your system adapt to changes in demand?

The USE Method

"How does your system adapt"

  • percentiles (50%, 95%, 99%, 99.9%, ..., 100%)
  • errors (4xx,5xx)
  • mean and stdev

"changes in demand"

@faermanj
faermanj / Load Testing 101.md
Last active October 3, 2019 07:22
REL 3 How does your system adapt to changes in demand?

Welcome to AWS Well Architected Solutions on Twitch!

Today we are building the best practice "REL 3 How does your system adapt to changes in demand?" The goal is to create a sample application using AWS Elastic Beanstalk and AWS CloudFormation and start taking load measurements.

You are welcome to comment and ask questions on twitch chat, but please keep it friendly and respectful.

More details and links on this gist: https://gist.github.com/jfaerman/9dd8c585852a21d605048631b6788125

@faermanj
faermanj / rel1.md
Last active May 14, 2019 16:28
AWS Well Architected Solutions on Twitch.TV/AWS - Reliability Pillar
@faermanj
faermanj / c5d.18xlarge NVMe
Last active May 19, 2018 15:39
Benchmarking Stuff
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/raid-config.html
mdadm --create --verbose /dev/md0 \
--level=0 \
--name=riverraid \
--raid-devices=2 /dev/nvme1n1 /dev/nvme2n1
mkfs.ext4 -L riverraid /dev/md0
mdadm --detail --scan | sudo tee -a /etc/mdadm.conf
dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r)
mkdir -p /mnt/riverraid
@faermanj
faermanj / README.md
Last active June 30, 2020 18:07
AWS Well Architected: Performance Efficiency Notes

Video: https://www.twitch.tv/videos/177667117

PERF 1. How do you select the best performing architecture?

"In God we trust, all others bring data" W. Edwards Deming

Performance 👎

  • Latency
  • Throughput
  • Latency ⍺ Concurrent Users
@faermanj
faermanj / handler.js
Created July 17, 2017 08:03
URL Shortener
'use strict';
const data = require('./data');
const response = (statusCode, url) => {
return {
statusCode: statusCode,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Credentials': true,
'Location': `${url}`