Skip to content

Instantly share code, notes, and snippets.

View hugoheden's full-sized avatar

Hugo Heden hugoheden

View GitHub Profile
@geunho
geunho / application-properties.md
Last active September 6, 2024 10:36
spring-kafka application.properties

https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html spring.kafka prefixed properties

Key Default Value Description
spring.kafka.admin.client-id ID to pass to the server when making requests. Used for server-side logging.
spring.kafka.admin.fail-fast false Whether to fail fast if the broker is not available on startup.
spring.kafka.admin.properties.* Additional admin-specific properties used to configure the client.
spring.kafka.admin.ssl.key-password Password of the private key in the key store file.
spring.kafka.admin.ssl.key-store-location Location of the key store file.
@ChugunovRoman
ChugunovRoman / .bashrc
Last active January 6, 2024 10:04
Alias for npm run with auto completing a npm scripts from package.json from current directory.
alias nr="npm run"
_npm_scripts() {
# check package.json file in current directory
if [ ! -f ./package.json ]; then
return
fi
local scripts="$(node -e 'const { scripts } = require(`./package.json`); if (!scripts) process.exit(); let a = Object.entries(scripts); for (let s in scripts) { console.log(s); }' | grep -E ^$2)"
local -a toks
@jfager
jfager / Today.java
Last active February 18, 2022 06:56
Java 8 - Wrap Checked Exceptions in RuntimeExceptions Less Verbosely
package scratch.unsafe;
import java.util.Random;
public class Today {
public static void main(String[] args) {
String foo;
try {
if(new Random().nextBoolean()) {