Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Exploring

Wesley Egberto wesleyegberto

🎯
Exploring
View GitHub Profile
View tailwind-css-cheatsheet.css
/* *******************************************************************************************
* 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
* --------------------
View angular-cheatsheet.ts
/* *******************************************************************************************
* ANGULAR (2+) CHEATSHEET
* BASED ON https://angular.io/guide/cheatsheet
* DOCUMENTATION: https://angular.io/docs
* STYLE GUIDE: https://angular.io/guide/styleguide
* ******************************************************************************************* */
Original file can be seen [here](https://github.com/LeCoupa/awesome-cheatsheets/blob/master/frontend/angular.js)
```
View api-design-cheat-sheet.md

This is a copy, original file can be seen here

See also: Platform Building Cheat Sheet

API Design Cheat Sheet

  1. Build the API with consumers in mind--as a product in its own right.
    • Not for a specific UI.
    • Embrace flexibility / tunability of each endpoint (see #5, 6 & 7).
    • Eat your own dogfood, even if you have to mockup an example UI.
@wesleyegberto
wesleyegberto / spring_boot_testing_deps.md
Last active May 15, 2021
Dependencies to Spring Boot Testing: controller tests; architecture tests; testcontainer for IT and Jacoco for coverage report.
View spring_boot_testing_deps.md

Dependencies to Spring Boot Testing with:

  • JUnit 5
  • API tests
  • architecture tests
  • testcontainer for IT
  • Jacoco for coverage report

To run:

@wesleyegberto
wesleyegberto / JavaMultiStage.Dockerfile
Last active Jan 31, 2021
Multistage Dockerfile to build and run a Java project
View JavaMultiStage.Dockerfile
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
@wesleyegberto
wesleyegberto / convert-postman-to-insomnia.js
Created Sep 22, 2020
Script to convert a Postman backupt to Insomnia
View convert-postman-to-insomnia.js
/**
* 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 / NodeMultiStage.Dockerfile
Created May 19, 2020
Example of Dockerfile to build Node app using multistage to lower its image size (without the large node_node modules).
View NodeMultiStage.Dockerfile
# Stage 1 - the build process
FROM node:10-alpine as build-deps
WORKDIR /src
COPY package.json package-lock.json ./
RUN npm i --silent
COPY . ./
RUN npm run build
# Stage 2 - the production environment
FROM nginx:1.12-alpine
@wesleyegberto
wesleyegberto / Dockerfile.dev
Created Apr 26, 2020
Dockerfile to build docker image for development (supports live reload and debug by attaching to the remote JVM)
View Dockerfile.dev
# docker run -d --rm --name my-app --network dkrnet -p 8080:8080 my-app
FROM maven:3.6.3-jdk-13
COPY pom.xml /workspace/
COPY src /workspace/src/
WORKDIR /workspace/
CMD ["mvn", "compile", "quarkus:dev", "-Dquarkus.live-reload.password=123"]
@wesleyegberto
wesleyegberto / monitored_ab_stress.sh
Last active Jan 25, 2021
Script to start a server and run a monitored stress test using Apache Bench
View monitored_ab_stress.sh
# Script to run stress test agains a URL using Apache Bench
# Usage: sh monitored_ab_stress.sh "$CMD" <URL-stress> <output-results-filename>
# where CMD="java -jar my-app.jar"
# script origin at https://github.com/jkremser/micronaut-app-k8s/blob/master/plot-test.sh
#!/bin/bash
echo "=== Monitored Apache Bench Test - Started"
echo $@
URL_TEST=$2
@wesleyegberto
wesleyegberto / profiling.vim
Created Feb 15, 2020
Script to profiling Vim to see what plugin are slowing thing down
View profiling.vim
" Source: https://stackoverflow.com/questions/12213597/how-to-see-which-plugins-are-making-vim-slow
:profile start profile.log
:profile func *
:profile file *
" At this point do slow actions
:profile pause
:noautocmd qall!