Skip to content

Instantly share code, notes, and snippets.

View jabrena's full-sized avatar

Juan Antonio Breña Moral jabrena

View GitHub Profile
@mallim
mallim / logstash.conf
Created July 19, 2016 03:15
Logstash config for Spring Boot's default logging
input {
file {
type => "java"
tags => [ "fornax-data-share-eureka" ]
# Logstash insists on absolute paths...
path => "D:/fornax-data-share-runtime/eureka/fornax-data-share-eureka.log"
codec => multiline {
pattern => "^%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME}.*"
negate => "true"
what => "previous"
@btoone
btoone / curl.md
Last active April 2, 2024 20:18
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@msievers
msievers / [Spring, JMH] Howto integrate JMH benchmarks with Spring.md
Last active March 23, 2024 21:12
[Spring, JMH] Howto integrate JMH benchmarks with Spring

Motivation

Integrate JMH (Java Microbenchmarking Harness) with Spring (Boot) and make developing and running benchmarks as easy and convinent as writing tests.

Idea

Wrap the necessary JMH boilerplate code within JUnit to benefit from all the existing test infrastructure Spring (Boot) provides. It should be as easy and convinent to write benchmarks as it is to write tests.

TL;DR;

@dalelane
dalelane / proposal.md
Last active September 20, 2023 02:50
Describing Kafka schema usage using AsyncAPI
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active October 21, 2022 20:10
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@linux-china
linux-china / graalvm.yml
Last active October 21, 2022 13:00
Github actions for GraalVM native image build on Windows, Mac and Linux. Please adjust 'demo-cli' to final name.
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: GraalVM Native Image build
on:
push:
branches: [ master ]
tags: [ '*' ]

[Know about it][Understanding][Clear understanding]

NOVICE

CONCEPTS

  • xxx Immutable Data
  • xxx Second-Order Functions
  • xxx Constructing & Destructuring
  • xxx Function Composition
  • xxx First-Class Functions & Lambdas
@ayyytam
ayyytam / TwentyFourtyEight
Last active August 4, 2022 18:02
2048 terminal game
// Terminal 2048
// By: Andrew Tam
// There is currently no GUI for this game and is played completely on the Terminal.
// Type in the instructions such as "up", "down", "left", "right" to move the tiles
// Type in "reset" to reset the game
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Random;
@thomasdarimont
thomasdarimont / readme.md
Last active March 23, 2022 19:04
Run an Embedded Keycloak Server with JBang

The example uses the embedded Spring Boot Keycloak Server to quickly spin up a new Keycloak instance.

Create JBang script with

jbang init spring-keycloak-server

Adapt spring-keycloak-server script.

Run the Keycloak server via:

@linux-china
linux-china / HelloIoUring.java
Created April 22, 2021 19:21
Hello io_uring testing with Netty
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.netty.incubator:netty-incubator-transport-native-io_uring:0.0.5.Final:linux-x86_64
import io.netty.incubator.channel.uring.IOUring;
public class HelloIoUring {
public static void main(String[] args) {
IOUring.ensureAvailability();
System.out.println("Hello io_uring!");
}