Skip to content

Instantly share code, notes, and snippets.

View askmi's full-sized avatar
🏠
Working from home

Aliaksandr Smirnou askmi

🏠
Working from home
View GitHub Profile
@petrbouda
petrbouda / memory-limit-request-jvm.md
Last active September 24, 2024 10:14
Memory LIMIT and REQUEST in Containers and JVM

Memory LIMIT and REQUEST in Containers and JVM

  • Do you run a JVM inside a container on Kubernetes (or maybe OpenShift)?
  • Do you struggle with REQUEST and LIMIT parameters?
  • Do you know the impact of those parameters on your JVM?
  • Have you met OOM Killer?

Hope you will find answers to these questions in this example-based article.

How to set up JVM Heap size in a Container

To access the api in this example, first we have to procure the Auth Token (using one of the OAuth2 Flows) containing a scope "canGreet".

Assumption is that the Authorization Server supports OpenId Connect 1.0 specifications.

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active September 24, 2024 15:21
set -e, -u, -o, -x pipefail explanation
@dentys
dentys / wiremock-cert.md
Last active October 13, 2023 12:01
Wiremock with trusted self signed certificate

1. Create a self signed certificate, explicitly specify connection source dns (localhost) name and ip (0.0.0.0).

This allows client to use https://localhost or https://0.0.0.0

keytool -genkey -alias profiler -keyalg RSA -keysize 1024 -validity 1365 -keypass password -keystore wiremock.jks -storepass password -ext SAN=dns:localhost,ip:0.0.0.0

As a result there is a private/public key pair in wiremock.jks keystore

2. Start wiremock with https enabled and custom keystore

@olih
olih / jq-cheetsheet.md
Last active September 21, 2024 00:05
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq