Skip to content

Instantly share code, notes, and snippets.

View varantes's full-sized avatar

Valdemar Arantes Neto varantes

View GitHub Profile
@varantes
varantes / test.html
Created October 24, 2014 17:06
Teste de HTML
<html>
<header>
<title>Teste do Neto</title>
</header>
<body>
<h1>Teste</h1>
</body>
</html>
@varantes
varantes / Base64_Encoder_Kotlin_Script
Last active September 14, 2017 19:48
Encode a file to Base64 saving the result into the tilesystem.
import java.nio.file.Files
import java.nio.file.Paths
import java.util.*
Files.write(Paths.get("N:\\NexaWorkflows\\fotos\\FaceWithSmile_1_base64.txt"), Base64.getEncoder().encode(Files.readAllBytes(Paths.get("N:\\NexaWorkflows\\fotos\\FaceWithSmile_1.jpg"))))
@varantes
varantes / CRC32_Kotlin
Last active April 7, 2024 18:01
Generates CRC32 hash for image files using Kotlin
import java.nio.file.Files
import java.nio.file.Paths
import java.util.zip.*
val crc32 = CRC32()
crc32.update(Files.readAllBytes(Paths.get("C:\\Users\\valdemar.neto\\Documents\\Certibio\\temp\\1\\data_10.png")))
val crc10 = crc32.value
crc32.reset()
@varantes
varantes / FormatNumberToBrazil.kt
Last active September 20, 2018 15:12
Prints a number formatted to Brazil
val f = 3.14
println("Locale.getDefault() = ${Locale.getDefault()}; f=$f")
val brasilNumberFormatter = NumberFormat.getNumberInstance(Locale("pt", "br"));
println("Locale.getDefault() = ${Locale.getDefault()}; f=${brasilNumberFormatter.format(f)}")
@varantes
varantes / ControllerTest
Created October 26, 2018 14:07
Inicializando o OkHttp3 com o JWT dos projetos Certibio
package br.com.certibio.datavalid.web
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody
import okhttp3.logging.HttpLoggingInterceptor
import org.junit.BeforeClass
import org.slf4j.LoggerFactory
import org.springframework.http.HttpHeaders
@varantes
varantes / Geração-de-Certificado-SSL
Last active June 25, 2020 14:22
Geração de Certifricado e Chave Privada SSL para ambiente de DEV
- Gerar o certificado:
http://www.selfsignedcertificate.com/
- Ver o conteúdo de um certificado utilizado em um site:
openssl s_client -connect www.certisign.com.br:443 | openssl x509 -noout -subject -issuer
- Ver o conteúdo de um certificado:
openssl x509 -noout -subject -issuer -in /d/Downloads/57187882_g5.cert
- Validar se uma chave é de um certifficado:

LocalStack CLI

The LocalStack CLI aims to simplify starting and managing LocalStack. It provides convenience features to start LocalStack on your local machine, as a Docker container on your machine, or even on a remote Docker host. In addition you can easily check the status or open a shell in your LocalStack instance if you want to take a deep-dive.

Prerequisites

Please make sure to install the following tools on your machine before moving on:

  • python (Python 3.7 up to 3.10 is supported)
  • pip (Python package manager)