Skip to content

Instantly share code, notes, and snippets.

View danicunhac's full-sized avatar
🌎
Going beyond.

Daniel Cunha danicunhac

🌎
Going beyond.
View GitHub Profile
@danicunhac
danicunhac / multipartUpload.ts
Last active September 20, 2022 00:49
Algorithm for creating a multipart upload to AWS S3
const { UploadId: uploadId } = await s3
.createMultipartUpload({
Bucket: `${process.env.BUCKET_NAME}`,
Key: key,
})
.promise()
async function uploadPart(
partNumber: number,
uploadId: string,
@danicunhac
danicunhac / README.md
Created February 16, 2021 14:25
my template for README.md files

repo-size
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class expressoes_regulares {
public static void main(String[] args) {
Main main = new Main();
main.run();
}
public class Bispo extends Peca {
public Bispo(Casa casa, char cor) {
super(casa, cor);
}
public boolean haPecas(Tabuleiro tabuleiro, Casa destino) {
boolean haPecas = false;
if(destino.getX() > casa.getX() && destino.getY() > casa.getY()) {
@danicunhac
danicunhac / Aluno.java
Created March 25, 2019 20:38
Media Escolar (Aluno e turma)
public class Aluno {
Prova p1;
Prova p2;
double calcularMedia() {
double media = (p1.calcularNotaTotal() + p2.calcularNotaTotal())/2;
return media;
}
@danicunhac
danicunhac / Aplicacao.java
Created March 25, 2019 20:29
Calculo da Area
public class Aplicacao {
public static void main(String[] args) {
double area;
Triangulo tri = new Triangulo();
tri.b = 5;
tri.h = 3;
public class Aplicacao {
public static void main(String[] args) {
Fracao f1 = new Fracao();
f1.definirValores(7, 3);
Fracao f2 = new Fracao();
f2.definirValores(3, 2);
public class Aplicacao {
public static void main(String[] args) {
Relogio r1 = new Relogio();
r1.acertarRelogio(3, 25, 50);
System.out.println("Posicao da hora: " + r1.ponteiroHora.posicao);