Skip to content

Instantly share code, notes, and snippets.

View vepo's full-sized avatar
💻
/bin/bash

Victor Osório vepo

💻
/bin/bash
View GitHub Profile
@alexandreaquiles
alexandreaquiles / clean-arch-morreu.md
Last active August 31, 2023 17:11
Transcrição do Spaces "Clean Arch morreu?" que aconteceu em 17/08/2022

[Alexandre Aquiles]

Mas é... Então vamos lá pessoal. Meu nome é Alexandre Aquiles.

Twitter do Alexandre Aquiles

Eu não vou falar onde eu trabalho, acho que vocês devem saber, né? Porque aqui o negócio é entre a gente mesmo. É papo nosso aqui mesmo.

Eu lancei um livro recentemente, né? Desbravando SOLID. Deixa eu fazer o jabá já, né? Desbravando SOLID.

@vepo
vepo / AvroConverter.java
Last active December 10, 2021 12:56
Convert POJO/Map to AVRO GenericRecord
import org.apache.avro.generic.GenericData;
import org.apache.avro.Schema;
import org.apache.avro.io.DecoderFactory;
import org.apache.avro.io.Decoder;
import org.apache.avro.io.DatumReader;
import org.apache.avro.generic.GenericDatumReader;
public class AvroConverter {
public static GenericData.Record parseJson(String data, Schema schema) throws IOException {
Decoder decoder = DecoderFactory.get().jsonDecoder(schema, data);
@Hakky54
Hakky54 / curl-with-java-keystore.md
Last active August 26, 2024 13:14
Curl with Java KeyStore

Curl with Java KeyStore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

One way TLS/SSL/Authentication

Convert keystore to p12 file

@squarepegsys
squarepegsys / BigDecimalCodec.java
Created November 15, 2017 15:37
How to get BigDecimal to behave in MongoDb
public class BigDecimalCodec implements Codec<BigDecimal> {
// Note that you may not want it to be double -- choose your own type.
@Override
public void encode(final BsonWriter writer, final BigDecimal value, final EncoderContext encoderContext) {
writer.writeDouble(value);
}
@Override
public BigDecimal decode(final BsonReader reader, final DecoderContext decoderContext) {
return reader.readDouble();
@adilsoncarvalho
adilsoncarvalho / bitbucket-pipelines.yml
Last active April 16, 2024 12:03
Bitbucket Pipelines deployment to a Google Container Engine configuration
options:
docker: true
pipelines:
branches:
master:
- step:
image: google/cloud-sdk:latest
name: Deploy to production
deployment: production
caches:
@ygotthilf
ygotthilf / jwtRS256.sh
Last active November 25, 2024 11:05
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@hhcordero
hhcordero / 1_Dockerised_JMeter.md
Last active March 30, 2022 13:44
Dockerized JMeter - A Distributed Load Testing Workflow