Skip to content

Instantly share code, notes, and snippets.

View maykon-oliveira's full-sized avatar
🥋
Focusing

Maykon Oliveira maykon-oliveira

🥋
Focusing
  • Ioasys
  • Parnamirim - RN
  • 23:41 (UTC -03:00)
  • X @Maykon_850
View GitHub Profile
@maykon-oliveira
maykon-oliveira / CollectionsUtil.java
Created June 29, 2022 11:04
Meu set de classes útil para Java
package br.com.logann.sgbe.util;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Function;
/**
* Example:
*
@maykon-oliveira
maykon-oliveira / file-display.pipe.ts
Last active May 1, 2021 16:12
Pipe para fazer o carregamento de um File do sistema de arquivos
import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "fileDisplay",
pure: true,
})
export class FileDisplayPipe implements PipeTransform {
transform(value: File): Promise<any> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
@maykon-oliveira
maykon-oliveira / handleFileInputChangeComum.ts
Last active May 1, 2021 16:08
Preview de imagens antes do upload com Angular
function onChange(event: any) {
if (!event.target.files[0] || event.target.files[0].length === 0) {
alert("Nenhum arquivo selecionado");
return;
}
const mimeType = event.target.files[0].type;
if (mimeType.match(/image\/*/) == null) {
alert('Apenas imagens são suportados');
@maykon-oliveira
maykon-oliveira / RegexServerWebExchangeMatcher.java
Last active July 17, 2020 00:15
Matches if the Pattern and/or HttpMethod matches the path within the application.
package com.maykonoliveira.examechunindevdojo.config;
import org.springframework.http.HttpMethod;
import org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;
import java.util.regex.Pattern;
/** @author maykon-oliveira */
@maykon-oliveira
maykon-oliveira / README.md
Last active December 20, 2018 16:44
Estilo do meu bash para trabalhar com o git

Configurando um ambiente para deploy de uma App Spring Boot

Passo a passo ensinando como configurar um servidor web para fazer deploy de uma aplicação construida com o framework Spring Boot.

Linux

  • Configurando o Java e Maven
    1. sudo apt-get update
    2. sudo add-apt-repository ppa:webupd8team/java
  1. Passo 1 novamente