Skip to content

Instantly share code, notes, and snippets.

View wesleyegberto's full-sized avatar
🎯
Exploring

Wesley Egberto wesleyegberto

🎯
Exploring
View GitHub Profile
@wesleyegberto
wesleyegberto / convert-postman-to-insomnia.js
Created September 22, 2020 05:57
Script to convert a Postman backupt to Insomnia
/**
* Script to parse a Postman backupt to Insomnia keeping the same structure.
*
* It parses:
* - Folders
* - Requests
* - Environments
*
* Notes: Insomnia doesn't accept vars with dots, if you are using you must replace yours URLs manually (see ENVIRONMENTS_EXPORTS).
*/
@wesleyegberto
wesleyegberto / tailwind-css-cheatsheet.css
Last active November 15, 2023 15:15
Tailwind CSS Cheatsheet
/* *******************************************************************************************
* TAILWIND.CSS
* DOCUMENTATION: https://tailwindcss.com/
*
* Original file can be seen here: https://github.com/LeCoupa/awesome-cheatsheets/blob/master/frontend/tailwind.css
* ******************************************************************************************* */
/*
* Available breakpoints
* --------------------
@wesleyegberto
wesleyegberto / web.xml
Created March 7, 2017 22:29
web.xml for Servlet 3.1
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
## Cluster
### Cluster info
kubectl cluster-info
kubectl get nodes
kubectl describe node
### Listar os eventos
kubectl get events
@wesleyegberto
wesleyegberto / java_testing_deps.md
Last active August 20, 2022 22:06
Dependencies to Java Testing: unit and mutation tests; controller tests; architecture tests; testcontainer for IT and Jacoco for coverage report.

Dependencies to Java Testing with:

  • JUnit 5
  • API tests
  • Architecture tests
  • TestContainer for IT
  • Jacoco for coverage report
  • Pitest for mutation test

To run:

@wesleyegberto
wesleyegberto / java_makefile
Created June 16, 2022 16:40
Java Makefile
run: build
java -cp .:dist Main
build: src/Main.java
javac -d dist src/Main.java
clean:
rm -rf dist
mkdir dist
@wesleyegberto
wesleyegberto / json_to_dataframe_csv_exporter.py
Last active May 28, 2022 05:55
Simple class to exporter a JSON file to DataFrame and CSV
# This was created to export any JSON format to CSV.
# I've created to help extract MongoDb collection to one or more CSV, [hopefully] in a normalized tables.
import pandas as pd
class JsonToDataFrameCsvExporter(object):
""" Simple exporter to help transform a JSON into a DataFrame CSV file.
The main purpose of this exporter is to export a JSON as a collection of normalized
table in CSV file.
@wesleyegberto
wesleyegberto / TestThreadStackSize.java
Created May 15, 2022 18:22 — forked from rednaxelafx/TestThreadStackSize.java
Inconsistency of -Xss and -XX:ThreadStackSize in the java launcher
import java.lang.reflect.Field;
import sun.misc.Unsafe;
public class TestThreadStackSize {
private static void crashVM() {
try {
makeSegfault(getUnsafe());
} catch (Exception e) {
// swallow
}
@wesleyegberto
wesleyegberto / JavaMultiStage.Dockerfile
Last active April 10, 2022 15:46
Multistage Dockerfile to build and run a Java project
FROM maven:3.6-jdk-11 as builder
WORKDIR /app
COPY pom.xml .
# download dependencies as specified in pom.xml
# building dependency layer early will speed up compile time when pom is unchanged
RUN mvn verify --fail-never
COPY src ./src

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools