Skip to content

Instantly share code, notes, and snippets.

View Amerousful's full-sized avatar

Pavel Bairov Amerousful

View GitHub Profile
@kevin-lee
kevin-lee / JProfiler-with-Docker.md
Created August 10, 2016 15:55
JVM Profiler with Docker

JProfiler with Docker

Docker

DockerFile

DockerFile should have JProfiler installation.

RUN wget <JProfiler file location> -P /tmp/ && \
  tar -xzf /tmp/<JProfiler file> -C /usr/local && \
  rm /tmp/<JProfiler file>
@SriramKeerthi
SriramKeerthi / Load.java
Last active September 27, 2022 09:25
Simple CPU Load Generator in Java
package com.caffinc.grex.core;
/**
* SPDX-License-Identifier: MIT
*
* Generates Load on the CPU by keeping it busy for the given load percentage
* @author Sriram
*/
public class Load {
/**
@fancellu
fancellu / ConsumerExample.scala
Last active November 28, 2024 13:00
Kafka Producer/Consumer Example in Scala
import java.util
import org.apache.kafka.clients.consumer.KafkaConsumer
import scala.collection.JavaConverters._
object ConsumerExample extends App {
import java.util.Properties
@gvolpe
gvolpe / ParseUrlParameters.scala
Created September 14, 2015 14:26
Parse URL Parameters
import java.net.URLDecoder
def parseUrlParameters(url: String) = {
url.split("&").map( v => {
val m = v.split("=", 2).map(s => URLDecoder.decode(s, "UTF-8"))
m(0) -> m(1)
}).toMap
}
@kdonald
kdonald / MappingJackson2HttpMessageConverter.java
Created April 19, 2012 19:03
Spring Jackson 2.0 support
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software