Skip to content

Instantly share code, notes, and snippets.

View Gunisalvo's full-sized avatar

Rodrigo "Gunisalvo" Leite Gunisalvo

  • Entrementes
  • Rio de Janeiro
View GitHub Profile
@Gunisalvo
Gunisalvo / week_06.tf
Created July 11, 2018 09:14
UoL: Cloud Computing IAM
variable "student_name" {
default = "<STUDENT NAME>" # fixme!
}
variable "region" {
default = "us-east-2"
}
provider "aws" {
region = "${var.region}"
@Gunisalvo
Gunisalvo / week_05.tf
Created July 4, 2018 15:52
UoL: Cloud Computing Networking
variable "student_name" {
default = "<STUDENT_NAME>" #fixme!
}
variable "region" {
default = "us-east-2"
}
provider "aws" {
region = "${var.region}"
@Gunisalvo
Gunisalvo / week_04.tf
Last active June 27, 2018 15:26
UoL: Relational Data Base
variable "student_name" {
default = "STUDENT_NAME" #fix me!
}
variable "username" {}
variable "password" {}
variable "region" {
default = "us-east-2"
@Gunisalvo
Gunisalvo / week_03_snapshot.tf
Created June 19, 2018 10:27
UoL: Cloud Computing week 3 (snapshot)
variable "student_name" {
default = "STUDENT_NAME" #fix me
}
variable "region" {
default = "us-east-2"
}
provider "aws" {
region = "${var.region}"
@Gunisalvo
Gunisalvo / week_03.tf
Created June 19, 2018 10:26
UoL: Cloud Computing week 3 (storage)
variable "student_name" {
default = "STUDENT_NAME" #fix me!
}
variable "region" {
default = "us-east-2"
}
provider "aws" {
region = "${var.region}"
@Gunisalvo
Gunisalvo / SensibleApproach.java
Created June 15, 2018 16:03
Concurrency Patterns
import java.util.*;
import java.util.concurrent.*;
public class SensibleApproach {
private static long SIMULATION_TIME = 5000L;
public static void main(String[] args) throws InterruptedException {
UnsafeBuffer guinea = new UnsafeBuffer(10);
@Gunisalvo
Gunisalvo / week_02.tf
Created June 7, 2018 15:17
UoL: Cloud Computing week 2
provider "aws" {
region = "us-east-2"
}
resource "aws_security_group" "uol_security" {
name = "CKIT523-Group-[REPLACE WITH YOUR NAME]" #fixme!
description = "Uol Security"
ingress {
#define TAMANHO_MAXIMO_DO_SEGREDO 4
#define REPETICOES_ESTADO_FINAL 3
#define TEMPO_LUZ 1000
#define TEMPO_PAUSA 500
#define ledVerde 2
#define ledAmarelo 3
#define ledVermelho 4
#define ledBranco 5
#include <EEPROM.h>
int acumulador = 0;
static int acumulador2 = 0;
int acumulador3;
int enderecoEEPROM = 0;
void setup() {
Serial.begin(9600);
#define TAMANHO_MAXIMO_DO_SEGREDO 4
#define REPETICOES_ESTADO_FINAL 3
#define TEMPO_LUZ 1000
#define TEMPO_PAUSA 500
#define BOTAO_VERDE 8
#define BOTAO_AMARELO 9
#define BOTAO_VERMELHO 10
#define BOTAO_AZUL 11